Global settings define how your entire strategy behaves — from capital and date range to roll logic, structure closing, and premium exits.
Think of these as the “environment settings” that apply to all legs inside your TOM object.
These parameters appear at the top level of every TOM file (outside the legs array).
🧭 Overview
Global settings control:
Equity — how much equity you start with and how profits are handled
Date range — when your backtest begins and ends
Option universe rules — which expiries to use
Lifecycle behavior — how and when positions roll or close
Premium-based exits — automated take-profit and stop-loss triggers
Example: Global Section of a TOM
Here’s a simplified TOM excerpt showing only the global settings portion:
{
"strategy_id": "Custom Structure",
"initial_equity": 1000000,
"equity_type": "compounding",
"from_date": "2010-01-01",
"to_date": "2025-10-01",
"option_expiry_type": "Standard + Serial",
"dte_roll": "yes",
"inherit_first_leg_rolls": "no",
"close_structure_on_dte_min": "no",
"close_entire_structure_on_every_min_dte": "no",
"close_entire_structure_on_every_min_dte_value": 0,
"premium_exit": {
"use_premium_exit": "yes",
"lower": 0.5,
"upper": 2
}
}
🧱 Core Strategy Information
strategy_id
What it is: A friendly name or label for your TOM.
Example: "Short Put Spread"
Note: This field is for identification only — it doesn’t affect calculations
💰 Equity & Accounting
initial_equity
What it is: Starting capital for your backtest.
Example: 1000000
Units: Base currency of your underlying instrument (e.g., USD).
equity_type
Values: "compounding" or "static"
"compounding"→ profits/losses adjust available capital for future trades."static"→ Each trade uses the same fixed notional regardless of results.
📅 Date Range
from_date and to_date
Define the inclusive backtesting window.
"from_date": "2010-01-01",
"to_date": "2025-10-01"The engine automatically skips non-trading days and weekends.
📆 Option Universe Selection
option_expiry_type
Specifies which expiries to consider when selecting contracts.
Values:
"Standard"→ standard expiries only"Standard + Serial"→ standard and serial expiries
🔄 Rolling & Structure Closure
These settings control how and when your strategy rolls or exits existing positions.
dte_roll
Values: "yes" or "no"
Purpose: Enables rolling when a leg’s Days to Expiry (DTE) threshold is reached. When enabled, it will maintain the structure in position for all specified periods with signals by rolling to the next available contract.
inherit_first_leg_rolls
Values: "yes" or "no"
If "yes", all other legs follow the first leg’s roll schedule and logic.
Useful for spreads and cross-asset structures that must roll together.
close_structure_on_dte_min
Values: "yes" or "no"
If "yes", closes legs of the structure on their corresponding min_dte's.
close_entire_structure_on_every_min_dte
Values: "yes" or "no"
If "yes", closes the entire structure whenever we approach any underlying expiry by min_dte_value.
close_entire_structure_on_every_min_dte_value
Specifies the DTE threshold used when the above setting is "yes".
Example: "close_entire_structure_on_every_min_dte_value": 3 → closes all legs when we reach 3 days to expiry of the next option.
max_days_in_trade
Specifies how many days a trade can be in position. After a specified number of business days, the entire structure will be closed.
💎 Premium Exit Rules
The premium_exit block defines automatic exits based on premium movement relative to the entry price.
"premium_exit": {
"use_premium_exit": "yes",
"lower": 0.5,
"upper": 2
}
| Field | Meaning | Example |
|---|---|---|
use_premium_exit | "yes" or "no" toggle | "yes" enables premium-based exits |
lower | Lower premium threshold | 0.5 → exit when premium drops to 50% of entry |
upper | Uppwer premium threshold | 2 → exit when premium doubles |
If use_premium_exit = "no", these values are ignored.
⚙️ Summary
| Field | Type | Example | Description |
|---|---|---|---|
strategy_id | string | "Short Put" | Strategy label |
initial_equity | number | 1000000 | Starting capital |
equity_type | enum | "compounding" | Compounding or static equity |
from_date / to_date | date | "2010-01-01" | Backtest date range |
option_expiry_type | enum | "Standard" | Expiry set selection |
dte_roll | "yes/no" | "no"` | Roll trades when min_dte is reached |
inherit_first_leg_rolls | "yes/no" | "no"` | Inherid min_dte rolls from the first legs for all other legs |
close_structure_on_dte_min | "yes/no" | "no"` | Close legs on their corresponding min_dte's |
close_entire_structure_on_every_min_dte | "yes/no" | "no"` | Close entire structure when we approach any underlying expiry by "min_dte_value" |
close_entire_structure_on_every_min_dte_value | number | 0 | DTE threshold |
max_days_in_trade | number | 10 | Maximum number of business days in a trade allowed |
premium_exit | object | { \"use_premium_exit\": \"yes\", ... } | Premium exit rules |
🧠 Best Practices
Use
inherit_first_leg_rollsWhen testing spreads or condors, it keeps legs synchronized.Start with
equity_type: "compounding"a realistic performance, then teststaticfor controlled comparisons.Enable
premium_exitto define profit-taking or stop-loss logic without separate signals.Always confirm your
from_date/to_daterange includes the instrument’s historical data.
Comments
0 comments
Please sign in to leave a comment.