Yes. This feature is sometimes called "strategy optimizer". It cycles through all possible permutations of strategy parameters (such as the EMA length), runs the backtest for each permutation, and sorts the results according to some strategy performance metric (such as Sharpe ratio, Profit Factor, etc). In some implementations, you may also get to see the heat maps which indicate the clusters of parameters which yield favorable results. The purpose of such maps is to identify the regions of the parameter hyper-space which consistently outperform the other regions. You may also see some attempts to improve the (very long) brute force parameter search with something more efficient, like genetic algorithms, gradient ascent, and simulated annealing methods.
Heatmaps are interesting. Assuming the colors are correctly oriented using shade of dark red to dark green then the 3 d parameter space mimics the appearance of a miniature landscape, which at times might look like a foreign world like a terrarium might look, perhaps on a distant planet, where living creatures are different from humans and their constrained pets, at least of the type which would roam a terrarium ..would live and thrive on some portions of the landscape. Heatmaps can be somewhat amusing and definitely beneficial because after including commission and slippage the average viable concept is typically at best only bordering on breakeven within the wide plateaus which are the fascinating areas indicating stability across a wider selection of values or permutations of a single concept. It's easy to daydream while viewing these barely green plateaus, of all the traders farming these plateaus, as tho they are driving tractors, which are clipping the green crops which are trying to grow above the surface of breakeven...as quickly as those parameter combinations poke there green shoots upward, high enough above breakeven to make harvesting them feasible relative to the ever present risk of the plateau deteriorating into either an unstable more hilly landscape or worse an area that's already being farmed so heavily none of the values exceed breakeven. The spikes have their own unique appeal. Note I'm obviously referring to 3-D heat maps, which I've already said, and should be clear based on my descriptions. Heatmaps which display the optimization results of only 2 inputs at a time, across a large selection of parameter values for each input. Most strategies have more than 2 inputs. One workaround to the inability to display more than 3-D maps I haven't as of yet developed but it would involve cycling a 3-D chart thru several consecutive different combinations of inputs, that I believe would be akin to clicking on an excel tab to transition to a page which displayed the next pair of inputs. Ideally, and this may be hard to grasp, there would be an automated hill climbing algo which would select the largest, tall but yet flat green parameter's center location automatically, as the algo cycled thru each pair of inputs, before fixing those values as permanent and proceeding to the next excel tab or page where the next pair of inputs would be displayed in combination with the previously mentioned most optimal parameters from the previous pair of inputs which have been fixed and are not being optimized. Generally speaking, this solution is considered inferior to optimizing all the inputs simultaneously. However, I believe the deviation I described, whereby the center of the largest plateau is selected and fixed before moving on to the next pair of inputs could reveal interesting sub strategies or viable concepts worth further research. Of course hill climbing algos exist which already do this but what I'm visualizing is a graphic representation of a the optimization process which I can replay like a video so I can view the separate excel pages being turned as each pair of inputs, best plateau is selected and fixed before the algo moves to the next pair of 3-D inputs. The difference is I'm not interested in the final N-D optimization results which the unseeing eyes of the algo are seeking to optimize. Instead I want to see with my human eyes a video which I think even I with my disdain for excel could create via a macro which displayed a single 3-D heatmap chart which cycled thru each page of "multiple" single 3-D heatmaps, which each single heatmap has progressively fixed the values selected from the previous single pair of inputs. I believe this has weaknesses but imo and limited experience, it's the nearest I've come to a solution for visualizing a greater than 3-D heatmap, because it would be a series of 3-D heatmaps selected in sequence and cycled thru within the current chart every nn seconds which could be speeded up or slowed down. I believe human discretion is an edge, and this is a viable way to deploy my discretion, within a constrained and safe environment, where my discretion can locate pockets of opportunity the strongest algos are missing, because they're not stopping and lingering on the meaning behind why any particular specific combination of optimal results, or 'layer' of multiple optimal 'combinations' of particular specific combinations ...............is or isn't viable. Algos aren't smart enough to approach numbers from the laid back philosophical view humans can. At best, genetic algos, in my limited understanding of them, can only mimic human intelligent insight into the concepts driving viable results via their brute strength which surpasses humans computational ability. And GA must rely on our human skills for preprocessing the data and pointing the GA toward which measures of price action movement should be considered. Tho it might seem GA's are free to find their own path and learn how to think on their own, it's my understanding they will always be constrained by the values we feed it with OHLC being the obvious unprocessed data and averages being the 1st layer of preprocessed data where GA's aren't aware of the concept of averages prior to a human preprocessing and informing the GA averages are one of the forms of data to be considered.
You have a vivid imagination. In practice, the optimization heat maps look quite prosaic, as shown below.
That's a picture of a 2-D flat view, of something I'm unable to discern. The heat maps I'm referring to are true 3-D with the point of view altered to be slightly skewed from a straight on view from either axis. An Architect would refer to it as a 3-D rendering (of a house) rather than a 2-D straight on, plan or elevation view. In practice 3-D excel templates exist for plotting the parameter optimization results of 2 inputs simultaneously in 3-D form where the numbers come alive and it doesn't require much imagination to see what I described. As to how to locate those templates that delve beyond what might occur in causal conversation. What possible value could be gained having competitors accessing them? I was fortunate to locate an excel template like I speak of approximately 20 years ago, when someone discussing the subject posted it to the net. I think he made a mistake in doing so, and I similarly believe my discussion of them is nearly as inappropriate. I'm quite busy and likely won't have time to participate here for awhile, even for casual lurking and reading but I wanted to leave some small indication that a world of ideas exists beyond the realms commonly considered...and hope this encourages others to share.
Let's say that you designed a simple MA-crossover system. Something along the lines of, "if 16-day moving average is above the 48-day moving average, then go long; otherwise go short". The next obvious thing is to ask, "Why 16-day and 48-day moving averages, and not some other length?" So, you run a strategy optimizer with 2 parameters: first moving average, and second moving average. You let these parameters take any value from 1 to 100. This gives you 100 * 100 = 10,000 different strategies to backtest. Once you have the results of these 10,000 backtested strategies, you may be interested in visualizing these results. One way of doing it is to construct a heat map, where X-axis represents the first parameter, Y-axis represents the second parameter, and the color represents the relative profitability of a given combination of the first and second parameters. This is what you see in the optimization map attached in my previous post. This is not for the MA-crossover strategy, but the idea of construction is the same.
I cannot understand why a SMA/EMA of X would "work". It doesn't seem to have any sort of predictive capacity. What's the theory here?
It doesn't work. Only on the price chart, not n real markets does it work. Fooled by randomness comes to mind. surf