- ago
Hi,
Spending week-end working on using Exhaustive optimizer.
Have found this: https://wealth-lab.com/Discussion/Backtest-and-Optimization-Results-Don-39-t-Match-6718

Constructor > Backtestbegin > Initialize is the order of method calls I see.
Constructor - setting Paramters.
Backtestbegin - Parmeters are incrementing as expected (using AssignExplicitValues(double), Have tried Backtester.Cache["UserData"] as in the example
Initially used PreExecute like in the example but I am calculating all my buy sell signals for each set of parameters in Initialize.
Initialize - I am generating a TimeSeries of buy/sell signals and have tried storing them in Backtester.Cache["UserData"] as key, TimeSeries. Each time I do that the Cache increases to one entry.
In Execure I have tired:
CODE:
(Dictionary<string, TimeSeries>) userData = (Dictionary<string, TimeSeries>)Backtester.Cache["UserData"]; TimeSeries listSignals = userData[key];

When the code goes back to get the next set of parameters to process, the cache is reset to Count=0. I just don't seem to be able to keep the data for execute to work on.
Do you have any other examples of Exhaustive strategies, I have run public IndicatorRank() successfully.
I am lost so any help would be appreciated, also running out of time on the trial.
Thanks.
0
87
Solved
1 Answers

Reply

Bookmark

Sort
- ago
#1
The optimizer can run in parallel, so each run gets its own Backtester instance.
0
Best Answer

Reply

Bookmark

Sort