- ago
I get these error messages when using the SMAC Optimizer. In the first picture you see the error message and the settings for SMAC.

That's the error message when I got to the Preferences and Metrics Column

That´s the error message in Preferences and Favorite Metrics

Thanks for your help

4 Replies



- ago
Several comments. I wouldn't use more than 100 iterations until you get something working. I have mine set to 55.

I would keep the number of functions evaluations per iterations small. I have mine set to 3. I think the default is 1.

Now to answer your question. Obviously the optimizer is going into an infinite loop because one of your parameters is not allowing it to converge to a unique solution. Are all your parameters relevant to metric you're optimizing for? It's also possible that you have two highly correlated parameters that are fighting each other. For the latter, you need to permanently delete one of those two highly correlated parameters.

What I would do is start by unchecking the parameter check boxes in hopes of removing the offending parameter. Once that happens, the optimizer will work as expected.

In a numerical analysis package, we dump the correlation or covariant system matrix to identify row or column "effects" (perhaps one parameter isn't relevant at all), or to identify two highly correlated parameters that prevent the linear system solver from converging to a "unique solution" (i.e. the system matrix is singular). But you don't have a system matrix dumping feature here, so you just have to randomly remove parameters until it starts to work.

Look at your strategy and ask yourself:
1) Are there two parameters are are too much alike? Are they linearly independent? They need to be linearly independent; otherwise, this is what happens.
2) Are there any parameters that are irrelevant to what you're optimizing for (e.g. profit, APR, win rate)? All your parameters need to positively influence the metric you're trying to optimize for.

After you get it working, I would read Reply# 2 in topic https://www.wealth-lab.com/Discussion/Any-experience-with-Correlation-Optimization-visualizer-from-finantic-Optimizers-10242 for details on how to determine which parameters are most relevant so you can eliminate those that aren't.

By the way, there isn't any optimizer bug here. The optimizer is simply trying to say you have a parameter set that can't be optimized.
- ago
Many thanks to superticker for this nice answer.

Just let me add:
Your topic title "finantic SMAC Optimizer throws exceptions" is misleading here.

In fact you see an error message in red saying "could not find 30 parameter sets which return a finite result after 75 random runs..."

The SMAC optimizer starts its work by choosing parameter values randomly from the defined minimum .. maximum range of each parameter.

Explanation of Result
In your case it did it 75 times. less than 30 of these parameter sets resulted in any trades taken by your strategy.
At this point the optimizer stops because it assumes that something is wrong with the strategy or the parameter settings. There is not much sense in trying to get results if the strategy is not willing to deliver them in too many trials.

This can have several reasons:
* your strategy does not produce trades
* The parameter ranges are too wide, it is easy to get a parameter value which does not produce any trades
* There are too many parameters and many combinations of these parameters do not produce any trades.

If there are no trades the optimizer can not work, there is nothing to optimize.

Suggested Solution
So (like superticker) I'd suggest:
* start with one or two parameters
* start with a narrow parameter range with Minimum and Maximum values you're sure they work
* you may even use a small Exhaustive run to find working parameter ranges.

The exception shown may be a consequence of looking at results without trades. Simply don't do this.

I'll look into the software and try to find ways to make it behave more friendly if there are no trades.
- ago
[The optimizer tried] 75 times. less than 30 of these parameter sets resulted in any trades taken by your strategy.

Well, I didn't think of that. So his minimum/maximum parameter ranges are all set too wide.

I agree. He needs to take each parameter one-at-a-time and shrink its parameter range to insure he getting trades over most (if not all) of that intended range.
- ago
Thank you for your advice. I will World on the Parameters.