Strategy optimization time
Author: DenisPolezhaka
Creation Date: 3/21/2019 7:46 AM
profile picture

DenisPolezhaka

#1
When optimizing a strategy with the Exhaustive method on a period of 6 years with a time frame of 5 minutes, you must wait more than 420 days. Futures Si. Runs Required: 68625150. It’s unrealistic to wait 420 days for strategy optimization.
To optimize the above strategy, I have to use the “Genetic” method. It is not comfortable.
When using the “Genetic” optimization strategy described above, the optimization time is more than 1 hour. It is too long.
Forced to open multiple Wealth-Lab windows and simultaneously optimize multiple strategies or futures. So you have to save time. With this work, sometimes Wealth-Lab automatically closes all open windows and the optimization is forcibly terminated. It is necessary to optimize strategies from the very beginning.
As far as I know, Wealth-Lab uses 1 core to optimize strategies. Therefore, strategies have been optimized for so long.
I have a modern powerful new computer.
Please inform:
1. Is it possible to use all the power of the computer to optimize the strategy? The task is to reduce the optimization time.
2. Maybe some script is available to solve this problem?
3. Or is there any other solution?
I am not a programmer. Please respond in simple language and suggest a solution without programming knowledge.
profile picture

Eugene

#2
QUOTE:
It’s unrealistic to wait 420 days for strategy optimization.

What is unrealistic here is to believe that your optimization of an intraday strategy over a period of 6 years would lead to anything but over-optimizing. What you'll end up is almost certainly curve-fitting. If you wish to produce meaningful results then you might want to consider reducing the number of strategy parameters to optimize, the optimization step, choose a shorter optimization period etc (see the FAQ link below).

QUOTE:
When using the “Genetic” optimization strategy described above, the optimization time is more than 1 hour. It is too long.

If 1 hour per optimization is too long then you might want to lay out and roll your own, faster optimization method. ;-) Which requires advanced development skills, of course.

QUOTE:
With this work, sometimes Wealth-Lab automatically closes all open windows and the optimization is forcibly terminated

Please note that multiple optimizations are not supported by Wealth-Lab and may lead to out of memory conditions, program freeze or lockup etc.

QUOTE:
I am not a programmer. Please respond in simple language and suggest a solution without programming knowledge.

Sure, check out the Wealth-Lab Wiki FAQ | Strategies and WealthScript > Optimization is slow and takes much time. Is it possible to speed up?
profile picture

superticker

#3
In addition to all the good suggestions above, I think the best overall optimizer (for both speed and results) is the Particle Swarm optimizer. Use the WL Extension Manager (under the Tool menu) to install it. It's somewhat more complex to setup, but it's worth the effort.

The Particle Swarm optimizer has many algorithm choices. I found the Clerc Basic(OEP 0) algorithm best for my strategies, but you need to have the right settings. See the screenshot attachment for the settings I use; your mileage may vary. The other algorithm to try is Clerc Tribes.

I wouldn't set the Data Range to optimize beyond Fed policy changes because stocks behave so much different between changes. They started to raise interest rates in 2015, so optimizing beyond that doesn't make sense. They just (1st quarter, 2019) had another change to hold interest rates more study, so that will have a dramatic affect on stock behavior as well. I typically set my Data Range to 800 daily bars. If you're trading with 5-minute bars, then set it to 1000 5-minute bars and expect some surprises.
profile picture

Eugene

#4
QUOTE:
I think the best overall optimizer (for both speed and results) is the Particle Swarm optimizer

That's why it's in the Wiki FAQ ;-)
profile picture

Domintia-Carlos

#5
Hi!

I recommend checking our BTUtils for Wealth-Lab toolset that dramatically speeds up the backtests and optimizations in Wealth-Lab.

It implements a multithreaded simulator and runs simulations and optimizations in parallel, executing each symbol and/or each optimization step in an independent thread.

Carlos pérez
https://www.domintia.com
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).