Lean  $LEAN_TAG$
QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator Class Reference

Generates a new random Symbol object of the specified security type. All returned symbols have a matching entry in the Symbol properties database. More...

Inheritance diagram for QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator:
[legend]

Public Member Functions

 DefaultSymbolGenerator (RandomDataGeneratorSettings settings, IRandomValueGenerator random)
 Creates DefaultSymbolGenerator instance More...
 
override int GetAvailableSymbolCount ()
 Returns the number of symbols with the specified parameters can be generated. Returns int.MaxValue if there is no limit for the given parameters. More...
 
- Public Member Functions inherited from QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator
IEnumerable< SymbolGenerateRandomSymbols ()
 Generates specified number of symbols More...
 
Symbol NextSymbol (SecurityType securityType, string market, string ticker=null)
 Generates random symbol, used further down for asset More...
 
string NextUpperCaseString (int minLength, int maxLength)
 Generates a random string within the specified lengths. More...
 

Protected Member Functions

override IEnumerable< SymbolGenerateAsset (string ticker=null)
 Generates a single-item list at a time using base random implementation More...
 
- Protected Member Functions inherited from QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator
 BaseSymbolGenerator (RandomDataGeneratorSettings settings, IRandomValueGenerator random)
 Base constructor implementation for Symbol generator More...
 
string NextTickerFromSymbolPropertiesDatabase (SecurityType securityType, string market)
 Return a Ticker matching an entry in the Symbol properties database More...
 
DateTime GetRandomExpiration (SecurityExchangeHours marketHours, DateTime minExpiry, DateTime maxExpiry)
 Generates random expiration date on a friday within specified time range More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator
static BaseSymbolGenerator Create (RandomDataGeneratorSettings settings, IRandomValueGenerator random)
 Creates a ad-hoc symbol generator depending on settings More...
 
- Properties inherited from QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator
IRandomValueGenerator Random [get]
 IRandomValueGenerator instance producing random values for use in random data generation More...
 
RandomDataGeneratorSettings Settings [get]
 Settings of current random data generation run More...
 
MarketHoursDatabase MarketHoursDatabase [get]
 Exchange hours and raw data times zones in various markets More...
 
SymbolPropertiesDatabase SymbolPropertiesDatabase [get]
 Access to specific properties for various symbols More...
 

Detailed Description

Generates a new random Symbol object of the specified security type. All returned symbols have a matching entry in the Symbol properties database.

A valid implementation will keep track of generated Symbol objects to ensure duplicates are not generated.

Definition at line 31 of file DefaultSymbolGenerator.cs.

Constructor & Destructor Documentation

◆ DefaultSymbolGenerator()

QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator.DefaultSymbolGenerator ( RandomDataGeneratorSettings  settings,
IRandomValueGenerator  random 
)

Creates DefaultSymbolGenerator instance

Parameters
settingsrandom data generation run settings
randomproduces random values for use in random data generation

Definition at line 41 of file DefaultSymbolGenerator.cs.

Member Function Documentation

◆ GenerateAsset()

override IEnumerable<Symbol> QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator.GenerateAsset ( string  ticker = null)
protectedvirtual

Generates a single-item list at a time using base random implementation

Returns

Implements QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.

Definition at line 52 of file DefaultSymbolGenerator.cs.

Here is the call graph for this function:

◆ GetAvailableSymbolCount()

override int QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator.GetAvailableSymbolCount ( )
virtual

Returns the number of symbols with the specified parameters can be generated. Returns int.MaxValue if there is no limit for the given parameters.

Returns
The number of available symbols for the given parameters, or int.MaxValue if no limit

Implements QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.

Definition at line 62 of file DefaultSymbolGenerator.cs.

Here is the call graph for this function:

The documentation for this class was generated from the following file: