Lean
$LEAN_TAG$
|
Generates random tick data according to the settings provided More...
Public Member Functions | |
TickGenerator (RandomDataGeneratorSettings settings, TickType[] tickTypes, Security security, IRandomValueGenerator random) | |
IEnumerable< Tick > | GenerateTicks () |
Generates and enumerates data points for current symbol More... | |
virtual Tick | NextTick (DateTime dateTime, TickType tickType, decimal maximumPercentDeviation) |
Generates a random Tick that is at most the specified maximumPercentDeviation away from the previous price and is of the requested tickType More... | |
Tick | NextOpenInterest (DateTime dateTime, decimal previousValue, decimal maximumPercentDeviation) |
Generates a random Tick that is at most the specified maximumPercentDeviation away from the previousValue and is of the Open Interest More... | |
virtual DateTime | NextTickTime (DateTime previous, Resolution resolution, DataDensity density) |
Generates a random DateTime suitable for use as a tick's emit time. If the density provided is DataDensity.Dense, then at least one tick will be generated per resolution step. If the density provided is DataDensity.Sparse, then at least one tick will be generated every 5 resolution steps. if the density provided is DataDensity.VerySparse, then at least one tick will be generated every 50 resolution steps. Times returned are guaranteed to be within market hours for the specified Symbol More... | |
Generates random tick data according to the settings provided
Definition at line 28 of file TickGenerator.cs.
IEnumerable<Tick> QuantConnect.ToolBox.RandomDataGenerator.TickGenerator.GenerateTicks | ( | ) |
Generates and enumerates data points for current symbol
Implements QuantConnect.ToolBox.RandomDataGenerator.ITickGenerator.
Definition at line 60 of file TickGenerator.cs.
|
virtual |
Generates a random Tick that is at most the specified maximumPercentDeviation away from the previous price and is of the requested tickType
dateTime | The time of the generated tick |
tickType | The type of Tick to be generated |
maximumPercentDeviation | The maximum percentage to deviate from the previous price for example, 1 would indicate a maximum of 1% deviation from the previous price. For a previous price of 100, this would yield a price between 99 and 101 inclusive |
Implements QuantConnect.ToolBox.RandomDataGenerator.ITickGenerator.
Definition at line 142 of file TickGenerator.cs.
Tick QuantConnect.ToolBox.RandomDataGenerator.TickGenerator.NextOpenInterest | ( | DateTime | dateTime, |
decimal | previousValue, | ||
decimal | maximumPercentDeviation | ||
) |
Generates a random Tick that is at most the specified maximumPercentDeviation away from the previousValue and is of the Open Interest
dateTime | The time of the generated tick |
previousValue | The previous price, used as a reference for generating new random prices for the next time step |
maximumPercentDeviation | The maximum percentage to deviate from the previousValue , for example, 1 would indicate a maximum of 1% deviation from the previousValue . For a previous price of 100, this would yield a price between 99 and 101 inclusive |
Definition at line 197 of file TickGenerator.cs.
|
virtual |
Generates a random DateTime suitable for use as a tick's emit time. If the density provided is DataDensity.Dense, then at least one tick will be generated per resolution step. If the density provided is DataDensity.Sparse, then at least one tick will be generated every 5 resolution steps. if the density provided is DataDensity.VerySparse, then at least one tick will be generated every 50 resolution steps. Times returned are guaranteed to be within market hours for the specified Symbol
previous | The previous tick time |
resolution | The requested resolution of data |
density | The requested data density |
Implements QuantConnect.ToolBox.RandomDataGenerator.ITickGenerator.
Definition at line 222 of file TickGenerator.cs.