Backtest leveraged futures strategies
Review perpetual markets, isolated entry margin, liquidation, funding and limits before interpreting a leveraged simulation.
Before you start
Choose a perpetual market before applying leverage. More notional exposure changes risk as well as return. The engine uses isolated entry margin and simulated liquidation rules; this is not an exchange's full margin system. Check the futures reference for the exact current behavior.
Follow the workflow
- Confirm the market is a perpetual and record its identity; do not compare spot candles with an unrelated execution instrument.
- Record leverage, initial capital, entry sizing, fees and funding. Leverage 1 has no simulated liquidation in this model.
- Inspect each entry lot when pyramiding. Lots have their own locked margin and liquidation thresholds, rather than borrowing arbitrary unused account cash.
- For partial exits, inspect the remaining quantity and released margin. Oldest lots close first, with the associated costs allocated proportionally.
- Review Notes and rejected combinations before interpreting the result or moving to a robot.
Worked example
Open the SMA example, select an available perpetual market and first run it at leverage 1. If the configuration permits another leverage, change that single setting and inspect drawdown, fees and liquidation events. Do not compare headline returns without comparing exposure.
Limits and interpretation
Supported historical configurations do not imply the same Live robot support. Leveraged lots and priced order combinations have explicit restrictions; a leveraged priced strategy.order is rejected. Funding and an OHLC liquidation model cannot reproduce every exchange's maintenance margin, order book or execution sequence. Review cost assumptions and Dry run versus Live separately.