Lean  $LEAN_TAG$
QuantConnect.Securities.Option.StrategyMatcher Namespace Reference

Classes

class  AbsoluteRiskOptionPositionCollectionEnumerator
 Stub class providing an idea towards an optimal IOptionPositionCollectionEnumerator implementation that still needs to be implemented. More...
 
class  ConstantOptionStrategyLegPredicateReferenceValue
 Provides an implementation of IOptionStrategyLegPredicateReferenceValue that represents a constant value. More...
 
class  ConstantOptionStrategyLegReferenceValue
 Provides methods for easily creating instances of ConstantOptionStrategyLegPredicateReferenceValue<T> More...
 
class  DefaultOptionPositionCollectionEnumerator
 Provides a default implementation of the IOptionPositionCollectionEnumerator abstraction. More...
 
class  DescendingByLegCountOptionStrategyDefinitionEnumerator
 Provides an implementation of IOptionStrategyDefinitionEnumerator that enumerates definitions requiring more leg matches first. This ensures more complex definitions are evaluated before simpler definitions. More...
 
class  FunctionalOptionPositionCollectionEnumerator
 Provides a functional implementation of IOptionPositionCollectionEnumerator More...
 
class  IdentityOptionStrategyDefinitionEnumerator
 Provides a default implementation of IOptionStrategyDefinitionEnumerator that enumerates definitions according to the order that they were provided to OptionStrategyMatcherOptions More...
 
interface  IOptionPositionCollectionEnumerator
 Enumerates an OptionPositionCollection. The intent is to evaluate positions that may be more important sooner. Positions appearing earlier in the enumeration are evaluated before positions showing later. This effectively prioritizes individual positions. This should not be used filter filtering, but it could also be used to split a position, for example a position with 10 could be changed to two 5s and they don't need to be enumerated back to-back either. In this way you could prioritize the first 5 and then delay matching of the final 5. More...
 
interface  IOptionStrategyDefinitionEnumerator
 Enumerates OptionStrategyDefinition for the purposes of providing a bias towards definitions that are more favorable to be matched before matching less favorable definitions. More...
 
interface  IOptionStrategyLegPredicateReferenceValue
 When decoding leg predicates, we extract the value we're comparing against If we're comparing against another leg's value (such as legs[0].Strike), then we'll create a OptionStrategyLegPredicateReferenceValue. If we're comparing against a literal/constant value, then we'll create a ConstantOptionStrategyLegPredicateReferenceValue. These reference values are used to slice the OptionPositionCollection to only include positions matching the predicate. More...
 
interface  IOptionStrategyMatchObjectiveFunction
 Evaluates the provided match to assign an objective score. Higher scores are better. More...
 
struct  OptionPosition
 Defines a lightweight structure representing a position in an option contract or underlying. This type is heavily utilized by the options strategy matcher and is the parameter type of option strategy definition predicates. Underlying quantities should be represented in lot sizes, which is equal to the quantity of shares divided by the contract's multiplier and then rounded down towards zero (truncate) More...
 
class  OptionPositionCollection
 Provides indexing of option contracts More...
 
class  OptionStrategyDefinition
 Provides a definitional object for an OptionStrategy. This definition is used to 'match' option positions via OptionPositionCollection. The OptionStrategyMatcher utilizes a full collection of these definitional objects in order to match an algorithm's option position holdings to the set of strategies in an effort to reduce the total margin required for holding the positions. More...
 
class  OptionStrategyDefinitionMatch
 Defines a match of OptionPosition to a OptionStrategyDefinition More...
 
class  OptionStrategyDefinitions
 Provides a listing of pre-defined OptionStrategyDefinition These definitions are blueprints for OptionStrategy instances. Factory functions for those can be found at OptionStrategies More...
 
class  OptionStrategyLegDefinition
 Defines a single option leg in an option strategy. This definition supports direct match (does position X match the definition) and position collection filtering (filter collection to include matches) More...
 
struct  OptionStrategyLegDefinitionMatch
 Defines the item result type of OptionStrategyLegDefinition.Match, containing the number of times the leg definition matched the position (Multiplier) and applicable portion of the position. More...
 
class  OptionStrategyLegPredicate
 Defines a condition under which a particular OptionPosition can be combined with a preceding list of leg (also of type OptionPosition) to achieve a particular option strategy. More...
 
class  OptionStrategyLegPredicateReferenceValue
 Provides an implementation of IOptionStrategyLegPredicateReferenceValue that references an option leg from the list of already matched legs by index. The property referenced is defined by PredicateTargetValue More...
 
class  OptionStrategyMatch
 Defines a complete result from running the matcher on a collection of positions. The matching process will return one these matches for every potential combination of strategies conforming to the search settings and the positions provided. More...
 
class  OptionStrategyMatcher
 Matches OptionPositionCollection against a collection of OptionStrategyDefinition according to the OptionStrategyMatcherOptions provided. More...
 
class  OptionStrategyMatcherOptions
 Defines options that influence how the matcher operates. More...
 
class  UnmatchedPositionCountOptionStrategyMatchObjectiveFunction
 Provides an implementation of IOptionStrategyMatchObjectiveFunction that evaluates the number of unmatched positions, in number of contracts, giving precedence to solutions that have fewer unmatched contracts. More...
 

Enumerations

enum  PredicateTargetValue { PredicateTargetValue.Right, PredicateTargetValue.Quantity, PredicateTargetValue.Strike, PredicateTargetValue.Expiration }
 Specifies the type of value being compared against in a OptionStrategyLegPredicate. These values define the limits of what can be filtered and must match available slice methods in OptionPositionCollection More...
 

Enumeration Type Documentation

◆ PredicateTargetValue

Specifies the type of value being compared against in a OptionStrategyLegPredicate. These values define the limits of what can be filtered and must match available slice methods in OptionPositionCollection

Enumerator
Right 

Predicate matches on OptionPosition.Right (0)

Quantity 

Predicate match on OptionPosition.Quantity (1)

Strike 

Predicate matches on OptionPosition.Strike (2)

Expiration 

Predicate matches on OptionPosition.Expiration (3)

Definition at line 23 of file PredicateTargetValue.cs.