Futures handling / support #1299
nicolaszabatta
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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.
All reactions