Filtering out optimization results by up years

I would like to have Amibroker to list only the optimization results lines that have certain up year, for example, 2008, 2011, and 2018. Is this possible? (I know everything is possible with AB, I just do not know how to do it.)

Also, adding yearly performance tabs to each optimization line would be useful.

Thanks in advance.

Did you read the manual?

Just change the "RANGE" in the Analysis to desired period and run Optimization.
The results will represent given range.

Or you can do walk-forward test Walk-forward testing and optimization

which essentially can run optimizations for subsequent years year by year.

Thank you Tomasz, for the quick reply and all the answers, as always!

Yes, I know how to change the range. I was wondering whether this could be done programmatically. If you have 30 years of backtest and the strategy holds positions for several years and you want the results of the optimization to be positive for certain years, programmatically, a good solution is possible.

You can run optimizations programmatically and change ranges using OLE interface

Also, as I wrote, walk-forward is designed to run optimizations for many years automatically stepping.

AFL itself when it is being run has already set range and data set and you can't change the dates since you were cutting the branch you are sitting on. Data are prepared BEFORE formula is run, so the Range must be set before AFL is run.

Thanks. Maybe I was not clear. I am not looking into running the optimization for certain years, but looking at the individual equity curve of each optimization step and filtering the results to display only those for which the equity is up in certain years. In other words, I am looking for a filter that will take each optimization step and display only those results that have positive returns during certain years. Maybe it can be done with a custom backtest and at least display the returns for each year, and then I could sort the output in Excel.

You can do anything in custom backtest. You can also create custom reports (see report charts folder). See how profit table is created by custom formula providing monthly and yearly gains already. This is all available out of the box in normal backtest report.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.