Skip to content

UnmatchedPositionCountOptionStrategyMatchObjectiveFunction

QuantConnect.Securities.Option.StrategyMatcher.UnmatchedPositionCountOptionStrategyMatchObjectiveFunction

Bases: Object, IOptionStrategyMatchObjectiveFunction

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.

compute_score

compute_score(
    input: OptionPositionCollection,
    match: OptionStrategyMatch,
    unmatched: OptionPositionCollection,
) -> float

Computes the delta in matched vs unmatched positions, which gives precedence to solutions that match more contracts.