Class Stock
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
Methods
From(AssetIdentifier)
Construct a stock backed by an existing asset identifier.
public static Stock From(AssetIdentifier identifier)
Parameters
identifierAssetIdentifierPre-built identifier.
Returns
New(string)
Construct a stock backed by a simple (opaque-string) identifier.
public static Stock New(string value)
Parameters
valuestringTicker or other opaque identifier.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.