ForexAutomaton 2012. The Fourth Annual Summary of Research Progress.

User Rating: / 3
PoorBest 
Written by Forex Automaton   
Sunday, 08 April 2012 15:00

Four years of ForexAutomaton's life are over. This year I have been busy starting a currency risk consulting company, along with two partners, therefore less than the usual amount of research content has been published here. Nonetheless, the automated systems -- Danica, Demi, and Heidi -- have been living their silicon-based lives as before, with little to no interference from their creator. This fourth annual report is dedicated entirely to news from their side.

Heidi. The intra-day seasonality effects.

Heidi is the prediction-only system operating on the hourly time scale publicly since August 11, 2010. In May of 2011, the system was upgraded to version 2, but the upgrade did not affect the forecasting concepts or parameters. A parameter upgrade was made on January 21, 2012. This affected just one of the seasonality windows (shaded in Fig.1).

Heidi forex trading system, figure of merit: degree of correlation between the predicted and real logarithmic price difference at the close of the hour, for the 8 intra-day time windows

Fig.1. Heidi's figure of merit: degree of correlation (Pearson correlation coefficient) between the predicted and real logarithmic price differences at the close of the hour, for the eight intra-day time windows.

Central Europe 123456789101112 13141516171819202122230
Eastern US 19202122230123456 789101112131415161718
intra-day time window 0 111 222 333 444 555 666 777 00

Table 1. Definition of intra-day seasons and time zone conversion table. Seasonal time shifts, such as daylight saving time, may complicate the picture if the nations choose to enact them on different days, and are ignored.

Fig.1 compares Heidi's figure of merit at the moment of the last review and as of the end of March 2012. The data include back-testing data from March 16, 2011 through August 11, 2011.

Why is this figure of merit (Pearson correlation coefficient of logarithmic returns, predicted and actual) chosen and what does it mean?

Fechner's law in psychophyics states that subjective sensation is proportional to the logarithm of the stimulus intensity. The joy or pain of winning or losing money is certainly a sensation. Taking the view that Fechner's law holds with regard to financial gain and loss, the meaning of the quantity plotted in Fig.1 is the level of user's subjective enjoyment or suffering (logarithm of gain or loss) weighted by the capital allocated to each risky bet in proportion to the expected enjoyment (on the basis of the prediction), and normalized in such a way as to yield 1 when the subsequent reality matches the prediction perfectly every time.

Note that this interpretation ignores the subjective psychological differences between gain and loss. Also note that the purpose of this interpretation is to give the reader some intuitive feeling as to the nature of the quantity under study. Nothing in the study itself depends on whether there is or isn't such an interpretation; the correlation coefficient between the predicted and the actual changes in the level of the FX quote is a solid figure of merit on its own footing, allowing one to dissect the system building process into prediction and risk allocation parts. (For an example of a system that went through both stages in its design, see Demi below).

The time windows 2, 6 and 7 have statistically significant deviations of correlation coefficients from zero, while time window 3 is getting there. This is inconsistent with market efficiency hypothesis which would make you expect that performance of any kind of market timing system converges to zero with time. Out of these "inefficient" windows, window 2 and window 7 have significantly positive C(forecast,reality|close), indicating successful forecasting. The overall slightly negative performance of the model is dominated by the contribution of the single time window, time window 6 -- whose performance is also more stable than random, albeit negative.

The windows with are either hints of deviation or significant deviations from zero correspond to the morning hours in Japan and Central Europe, and morning hours in the US. There are no hints of such inefficiencies for windows 0, 4, and 5.

Demi. A winner, after all.

Demi's origin and design has been discussed in great detail in the previous Annual Report. In brif, the idea behind this system is this: knowing that our prediction for a change in daily high is correlated with the actual change, and knowing that the prediction for a change in daily low is correlated with the actual change, we bet on a coincidence of the successful predictions for these two changes. Note that the existence of such a coincidence is, strictly speaking, a separate matter from the individual successes of both types of predictions. What makes this better than gambling is positiveness of the fourth-order cumulant among the forecasts and real changes in both high and low. We bet on the coincidence by opening a trade with a stop-loss and a profit target. The stop loss and the profit target are the previous day's high and low, and the direction of the trade is long if today's low and high are expected to be above yesterday's; short if they are expected to be below yesterday's. Note the requirement of simultaneity: in a situation when high and low are expected to evolve in the opposite directions, a trade is not submitted.

The four instances of Demi, differing by the hour of the decision making (24-hour day definition) systems went live on August 25, 2010. In the following, the systems will be distinguished according to the hour of decision making during the day (the end and beginning of the day): 3, 5, 9 and 11 (all in the AM). System performance data presented below describe the situation as of March 31, 2012, seven months later. This should be compared with the respective section of the previous Annual Report, where these systems were reviewed for the first time with just seven months of real-life data.

Trading costs are simulated as bid-ask spread, with the spread being equal to a fixed fraction of price (see link for details about the simulation of the spread).

Table 2. Demi's historical performance as of March 31, 2012.

