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

Generates a new random option Symbol. More...

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

Public Member Functions

 OptionSymbolGenerator (RandomDataGeneratorSettings settings, IRandomValueGenerator random, decimal underlyingPrice, decimal maximumStrikePriceDeviation)
 
override int GetAvailableSymbolCount ()
 Returns the number of symbols with the specified parameters can be generated. There is no limit for the options. 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 new random option Symbol. The generated option contract Symbol will have an expiry between the specified min and max expiration. The strike price will be within the specified maximum strike price deviation of the underlying symbol price and should be rounded to reasonable value for the given price. For example, a price of 100 dollars would round to 5 dollar increments and a price of 5 dollars would round to 50 cent increments 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 option Symbol.

Definition at line 24 of file OptionSymbolGenerator.cs.

Member Function Documentation

◆ GenerateAsset()

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

Generates a new random option Symbol. The generated option contract Symbol will have an expiry between the specified min and max expiration. The strike price will be within the specified maximum strike price deviation of the underlying symbol price and should be rounded to reasonable value for the given price. For example, a price of 100 dollars would round to 5 dollar increments and a price of 5 dollars would round to 50 cent increments

Parameters
tickerOptionally can provide a ticker that should be used

Standard contracts expiry on the third Friday. Weekly contracts expiry every week on Friday

Returns
A new option contract Symbol within the specified expiration and strike price parameters along with its underlying symbol

Implements QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.

Definition at line 61 of file OptionSymbolGenerator.cs.

Here is the call graph for this function:

◆ GetAvailableSymbolCount()

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

Returns the number of symbols with the specified parameters can be generated. There is no limit for the options.

Returns
returns int.MaxValue

Implements QuantConnect.ToolBox.RandomDataGenerator.BaseSymbolGenerator.


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