Lean  $LEAN_TAG$
QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch Class Reference

Defines a match of OptionPosition to a OptionStrategyDefinition More...

Inheritance diagram for QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch:
[legend]

Public Member Functions

 OptionStrategyDefinitionMatch (OptionStrategyDefinition definition, IReadOnlyList< OptionStrategyLegDefinitionMatch > legs, int multiplier)
 Initializes a new instance of the OptionStrategyDefinitionMatch class More...
 
OptionPositionCollection RemoveFrom (OptionPositionCollection positions)
 Deducts the matched positions from the specified positions taking into account the multiplier More...
 
OptionStrategy CreateStrategy ()
 Creates the OptionStrategy instance this match represents More...
 
bool Equals (OptionStrategyDefinitionMatch other)
 Indicates whether the current object is equal to another object of the same type. More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
override int GetHashCode ()
 Serves as the default hash function. More...
 
override string ToString ()
 Returns a string that represents the current object. More...
 

Static Public Member Functions

static bool operator== (OptionStrategyDefinitionMatch left, OptionStrategyDefinitionMatch right)
 OptionStrategyDefinitionMatch == Operator More...
 
static bool operator!= (OptionStrategyDefinitionMatch left, OptionStrategyDefinitionMatch right)
 OptionStrategyDefinitionMatch != Operator More...
 

Properties

OptionStrategyDefinition Definition [get]
 The OptionStrategyDefinition matched More...
 
int Multiplier [get]
 The number of times the definition is able to match the available positions. Since definitions are formed at the 'unit' level, such as having 1 contract, the multiplier defines how many times the definition matched. This multiplier is used to scale the quantity defined in each leg definition when creating the OptionStrategy objects. More...
 
IReadOnlyList< OptionStrategyLegDefinitionMatchLegs [get]
 The OptionStrategyLegDefinitionMatch instances matched to the definition. More...
 

Detailed Description

Defines a match of OptionPosition to a OptionStrategyDefinition

Definition at line 25 of file OptionStrategyDefinitionMatch.cs.

Constructor & Destructor Documentation

◆ OptionStrategyDefinitionMatch()

QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.OptionStrategyDefinitionMatch ( OptionStrategyDefinition  definition,
IReadOnlyList< OptionStrategyLegDefinitionMatch legs,
int  multiplier 
)

Initializes a new instance of the OptionStrategyDefinitionMatch class

Definition at line 49 of file OptionStrategyDefinitionMatch.cs.

Member Function Documentation

◆ RemoveFrom()

OptionPositionCollection QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.RemoveFrom ( OptionPositionCollection  positions)

Deducts the matched positions from the specified positions taking into account the multiplier

Definition at line 63 of file OptionStrategyDefinitionMatch.cs.

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

◆ CreateStrategy()

OptionStrategy QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.CreateStrategy ( )

Creates the OptionStrategy instance this match represents

Definition at line 79 of file OptionStrategyDefinitionMatch.cs.

Here is the call graph for this function:

◆ Equals() [1/2]

bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.Equals ( OptionStrategyDefinitionMatch  other)

Indicates whether the current object is equal to another object of the same type.

Parameters
otherAn object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.

Definition at line 106 of file OptionStrategyDefinitionMatch.cs.

Here is the caller graph for this function:

◆ Equals() [2/2]

override bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.Equals ( object  obj)

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object; otherwise, false.

Definition at line 145 of file OptionStrategyDefinitionMatch.cs.

Here is the call graph for this function:

◆ GetHashCode()

override int QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.GetHashCode ( )

Serves as the default hash function.

Returns
A hash code for the current object.

Definition at line 167 of file OptionStrategyDefinitionMatch.cs.

◆ ToString()

override string QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

Definition at line 195 of file OptionStrategyDefinitionMatch.cs.

◆ operator==()

static bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.operator== ( OptionStrategyDefinitionMatch  left,
OptionStrategyDefinitionMatch  right 
)
static

OptionStrategyDefinitionMatch == Operator

Returns
True if they are the same

Definition at line 204 of file OptionStrategyDefinitionMatch.cs.

Here is the call graph for this function:

◆ operator!=()

static bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.operator!= ( OptionStrategyDefinitionMatch  left,
OptionStrategyDefinitionMatch  right 
)
static

OptionStrategyDefinitionMatch != Operator

Returns
True if they are not the same

Definition at line 213 of file OptionStrategyDefinitionMatch.cs.

Here is the call graph for this function:

Property Documentation

◆ Definition

OptionStrategyDefinition QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.Definition
get

The OptionStrategyDefinition matched

Definition at line 30 of file OptionStrategyDefinitionMatch.cs.

◆ Multiplier

int QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.Multiplier
get

The number of times the definition is able to match the available positions. Since definitions are formed at the 'unit' level, such as having 1 contract, the multiplier defines how many times the definition matched. This multiplier is used to scale the quantity defined in each leg definition when creating the OptionStrategy objects.

Definition at line 39 of file OptionStrategyDefinitionMatch.cs.

◆ Legs

IReadOnlyList<OptionStrategyLegDefinitionMatch> QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyDefinitionMatch.Legs
get

The OptionStrategyLegDefinitionMatch instances matched to the definition.

Definition at line 44 of file OptionStrategyDefinitionMatch.cs.


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