Different Sharpe Ratios for Multipass-Backtest and Quantiacs Mulipass Backtest
-
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!