algotrading-example icon indicating copy to clipboard operation
algotrading-example copied to clipboard

Trading Fees in Backtest.

Open chasemb opened this issue 5 years ago • 2 comments

How are trading fees calculated in your backtests?

When trades are closed, is it through a market order or limit? If limit, is there some sort of stop-loss in place?

Thanks.

chasemb avatar Nov 11 '21 16:11 chasemb

Please see predict_njit method in the notebook file.

In the backtest, a buy order price is set as less than or equal to the best bid, and a sell order price is set as greater than or equal to the best offer. But I conservatively applied the taker fee in the optimization and checked the results in both the maker fee and the taker fee configurations.

There is no stop-loss logic.

nkaz001 avatar Nov 12 '21 09:11 nkaz001

Ah, at first I was searching for the method and came up empty handed. I found it in your previous repo.

Any interest in running this thing live with some capital? We'd be very interested! chase (at) discovermedia (dot) com.

chasemb avatar Nov 17 '21 01:11 chasemb