Hi all. I can’t understand why my algorithm loses. I’m doing a bollinger band strategy on a lookback of 25 days.
I tested the strategy on the pair zrx_btc, with constant positions of 100 units of zrx.
The commissions and slippage are set to 0.
I have trouble analyzing the results:
The plot shows the first moves of the algorithm on a backtest, and I would like to focus on the first move:
Around minute 5 the algorithm enters a short position shown by the red triangle, and around minute 15 exits the same position. The price change is in my favor and again, there is no commission or slippage. Still, the cash and portfolio value indicators show that I am losing.
Also, you might see that the portfolio value goes in the expected direction until about minute 6 (price increase on a short position = decrease and vise versa) and I cant understand what causes it not to follow its intuitive path…
A more specific calculation:
On the red marker I buy a 100 units at price 9.87e-5, and sell a 100 units at price 9.85e-5. This means that even with commision of .1 percent of the transactions I’m supposed to be up 2*e-8!
What is going on?