Class TimeSeriesAsset
Time series for asset data. Assets include any quotes retrieved from supported data feeds or child algorithms.
Inherited Members
Namespace: TuringTrader.SimulatorV2
Assembly: TuringTrader.Simulator.dll
Syntax
public class TimeSeriesAsset : TimeSeries<OHLCV>
Constructors
| Improve this Doc View SourceTimeSeriesAsset(Algorithm, string, Task<object>, Func<object, List<BarType<OHLCV>>>, Func<object, MetaType>)
Create new time series for an asset.
Declaration
public TimeSeriesAsset(Algorithm owner, string name, Task<object> retrieve, Func<object, List<BarType<OHLCV>>> extractBars, Func<object, TimeSeriesAsset.MetaType> extractMeta)
Parameters
Type | Name | Description |
---|---|---|
Algorithm | owner | Algorithm instance requesting/ owning this time series |
string | name | Asset's nickname |
System.Threading.Tasks.Task<TResult><object> | retrieve | data retrieval task |
System.Func<T, TResult><object, System.Collections.Generic.List<T><BarType<OHLCV>>> | extractBars | extractor for time series bars |
System.Func<T, TResult><object, TimeSeriesAsset.MetaType> | extractMeta | extractor for meta information |
Properties
| Improve this Doc View SourceClose
Return time series of closing prices.
Declaration
public TimeSeriesFloat Close { get; }
Property Value
Type | Description |
---|---|
TimeSeriesFloat |
Description
Convenience function to asset's full descriptive name.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
string |
High
Return time series of highest prices.
Declaration
public TimeSeriesFloat High { get; }
Property Value
Type | Description |
---|---|
TimeSeriesFloat |
Low
Return time series of lowest prices.
Declaration
public TimeSeriesFloat Low { get; }
Property Value
Type | Description |
---|---|
TimeSeriesFloat |
Meta
Asset's meta data including its ticker symbol and descriptive name.
Declaration
public TimeSeriesAsset.MetaType Meta { get; }
Property Value
Type | Description |
---|---|
TimeSeriesAsset.MetaType |
Open
Return time series of opening prices.
Declaration
public TimeSeriesFloat Open { get; }
Property Value
Type | Description |
---|---|
TimeSeriesFloat |
Position
Return position as fraction of account's NAV.
Declaration
public double Position { get; }
Property Value
Type | Description |
---|---|
double |
Ticker
Convenience function to return asset's ticker symbol.
Declaration
public string Ticker { get; }
Property Value
Type | Description |
---|---|
string |
Volume
Return time series of trading volumes.
Declaration
public TimeSeriesFloat Volume { get; }
Property Value
Type | Description |
---|---|
TimeSeriesFloat |
Methods
| Improve this Doc View SourceAllocate(double, OrderType, double)
Set target allocation as fraction of account's NAV.
Declaration
public void Allocate(double weight, OrderType orderType, double orderPrice = 0)
Parameters
Type | Name | Description |
---|---|---|
double | weight | |
OrderType | orderType | |
double | orderPrice |