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

Is commission calculated when entering and exiting a futures trade #888

Unanswered
Chris2L asked this question in Q&A
Discussion options

I would just like to confirm if the commissions are taken into account when entering and exiting a futures trade. According to Binance's FAQ, the commission (actually different for the market maker and market taker, and would be a nice feature to have) is taken when opening a contract and when closing a contract. Is this the same for other exchanges? For a worst-case analysis, should you just make the commission 2x of the market taker?

https://www.binance.com/en/support/faq/binance-futures-fee-structure-fee-calculations-360033544231

Thank you for the great library. It's been a lot of help getting my feet wet in trading strategies.

You must be logged in to vote

Replies: 3 comments 1 reply

Comment options

I have the same question. does the commission we set in Backtest() cause the fee to be applied once for entering and second time for exit? (since they are two different trades) or do you apply it only on exit/closing of position?

You must be logged in to vote
1 reply
Comment options

Also having fees in stat['_trades'] for each trade is very helpful

Comment options

You must be logged in to vote
0 replies
Comment options

From what I observed, the commission is only applied for entries, and it is actually more like spread instead of commission, because it adjusts the entry price by the commission value you set (see backtesting._Broker._adjusted_price) and only for entry price.

I think this PR #1119 makes more sense for the commission, @kernc can you take a look at it?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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