ID Capital (was 1 at the inception)Profit/loss in quote units, sum total since inception Profit/loss in quote units, average per trade 90-day return, per annum, % 180-day return, per annum, % 360-day return, per annum, % # trades # trades since going live
3 1.44 0.0727 2.07 × 10-4 13.1 -5.45 -0.951 351 72
5 1.21 0.115 3.06 × 10-4 -11.7 -7.88 -10.3 374 111
9 1.01 0.0124 3.30 × 10-5 25.4 3.22 -4.22 311 100
11 1.41 0.0250 7.78 × 10-5 15.1 31.2 29.8 321 88

Demi 3am, equity vs date2.1 Demi 5am, equity vs date2.2 Demi 9am, equity vs date2.3 Demi 11am, equity vs date2.4

Fig.2. Evolution of Demi's simulated equity with time. The moment of going live is marked by a vertical line. Time axis is labeled in MM-YY format. 2.1: 3am, 2.2: 5am, 2.3: 9am, 2.4: 11am strategy. At the moment of going live the first two strategies were believed to be working ones and the other two mere academic curiosities, given the trading costs. The only difference between the strategies is the definition of the 24-hour period to analyze. All strategies model trading costs realistic for a retail trader.

As Fig.2 shows, the difference in the definition of the 24-hour-long day, everything else being equal, creates dramatically different patterns of profit and loss. Before the system was launched, the 3am and 5am strategies looked potentially workable, while the 9am and 11am looked like artificial curiosities worth a closer look. Clearly, the system is in the positive territory for the year thanks to the 11am component.

Table 3. Demi's performance progress since the last annual report.

dateTotal capital (was 4 at the inception)Total profit/loss in quote units, sum total since inception
April 02, 2012 (this report) 5.07 0.225
March 25, 2011 (last report) 4.88 0.205

 To summarize, Table 3 gives a birds-eye picture of Demi's progress for the year since the last report. This is a sum total of capital under management and accumulated P&L in quote units over the four systms. Both statistics reflect trading costs, but the P&L in quote units is a much simpler statistic, not reflecting capital allocation decisions (leverage) which differ trade by trade. While the capital under management has grown by 4% year-on-year, the accumulated profit in quote units (pips) has grown by 10%.

Danica. The anti-system?

The Danica model has been making daily forecasts on this site for two years. When launching the model, I expected -- naively, as it turns out -- one of two outcomes: either the model would prove successful by generating a statistically significant, even if "small" (compared to unity which is the upper bound of the correlation coefficient), positive correlation with reality, in which case it would be declared a success -- or it would look statistically uncorrelated with reality, in which case it would be no better than a random number generator, with no merit as a forecasting tool.

The reality proved to be quite different from both of these scenarios.

Danica forex trading system. History of correlation between forecast and reality.

Fig.3. Correlation coefficient between the predicted and actual logarithmic difference in daily close, month by month, from 2010 through 2011, for the 14 exchange rates tracked by the Danica system. The bias of the system to produce forecasts which "oppose" the subsequent reality is seen graphically as the tendency of the bars to point downward.

In Fig.3, the correlation coefficient is the quantity given in the Danica monthly reports, and is, by our adapted standard, the Pearson correlation coefficient over the last 24 business days of the model's operation, as reported in the last forecast of the month. The important thing is that the values of such coefficient for the different months (the different bars in Fig.3) are statistically independent.

The actual outcome of the first two years of live operation of the system is neither of the two naively expected scenarios: the model is neither systematically right nor worthless. The model forecasts have recently been systematically opposite to what happens later in reality. They assumed this character, roughly speaking, in Spring 2010.

The data do not support the academic notion of an hypothetic efficient market as a source of mathematically random, symmetric gains and losses. The FX market, from Danica's point of view, seems to be a willful entity with meta-stable patterns of behaviour which are replaced by other meta-stable patterns. Here, a wave is just a particular kind of pattern.

The ability of the system to convert input (FX quote) data with no visible two-point correlation on the day scale (speaking about the direction of closing price), into a stream of output data (trading gain or loss) with visible positive auto-correlation (regadless of the sign of gain or loss itself) is an important achievement, as the problem becomes that of coming up with a transformation to change the broadly autocorrelated, even though stochastic and bipolar, quantity, into a positive one. One could think of some afterburner to Danica which would decide whether to treat Danica as a "system" or as an "antisystem" at this point in time. This is not as much complexity as it seems, as Danica itself has only one adjustable parameter (called "Fred") at this point, and we are probably talking about an extra one.

On April 1st, Danica was upgraded to version 1.3 which could be another way of improving the performance. In the previous versions, when the predicted close comes out to be above the predicted high, the system would not touch the high, but instead would adjust the close so that the adjusted close is half way between the original one and the high. Similar algorithm would be applied when the predicted close comes out to be below the predicted low. In version 1.3, in this situation, we pull down the predicted high so that it equals the close, or we pull up the predicted low so that it equals the close. The new way is more consistent with my present understanding of the relatively high prediction quality of daily extremes as a mundane phenomenon related to continuity of price in the diffusion process, as explained previously. There is no reason to treat information in the predicted close as inferior to that in the extremes, yet that is what took place before this upgrade. The relatively trivial, diffusion-driven predictability of the extremes could be effectively suppressing the subtler patterns of the daily close, by aligning daily close with one of the extremes in certain cases.

Bookmark with:

Deli.cio.us    Digg    reddit    Facebook    StumbleUpon    Newsvine
Last Updated ( Sunday, 14 April 2013 16:59 )