Lean  $LEAN_TAG$
QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator Class Referenceabstract

Provide the base symbol generator implementation More...

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

Public Member Functions

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...
 
abstract 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...
 

Static Public Member Functions

static BaseSymbolGenerator Create (RandomDataGeneratorSettings settings, IRandomValueGenerator random)
 Creates a ad-hoc symbol generator depending on settings More...
 

Protected Member Functions

 BaseSymbolGenerator (RandomDataGeneratorSettings settings, IRandomValueGenerator random)
 Base constructor implementation for Symbol generator More...
 
abstract IEnumerable< SymbolGenerateAsset (string ticker=null)
 Generates a random asset 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...
 

Properties

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

Provide the base symbol generator implementation

Definition at line 27 of file BaseSymbolGenerator.cs.

Constructor & Destructor Documentation

◆ BaseSymbolGenerator()

QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.BaseSymbolGenerator ( RandomDataGeneratorSettings  settings,
IRandomValueGenerator  random 
)
protected

Base constructor implementation for Symbol generator

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

Definition at line 59 of file BaseSymbolGenerator.cs.

Here is the call graph for this function:

Member Function Documentation

◆ Create()

static BaseSymbolGenerator QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.Create ( RandomDataGeneratorSettings  settings,
IRandomValueGenerator  random 
)
static

Creates a ad-hoc symbol generator depending on settings

Parameters
settingsrandom data generator settings
randomproduces random values for use in random data generation
Returns
New symbol generator

Definition at line 74 of file BaseSymbolGenerator.cs.

Here is the caller graph for this function:

◆ GenerateRandomSymbols()

IEnumerable<Symbol> QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.GenerateRandomSymbols ( )

Generates specified number of symbols

Returns
Set of random symbols

Definition at line 103 of file BaseSymbolGenerator.cs.

Here is the call graph for this function:

◆ GenerateAsset()

abstract IEnumerable<Symbol> QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.GenerateAsset ( string  ticker = null)
protectedpure virtual

Generates a random asset

Parameters
tickerOptionally can provide a ticker that should be used
Returns
Random asset

Implemented in QuantConnect.ToolBox.RandomDataGenerator.OptionSymbolGenerator, QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator, and QuantConnect.ToolBox.RandomDataGenerator.FutureSymbolGenerator.

Here is the caller graph for this function:

◆ NextSymbol()

Symbol QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.NextSymbol ( SecurityType  securityType,
string  market,
string  ticker = null 
)

Generates random symbol, used further down for asset

Parameters
securityTypesecurity type
marketmarket
tickerOptionally can provide a ticker to use
Returns
Random symbol

Definition at line 138 of file BaseSymbolGenerator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NextTickerFromSymbolPropertiesDatabase()

string QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.NextTickerFromSymbolPropertiesDatabase ( SecurityType  securityType,
string  market 
)
protected

Return a Ticker matching an entry in the Symbol properties database

Parameters
securityTypesecurity type
market
Returns
Random Ticker matching an entry in the Symbol properties database

Definition at line 182 of file BaseSymbolGenerator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRandomExpiration()

DateTime QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.GetRandomExpiration ( SecurityExchangeHours  marketHours,
DateTime  minExpiry,
DateTime  maxExpiry 
)
protected

Generates random expiration date on a friday within specified time range

Parameters
marketHoursmarket hours
minExpiryminimum expiration date
maxExpirymaximum expiration date
Returns
Random date on a friday within specified time range

Definition at line 210 of file BaseSymbolGenerator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NextUpperCaseString()

string QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.NextUpperCaseString ( int  minLength,
int  maxLength 
)

Generates a random string within the specified lengths.

Parameters
minLengthThe minimum length, inclusive
maxLengthThe maximum length, inclusive
Returns
A new upper case string within the specified lengths

Definition at line 231 of file BaseSymbolGenerator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAvailableSymbolCount()

abstract int QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.GetAvailableSymbolCount ( )
pure 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

Implemented in QuantConnect.ToolBox.RandomDataGenerator.OptionSymbolGenerator, QuantConnect.ToolBox.RandomDataGenerator.FutureSymbolGenerator, and QuantConnect.ToolBox.RandomDataGenerator.DefaultSymbolGenerator.

Here is the caller graph for this function:

Property Documentation

◆ Random

IRandomValueGenerator QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.Random
getprotected

IRandomValueGenerator instance producing random values for use in random data generation

Definition at line 33 of file BaseSymbolGenerator.cs.

◆ Settings

RandomDataGeneratorSettings QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.Settings
getprotected

Settings of current random data generation run

Definition at line 38 of file BaseSymbolGenerator.cs.

◆ MarketHoursDatabase

MarketHoursDatabase QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.MarketHoursDatabase
getprotected

Exchange hours and raw data times zones in various markets

Definition at line 43 of file BaseSymbolGenerator.cs.

◆ SymbolPropertiesDatabase

SymbolPropertiesDatabase QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.SymbolPropertiesDatabase
getprotected

Access to specific properties for various symbols

Definition at line 48 of file BaseSymbolGenerator.cs.


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