Skip to content

contango.trading.execution.backtest.fill_behavior.rules.rule_context

contango.trading.execution.backtest.fill_behavior.rules.rule_context

RuleContext

Bases: NamedTuple

The context for all rules.

Attributes:

Name Type Description
desired_quantity int

The desired quantity of units for the order.

current_position int

The current position in units for the order.

total_cost float

The total cost for the order.

current_cash float

The current cash available in the portfolio.