Analyzing the performance of an automated trading algorithm with data visualization

Data visualization is key for extracting conclusions fast in complex problems. This is a quick example of how to see if an algorithm is suitable for the task with two simple visualizations.

First, we have to see if the chosen variables and algorithm parameters are correlated. There are many ways to check for cross-correlation. One of the fastest ways is a cloud plot. As you can see there is a higher density in a certain direction. That means this configuration can lead to results.

 Next, we run a set of simulations that iterate through all the possible combinations of the algorithm parameters. In this study case, an automated trading algorithm, new data enters with each run. We use a 3d surface plot to represent the influence of the two parameters which are chosen as the most influential. This image has nothing to do with prices, although it may look like a stock market graph. It relates algorithm parameters to profit:

These results are quite interesting. The resulting surface looks like a mountain range. The height of the mountain represents profit if above the 0 level. Apart from simple profit or loss, what information does this shape give us about the algorithm?

It can be very profitable, but is inherently unstable. Note how the every profit peak is immediately surrounded by maximum loss valleys.

Since new data can take any value, and change with any speed, the dynamics of the data can change rapidly.  That means that the algorithm can work great under certain parameters, and the next minute, enter max loss.

This algorithm is risky in sideways markets that change rapidly, however, it can adapt well to trending markets by continuously adapting it’s optimum parameters.

Real-world testing in ETC/USD cryptocurrency market.