Table of Contents

Class Stock

Namespace
Virtufin.Base
Assembly
Virtufin.Base.dll

A tradeable equity instrument identified by an opaque string (typically an exchange ticker or an ISIN).

public sealed record Stock : IAsset, IEquatable<Stock>
Inheritance
Stock
Implements
Inherited Members

Examples

var apple = Stock.New("AAPL");
var samsung = Stock.New("005930.KS");

Properties

Identifier

public AssetIdentifier Identifier { get; }

Property Value

AssetIdentifier

Methods

From(AssetIdentifier)

Construct a stock backed by an existing asset identifier.

public static Stock From(AssetIdentifier identifier)

Parameters

identifier AssetIdentifier

Pre-built identifier.

Returns

Stock

New(string)

Construct a stock backed by a simple (opaque-string) identifier.

public static Stock New(string value)

Parameters

value string

Ticker or other opaque identifier.

Returns

Stock

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.