Skip to main content

Module exit

Module exit 

Source
Expand description

Module containing exit policy definitions for option trading strategies.

This module defines various exit conditions and policies that can be used to determine when to close an option position during simulations or live trading. Exit policies include percentage-based targets, fixed prices, time-based exits, and composite conditions using AND/OR logic.

§Usage

Exit policies are used in simulations to automatically close positions when specific conditions are met, enabling systematic strategy testing and risk management. Exit policies for option trading strategies.

This module defines various exit conditions and policies that can be used to determine when to close an option position during simulations or live trading.

§Exit Policies

  • Percentage-based: Exit when profit/loss reaches a percentage threshold
  • Fixed price: Exit when the option premium reaches a specific price
  • Time-based: Exit after a certain time period or at expiration
  • Delta-based: Exit when the option’s delta crosses a threshold
  • Underlying price: Exit when the underlying asset reaches a price level
  • Combined conditions: Exit when multiple conditions are met (AND/OR logic)

Enums§

ExitPolicy
Defines exit policies for option positions.

Functions§

check_exit_policy
Checks if an exit policy is triggered for an option position.