Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Futures handling / support #1299

nicolaszabatta started this conversation in Ideas
Discussion options

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!

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /