-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Futures handling / support #1299
-
Hello and thank you for your work on backtesting.py!
I wanted to ask if there are any plans to add full support for futures contracts and their key parameters.
While the current margin and leverage handling covers some use cases, realistic futures backtesting depends on several instrument-specific parameters, including:
Tick size and tick value: For correct pip/tick-based calculations and order sizing.
Initial/maintenance margin (as absolute currency values): With automatic margin call/liquidation logic.
Commission/slippage at the contract level: For accurate PnL when costs are specified per contract.
I'm backtesting a futures day trading strategy and I'm tweaking the trades dataframe to get the PnLs right, but I then have to manually calculate the stats.
Are there plans to add native support for these features?
Thank you for considering this request, I love this library!
Beta Was this translation helpful? Give feedback.