Strategy Fundamentals
Core concepts: position templates, rules, and workflow
Strategy Basics
Understanding the fundamentals of strategy construction in GreeksLab is essential for building effective and testable options trading strategies. This guide outlines the core components of a strategy and how they work together within the platform.
What Is a Strategy?
A strategy in GreeksLab is a fully defined trading system composed of rules, configurations, and templates that specify how to enter, manage, and exit options positions. It includes:
- Strategy Metadata — Name and optional notes for organization and context
- Backtest Settings — Parameters controlling the simulation environment
- Position Templates — Configurations that define what positions to trade and how
- Rules — Logic governing entries, exits, adjustments, and risk management
A strategy can be thought of as a complete trading plan that is both testable and repeatable under various historical market conditions.
Strategy Structure
Each strategy contains several essential elements:
1. Strategy Name
A descriptive name helps identify the strategy at a glance.
Best Practices:
- Be specific: “SPX Iron Condor 45DTE” is more informative than “Strategy 1”
- Include the setup, timeframe, or market condition
- Keep it short but meaningful
- SPX Iron Condor 45DTE
- Weekly Put Credit Spread
- Earnings Straddle
2. Strategy Notes (Optional)
Optional documentation to record the rationale and assumptions behind the strategy:
- Market thesis
- Expected behavior
- Risk assumptions
- Versioning information
Backtest Settings
These define how the strategy is simulated on historical data:
- Date Range — Time period to test the strategy
- Initial Capital — Starting cash balance (default: $100,000)
- Commission Model:
- Fixed $ per contract
- % of contract value
- Minimum per order
- Slippage — Models execution delays and price impact
- Skip If Leg Not Found — Prevents partial positions if any leg is missing
Position Templates
Position templates are the core trade structures within a strategy. Each defines:
- Name — Identifies the position in backtest reports
- Underlying Symbol — Asset for which options are traded (e.g., SPX)
- Option Legs — Specifies which options to buy/sell
- Entry Rules — Conditions for opening the position
- Management Rules — Logic for managing or closing the position
Multiple templates can coexist in a strategy to support diverse setups.
Use Cases for Multiple Position Templates
GreeksLab allows strategies to include multiple position templates, each operating independently. This enables advanced strategy design through diversification, conditional execution, and parallel testing.
1. Time-Based Diversification
Use different templates to enter trades at multiple times throughout the day.
- Template A: Morning Iron Condor entry at 9:31 AM
- Template B: Afternoon Put Credit Spread entry at 13:00 PM
This spreads out exposure across different market sessions.
2. Volatility-Based Logic
Use templates tailored to different volatility regimes.
- Template A: Aggressive short strangle when VIX > 20
- Template B: Conservative iron condor when VIX < 15
Entry conditions ensure only one activates depending on market volatility.
Position Template Components
1. Position Legs

Each leg represents one option contract. The configuration includes:
- Leg Name — Descriptive identifier
- Ratio — Contract quantity (relative to base position size)
- Action — LONG or SHORT
- Right — CALL or PUT
- Selector — How to choose the option
Selector Types:
- Delta: Select option with specific delta (e.g., 16 delta put)
- Strike Offset from ATM: Number of strikes above/below at-the-money
- % OTM: Percentage out-of-the-money
- Fixed Premium: Select option with specific premium amount
Linked Legs:
Create spreads by linking legs relative to a “parent” leg:
- Strike Offset from Parent: Number of strikes away from parent leg
- Delta Offset from Parent: Delta distance from parent leg
Linked legs are useful for creating spreads like iron condors, butterflies, etc.
2. Entry Rules

Entry rules determine when a position is opened. Each consists of:
- Name
- Conditions
- Action: Always Open Position
- Includes Multiplier to scale leg sizes
You can have multiple entry rules, but only the first one that meets its conditions will execute for each position template.
3. Management Rules

Management rules govern what happens while a position is open.
Rule Components:
- Name
- Priority (top-down execution order)
- Conditions
- Actions:
- Close Position
- Close Legs
- Roll Leg
Multiple management rules can execute in the same interval and are processed in priority order.
Rules System Overview
Entry Rules vs. Management Rules
Feature | Entry Rules | Management Rules |
---|---|---|
Purpose | Open new positions | Manage existing positions |
Action Type | Open Position (only) | Close, Close Legs, or Roll |
Execution Limit | Only one per day | Multiple per position |
Priority Use | Resolves which rule executes | Defines execution order |
Evaluated When | If no position exists | Continuously when open |
Rule Priority
Rules are executed top-to-bottom based on order in the list. Priority is important, especially when:
- Multiple rules could trigger simultaneously
- Order of action matters (e.g., profit target before time exit)
Rules can be reordered via drag-and-drop.
Rule Conditions
Conditions determine when rules are triggered.
Condition Presets:
- Easy-to-use dropdowns
- Examples: Market Time, Fed Day, Position PnL
Custom Expressions:
- Advanced logic using mathematical expressions
- Combine variables with logical operators
- See Expression Guide
Rule Actions
Entry Rule Actions
- Open Position
- Multiplier — Scales position size
- Minimum Premium — Threshold to prevent low-return trades
Management Rule Actions
- Close Position — Close entire position or a percentage
- Close Legs — Close selected legs only
- Roll Leg — Adjust one leg based on:
- Leg to Roll: Which leg to adjust
- Roll Target: What to optimize (delta, strike, etc.)
- Target Expression: Mathematical goal for the roll
- Validation Constraints: Rules to prevent unwanted outcomes, such as inversion
- Max Executions: Maximum number of times roll action can be executed
Best Practices
Strategy Development Workflow
- Start simple: One template, basic rules
- Test incrementally: Add one rule at a time
- Use clear names: Helps track logic
- Document assumptions: Use strategy notes
Backtest Validation
- Cover multiple market regimes
- Include volatile and low-volatility periods
- Use realistic slippage and commission settings
- Avoid curve-fitting
Performance Optimization
- Use rule priority effectively
- Balance aggressiveness and risk
- Monitor interactions between templates
- Watch for overfitting to historical data
Next Steps
Explore advanced topics:
- Position Legs - Configure option legs and selection criteria
- Rules Overview - Build entry and management rules
- Actions Overview - Understand available position actions
- Backtest Settings - Set up realistic testing parameters
- Conditions List - Reference of all available conditions
Ready to build? Follow the Quick Start Guide for a hands-on walkthrough.