Lean
$LEAN_TAG$
|
Contains returns specific to a symbol required for optimization model More...
Public Member Functions | |
ReturnsSymbolData (Symbol symbol, int lookback, int period) | |
Initializes a new instance of the ReturnsSymbolData class More... | |
void | Add (DateTime time, decimal value) |
Adds an item to this window and shifts all other elements More... | |
bool | Update (DateTime time, decimal value) |
Updates the state of the RateOfChange with the given value and returns true if this indicator is ready, false otherwise More... | |
void | Reset () |
Resets all indicators of this object to its initial state More... | |
Public Attributes | |
Dictionary< DateTime, double > | Returns => _window.ToDictionary(x => x.EndTime, x => (double) x.Value) |
Historical returns More... | |
Properties | |
RateOfChange | ROC [get] |
The symbol's asset rate of change indicator More... | |
Contains returns specific to a symbol required for optimization model
Definition at line 26 of file ReturnsSymbolData.cs.
QuantConnect.Algorithm.Framework.Portfolio.ReturnsSymbolData.ReturnsSymbolData | ( | Symbol | symbol, |
int | lookback, | ||
int | period | ||
) |
Initializes a new instance of the ReturnsSymbolData class
symbol | The symbol of the data that updates the indicators |
lookback | Look-back period for the RateOfChange indicator |
period | Size of rolling window that contains historical RateOfChange |
Definition at line 43 of file ReturnsSymbolData.cs.
void QuantConnect.Algorithm.Framework.Portfolio.ReturnsSymbolData.Add | ( | DateTime | time, |
decimal | value | ||
) |
Adds an item to this window and shifts all other elements
time | The time associated with the value |
value | The value to use to update this window |
Definition at line 61 of file ReturnsSymbolData.cs.
bool QuantConnect.Algorithm.Framework.Portfolio.ReturnsSymbolData.Update | ( | DateTime | time, |
decimal | value | ||
) |
Updates the state of the RateOfChange with the given value and returns true if this indicator is ready, false otherwise
time | The time associated with the value |
value | The value to use to update this indicator |
Definition at line 74 of file ReturnsSymbolData.cs.
void QuantConnect.Algorithm.Framework.Portfolio.ReturnsSymbolData.Reset | ( | ) |
Resets all indicators of this object to its initial state
Definition at line 82 of file ReturnsSymbolData.cs.
Dictionary<DateTime, double> QuantConnect.Algorithm.Framework.Portfolio.ReturnsSymbolData.Returns => _window.ToDictionary(x => x.EndTime, x => (double) x.Value) |
Historical returns
Definition at line 54 of file ReturnsSymbolData.cs.
|
get |
The symbol's asset rate of change indicator
Definition at line 35 of file ReturnsSymbolData.cs.