## Monday, December 5, 2016

### Testing and Analysis of Algorithmic Trading Strategies in MATLAB (Part 3) – Visualisation of Process

Continuing Part 2 of the discussion of problems and solutions in testing and analysis of algorithmic trading strategy in MATLAB, I invite you to read this post about problem of unavailability of visualisation of the processes in modern software solutions for testing trading systems.

## Visualisation of Testing Process

In my work experience, I often analysed other popular platforms for trading strategy testing, such as TradeStation, MetaStock, Multicharts etc. and I was always surprised at how little attention was paid to visualisation of the testing process. The thing is that when we don't see the results of the intermediate, sub-optimal values of optimised parameters, we often throw away gold along with the dirt. The matter is because of an overly broad sampling, the strategy adjusts the parameters the way we either see a "perfect strategy" which fails in real life or see one or two deals, which are supposedly the best because it was selected such time interval data where the best trading strategy would be "buy-and-hold", but why are then other strategies necessary for?

 Visualisation of trading strategy testing process in MATLAB (proposed in webinar)

As a result, without seeing intermediate results, we need to «blindly» change the parameters to try to get the better data; or watch it in some 3D or 4D (colour is the 4th dimension), as proposed in webinars. The analysis of values in the N-dimensional spaces can definitely be an alternative, but has several limitations:

• What if there are more than 4 dimensions?
• When you see what signals and at what frequency they appear in the price range, you have almost all the necessary visual representation of your strategy: the frequency of the transactions, their profitability (income curve), the accuracy of opening, the similarity with other suboptimal values, etc.; that cannot be said about the performance in N-dimensional space where all useful information is, in fact, that the optimum value is not only one but there is a whole range of suboptimal values in one or more areas.

While optimising a strategy in WFAToolbox – Walk-Forward Analysis Toolbox for MATLAB®, as a new optimum value is found, the trading strategy signals in the period in-sample and out-of-sample immediately appear on the chart, so you can always control what range of options you should assign, and also you can pause the optimisation without waiting for the end of test, as it becomes clear that something went wrong or everything is fine.