Show / Hide Table of Contents

Class TimeSeriesAsset

Time series for asset data. Assets include any quotes retrieved from supported data feeds or child algorithms.

Inheritance
object
TimeSeries<OHLCV>
TimeSeriesAsset
Inherited Members
TimeSeries<OHLCV>._retrieveUntyped
TimeSeries<OHLCV>.Owner
TimeSeries<OHLCV>.Name
TimeSeries<OHLCV>.Data
TimeSeries<OHLCV>.this[int]
TimeSeries<OHLCV>.this[DateTime]
TimeSeries<OHLCV>.Time
TimeSeries<OHLCV>.Date
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TuringTrader.SimulatorV2
Assembly: TuringTrader.Simulator.dll
Syntax
public class TimeSeriesAsset : TimeSeries<OHLCV>

Constructors

| Improve this Doc View Source

TimeSeriesAsset(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 Source

Close

Return time series of closing prices.

Declaration
public TimeSeriesFloat Close { get; }
Property Value
Type Description
TimeSeriesFloat
| Improve this Doc View Source

Description

Convenience function to asset's full descriptive name.

Declaration
public string Description { get; }
Property Value
Type Description
string
| Improve this Doc View Source

High

Return time series of highest prices.

Declaration
public TimeSeriesFloat High { get; }
Property Value
Type Description
TimeSeriesFloat
| Improve this Doc View Source

Low

Return time series of lowest prices.

Declaration
public TimeSeriesFloat Low { get; }
Property Value
Type Description
TimeSeriesFloat
| Improve this Doc View Source

Meta

Asset's meta data including its ticker symbol and descriptive name.

Declaration
public TimeSeriesAsset.MetaType Meta { get; }
Property Value
Type Description
TimeSeriesAsset.MetaType
| Improve this Doc View Source

Open

Return time series of opening prices.

Declaration
public TimeSeriesFloat Open { get; }
Property Value
Type Description
TimeSeriesFloat
| Improve this Doc View Source

Position

Return position as fraction of account's NAV.

Declaration
public double Position { get; }
Property Value
Type Description
double
| Improve this Doc View Source

Ticker

Convenience function to return asset's ticker symbol.

Declaration
public string Ticker { get; }
Property Value
Type Description
string
| Improve this Doc View Source

Volume

Return time series of trading volumes.

Declaration
public TimeSeriesFloat Volume { get; }
Property Value
Type Description
TimeSeriesFloat

Methods

| Improve this Doc View Source

Allocate(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

Extension Methods

Resampling.Monthly(TimeSeriesAsset, int)
Resampling.Weekly(TimeSeriesAsset, int)
Trend.Supertrend(TimeSeriesAsset, int, double)
Volatility_.AverageTrueRange(TimeSeriesAsset, int)
Volatility_.TrueRange(TimeSeriesAsset)
Volatility_.ValueAtRisk(TimeSeriesAsset, int, double)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2011-2023, Bertram Enterprises LLC dba TuringTrader.com