Optimizing the forex trading system parameters: AUD/JPY

User Rating: / 4
PoorBest 
Written by Forex Automaton   
Friday, 17 April 2009 13:08
Article Index
Optimizing the forex trading system parameters: AUD/JPY
Optimizing the forecasting parameter
Optimizing the stop-loss parameter
Optimizing the entry and exit parameters
Summary of progress
All Pages

This is the first Forex Automaton™ report on the optimization of the automated forex trading system performance. The general introduction to the trading system optimization (back-testing) and a brief description of parameters have been posted before. As before, the nature of the forecasting engine and the meaning of the related parameters are intentionally left beyond the scope of the discussion. You will see however that even though money management alone can not turn bad trades into winning trades, the converse is possible. The combined experience of 13,398 simulated trading histories testifies that a trader can systematically lose money and effectively take extra risk mainly due to the incorrect (too tight) stop-loss placement, despite having the quality of insight equal to that of the winner. It is demonstrated that significant improvement in performance can be achieved by parameter adjustments, guided by an analysis of the simulated trading histories, and an example of reasoning behind such a process is given.

Analysis approach and the data set

It can not be overemphasized that for the analysis to be of any value, the algorithm may not trade the data used to train its decision making. Choosing a set of parameters on the basis of past performance is unavoidable in the end, but still smells of extrapolating the past performance. In the past, I looked simultaneously at the entire range of possible sets of parameters and evaluated the core decision-making algorithm as such by comparing performance of the exact same algorithm with the exact same sets of parameters on real data and the artificial data with deliberately eliminated predictability. A run of the program included simulations of trading histories of over 13,000 independent "virtual traders" (forex robots), each of them being an incarnation of the same algorithm, differing by the setting of the adjustable knobs. This report uses the same set of real and simulated markets (AUD/JPY on the day scale) and the same simulated trading runs as the one just mentioned.

Conditional projection distributions

The key technique of the analysis is the projection of the content of multidimensional space of parameters onto the sub-space of one or two dimensions that one can easily visualize. Mathematically, this is an averaging operation (a summation) involving all dimensions except for the ones being chosen for the visualization. The present version of the analysis code, written specifically for the task (and based on ROOT) allows one to apply cuts (logical conditions such as 1.< s< 2.) on the variables, handles complex cuts consisting of different conditions applied to different variables simultaneously, and allows one to plot the results produced with different cuts in the same figure. In a typical analysis session I begin by plotting return vs risk, create return vs parameter, risk vs parameter plots for all parameters under study. I continue by identifying strong dependencies, and selecting the parameter intervals resulting in desired outcomes, proceeding with more and more complex cuts and progressing from the parameters with more obvious to those with less obvious effects on the performance indicators. An alternate technique is to cut in the space of performance indicators and project onto the input parameter space. This must be supplemented by the reverse procedure: using the insights into what parameter values are good, gained by selecting the desired outcomes, one then cuts on the control parameters and hopes to see performance improved.

Profile histograms

A profile histogram provides an economic representation of two-dimensional (X vs Y) data. Unlike a two-dimensional histogram, the profile histogram is unbounded in the Y (vertical) dimension. Like any histogram, it has discrete bins along the X axis to aggregate the data. The data are represented graphically as a series of (X,Y) points on a plot, with the point position in Y corresponding to the mean and the vertical bars typically indicating the measure of the spread such as the RMS, or (the case here) the measure of the precision of the mean (larger bars correspond to less precision).

None of the projection techniques is perfect, since the reduction of information involved in all projections is not guaranteed to be "intelligent". But they do solve the problem, even though it is necessary to look from more than one point of view and try more than one path to optimization.



Last Updated ( Monday, 04 January 2010 12:37 )