- ago
Hello,

I have an example strategy that uses weighting and a simple multiplication modifier which always produces one particular result of trades. It is a rotational strategy and only picks the top X stocks per week based on weighting. When I run the backtest with the multiplication value at 1.5, for example, it gives me an APR of 84.06%. If I run an exhaustive optimization from 1.5 through 2 at 0.05 intervals the optimzied value at 1.5 varies significantly (34.54% APR). However, if I just run 1.5 through the optimizer tool it matches the APR shown correctly.







0
548
Solved
3 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
... run an exhaustive optimization from 1.5 through 2 at 0.05 intervals the optimized [APR] value at 1.5 varies significantly ...

I agree; the APR value is varying more than it should. Are you using the Backtester.Cache[...] to save your shared variables between execution thread instances?

What I would do is try using the non-parallel exhaustive optimizer to see if this APR variation goes away. If it does, then you have a thread collision problem with your shared ranking variables, which need to be stored in Backtester.Cache[...]. You can read more about fixing that here. https://www.wealth-lab.com/Discussion/Bogus-optimization-Profit-column-in-Tabular-table-7189
2
Best Answer
- ago
#2
Worked great, thank you. I will incorporate the Backtester.Cache[] as well moving forward.
1
- ago
#3
@eralbanese
It's even a FAQ now: "Why my backtest and optimization results don't match? Why exhaustive optimization may return unexpected results?"
2

Reply

Bookmark

Sort