Skip to content

Configuration Guide

Overview

The strategy_config.toml file contains all configurable parameters for the options trading strategy. You can modify these values to adjust the strictness of stock screening criteria and customize the scoring system.

Configuration Sections

[thresholds]

Controls the pass/fail criteria for stock recommendations.

  • min_avg_volume (default: 1500000)
  • Minimum average daily trading volume in shares
  • Higher values = only more liquid stocks pass
  • Example: 1500000 requires at least 1.5M shares/day

  • min_iv_rv_ratio (default: 1.25)

  • Minimum ratio of 30-day implied volatility to 30-day realized volatility
  • Higher values = require higher volatility premium
  • Example: 1.25 means IV must be at least 25% higher than RV

  • max_ts_slope (default: -0.00406)

  • Maximum term structure slope (0 to min_days_to_expiration)
  • More negative values = require steeper downward-sloping volatility curve
  • Example: -0.00406 means volatility must decrease by at least 0.406% per day

[expiration]

Controls option expiration date filtering.

  • min_days_to_expiration (default: 45)
  • Minimum days to expiration for filtering option dates
  • Options expiring beyond this cutoff are included in analysis
  • Also used as the endpoint for term structure slope calculation

[volatility]

Controls volatility calculation parameters.

  • rolling_window (default: 30)
  • Rolling window size in days for Yang-Zhang volatility calculation
  • Larger values = smoother but less responsive estimates
  • Common values: 20, 30, 60

  • trading_periods_per_year (default: 252)

  • Number of trading periods per year for annualization
  • Standard for US equity markets is 252

  • price_history_period (default: "3mo")

  • Historical price lookback period
  • Valid values: "1mo", "3mo", "6mo", "1y", etc.

[scoring]

Controls the scoring weights used in symbol comparison.

  • volume_weight (default: 2.0)
  • Points awarded per million shares of volume
  • Example: 2.0 means 1M volume = 2 points

  • volume_max_points (default: 20.0)

  • Maximum points that can be awarded for volume
  • Prevents extremely high-volume stocks from dominating the score

  • iv_rv_weight (default: 20.0)

  • Points awarded per unit of IV/RV ratio above 1.0
  • Example: 20.0 means each 0.1 above 1.0 = 2 points

  • ts_slope_weight (default: 1000.0)

  • Multiplier to convert negative slope to positive score
  • Example: 1000.0 means -0.01 slope = 10 points

  • expected_move_weight (default: 2.0)

  • Points awarded per 1% expected move
  • Example: 2.0 means 5% expected move = 10 points

Usage

The configuration file is automatically loaded by the calculator.py and compare.py scripts. To use custom values:

  1. Edit configs/strategy_config.toml
  2. Modify the desired parameters
  3. Save the file
  4. Run the scripts normally - they will use the updated values

Examples

More Conservative Screening

[thresholds]
min_avg_volume = 3000000      # Require higher liquidity
min_iv_rv_ratio = 1.5         # Require higher volatility premium
max_ts_slope = -0.006         # Require steeper downward slope

Less Restrictive Screening

[thresholds]
min_avg_volume = 500000       # Allow lower volume stocks
min_iv_rv_ratio = 1.1         # Accept lower volatility premium
max_ts_slope = -0.002         # Accept flatter term structure

Longer-Term Analysis

[expiration]
min_days_to_expiration = 60   # Look further out

[volatility]
rolling_window = 60           # Use longer volatility window
price_history_period = "6mo"  # Use more historical data