Different Sharpe Ratios for Multipass-Backtest and Quantiacs Mulipass Backtest
-
@support Hello, first of all. I As you can see in the picture I have a good sharpe Ratio but when submitted ,the strategy got rejected because the sharpe ratio is too low. If I assume there is no bug in your multipass backtest, the issue should be the statelessness of your backtester. I tried to correct the code and to my understanding it should be fine but I dont know, and if I only rely on getting the news after submission, I will miss the deadline. Could you therefore pls have a look at the notebook too and if it does not take too much time correct anything if possible. Thank you. Regards
-
This post is deleted! -
@kvanvanvant_test_python hey, thx a lot, will precheck it now. Doesnt multi-pass Backtest avoid looking into the future? Anyways, should be clear after precheck.
Regards -
-
@magenta-kabuto Unfortunately, even the strategy that got rejected due to a negative sharpe ratio, has the same ones as in the screenshot for 3 passes
-
@magenta-kabuto Sry to post again. Now I changed to 20 passes and suddenly the sharpe ratio went up and this is the strategy that got rejected. I am totally confused!
-
@magenta-kabuto 50 passes.....
-
Hello
I see that you are using precheck, this is the fastest way to check the strategy
https://github.com/quantiacs/toolbox/blob/main/qnt/precheck.ipynbif the strategy statistics are different, your algorithm looks into the future.
does your algorithm calculate the weights to trade every day?
or do you calculate all the weights using all the data in one pass and then use them for a specific date? like cache
-
@vyacheslav_b hey thx for your reply. Yes the strategy Sharpe ratio differs from the multipass backtest.
But Quantiacs says that multiple pass Backtesting avoids looking into the future, so I am confused.
The algorithm identifies certain patterns and only if those occur over a period of time, does it generate signals.
So it does not calculate weights to trade everyday -
@magenta-kabuto something like this, if this puts a bit light
-
Compare the two versions of the code.
def regime_trade(series): return "" def strategy(data): result = regime_trade(data) return result backtest(strategy=strategy)
in the first case, the available data for a specific date are used.
def regime_trade(series): return "" result = regime_trade(data) def strategy(data): return result backtest(strategy=strategy)
in the second case, all data is used.
I see that you have a very large Sharpe ratio, I think that you are using something similar to the second option.
-
@vyacheslav_b Hello again, thank you very much. Yes you are right.
Regards
Furqan -
@vyacheslav_b thank you!