Thursday, June 25, 2009

Timing Solution - Spectral analysis

Model "SPECTRUM"
In this article I will review the work of the Spektr module. This model is based on fixed cycles. To work effectively with them, the author recommends the use of daily price data, a depth of at least 2 years, although this model gives better results for the ten-year data. On the day the schedule is more than 3500 bars. The weakness of this model is that it is based on fixed cycles, and for an ideal result, these cycles should remain intact condition. In reality, however, invariable cycle is only in theory but in practice, their phases and periods are subject to constant change.

In one article Sergei Tarasov still cycles compared with the orchestra. "Still the cycles can be compared with the orchestra. Usually, he performs good music, but one of the musicians suddenly fell ill and a little son thought his father was now occupied by them, in the end we did not touch the violin at the moment, and as a consequence - to change ringing sound, etc. This case can be compared with the change in period for the fixed cycle. Another musician in the band dispersed, and often confuses the pages in a folder with notes. It may well begin to play Mozart's somewhere in the middle. The analogy shows is subjected to phase change. But in general, the musicians are there to perform the melody. "

Fig. 1 The phase shift through the forecast

Figure 1 shows how this situation is reflected in the line of projection. In the true picture of all time, made some adjustments. To detect such displacements (changes in the periods of cycles), the structure of cycles, it is desirable to check with the help of special tools Wavelet diagram. (Fig. 7) length of a still life-cycle embedded in the peculiarities of the cyclic model (John F. Ehlers, MESA and Trading Market Cycles). After the end of the cycles to change their frequency or disappear. The phases of these cycles can make incredible leaps.

Fig. 2 The idea of predicting the motion in the

Behavioral diagram (Fig. 2) means that we analyze the historical price data, then create a model for the fixed cycles, we check it for stability and further results are used in prediction. For example, I will work with the daily schedule of EURUSD (historical data from 07.04.1989 to 06.05.2005 is 4178 bars, or 16 years). And so it begins with a purpose. We must clear himself represented the end result (Fig. 2) forecasting the line and what we have to decide to do so.

Objective: Get to the afternoon schedule EURUSD predictive line with the horizon in the future on Upcoming two months (May, June) and calendar trading signal buy / sell.

Objectives:
1. Using the Spektr module to get periodogrammu price data selected currency pair.
2. Using "Active charts to choose the working cycles, which can develop further in the next 2 months.
3. Make pre-selected for further cycles of learning Neural networks.
4. Using the module "Neural Net" to select the projection target indicator. Set the time indicator.
5. Set the options for the training of the network.
6. Train the neural networks and to obtain predictive line.
7. By using the editor buy / sell trading signals to obtain the projected area (May, June).

Before an assignment I prepared for example, two drawings from the sinusoid patterns are different time periods. Fig. 3 shows a sinusoid with period 30, as in Fig.4 with a period of 60 and 90. In Fig.3, after computing cycles in the main window appears periodogramma sinusoids with a period of 30, one large peak. With this cycle in the list of "Identified cycles"

Fig.3 Periodogramma sinsoidy with a period of 30

You can look at the "active figure" to visually see how this cycle. In this example, throughout the series chart was red, it means that the cycle for the entire history of excellent work, and will work in future with high probability. In the upper right corner of the figure shows the Wavelet diagram, which for the Y-axis was the horizontal line period cycle of 30 and a broad red stripe on the timeline axis X, which indicates a strong and sustainable cycle.

Now look at Fig. 4 which depicts all the charts for the harmonics with a period of 60 and 90. In the main window is now available, two-cycle and an active figure resembles a washboard. Stability and strength of the cycle with a period of 60 is not constant and Wavelet diagram that shows the variability in detail. After consideration of kachastve example, artificial harmonics (Fig. 3 and 4), one can begin to build a predictive line daily schedule EURUSD.

Step 1: At this point, the program calculates the most part of the cycle and displays them in the main window of the module. These are the cycles of the program found for currency pair EURUSD: 34 / 47 / 75 / 96 / 130 / 167 / 190 / 237 / 262 / 322.

These cycles are translated from the visual to the numeric format and displayed in the lower left window, "revealed cycles"

Step 2: Using the "Active diagrams"

Fig.4 Periodogramma sinusoids with a period of 60 and 90

Fig.5 Periodogramma EURUSD

consider the cycles of history and the possibility of using them for predictions. To be able to browse through all cycles, I combined them into one image (Fig. 6). Figure watch between 2005 and choose the courses that imeeyut red, and the brighter the better. Not hard to notice that the cycles, with their distinctive red color of this year no, but there are a few weak harmonics workers, who are this year pale in color. This indicates that we are approaching the emergence of new cycles, or the active inclusion of older, taking into account the new basic data.

Fig.6 Active Chart cycles

Fig. 7 presents wavelet diagram, which is a detailed pattern of price data EURUSD. In this diagram, you can consider any period of the cycle by selecting it on the scale between Y and see his work on the axis X. If Fig.6 reduced to small sizes, we get rough rice. 7.

Fig.7 Wavelet diagram

Step 3: At the overtonami (broken down cycle), the selected cycles are placed in the "final list of cycles (in the lower right corner of Fig.11).

I will create two models of Neural networks, so in the first model to login Neural networks would cast all the loops, and second only to a selected. This will allow the watch to the new data, which model would be better and more sustainable. I chose the following cycles: 46.9 (low) / 74.5 (good) / 130 (very weak) / 190 (weak) / 322 (weak).

Step 4: trobats loops ready for use as a basis in the event module Neural Net (Fig.11). In this example, I will create a forecast for the oscillator, which is calculated by the formula: (Close - MA (Close, Period = 55)) / MA (Close, Period = 55). This indicator is chosen button Out / EXIT Button Input / input allows the paste from the clipboard transformed data cycles (Fig. 9).

Step 5: In this example, I use the default settings Neural networks, which can be seen in Fig. 8 and change them to better those who are good friends with the theory of neural networks.

Step 6: When you click "teach" the neural network training begins. But immediately the question arises: when to stop training? Manage the process of learning Neural networks can help an information panel Neural Net (Fig.8). Its essential function - visualization processes: we have an opportunity to see how well the currently forecast line corresponds to the price. To stop the learning process, press STOP (Fig.8).

Fig. 8 Stop Learning

When clicking on this button, or understand where to find this very "stopping point"? Much depends on the parameters set by our Neural networks (in other words, the fact that we downloaded at the entrance and exit), and the price data that we analyze. Here there are no rules. There are only general recommendations, when to stop the training process. Click "Stop", if you match these two conditions are met:

1) you see a good correlation between the line of projection and price data in the training interval (cyan region);
2) Line prediction correlates well with price data and the test interval (purple region).

You can also use certain settings for the program itself to determine when to stop learning Neural networks. Click Stop; activate the option "Stop when" (Fig.8). Got 2 from the forecast (see Figure 10). For red

Fig. 9 Module Neural Net


line to the log file all the harmonics, while for the blue line just selected. I would like to draw your attention to the fact that neural networks can see only the data up to March 01, 2005, and it is desirable to recalculate every month, taking into account the new price data received or after the apparent discrepancy rates and projection.

Step 7: The final step, I look through the list of transactions editor of trading signals. In the example, I got two lines pognoza, so the two transactions, the schedule (see Figure 10). For the red line in the upper right corner, while the blue line to the projection in the lower right corner.

The forecast in the light of recent price data
Well, that during the writing of this publication in the market place severe price changes under the influence of fundamental factors, so I had to make new models in the light of recent data. Fig. 10 illustrates the two projection lines, which were built on the data to 01 March 2005, as in Fig. 12 Three Neural networks based on data up to 13 May 2005. Transactions for each model are shown on the left side of the image, border color indicates what lines are the prediction of trading signals.

A comparison shows that the projected line on fig.10 and fig. 12 do not coincide and, consequently, different trading signals. Consequently, the question arises: Which version of the projection used for commercial transactions? To this end, the program module is Back Testing, which allows you to check the model for sustainability in the future. The next publication will be devoted to this module.

Now I want to go back to the latest published fundamental data for May month. Euro Exchange on strong data on employment (NFP), a sharp reduction in the trade deficit and an increase in retail sales in the United States, the sample, a significant support at 1.2870. It was at this point might be expected completion of the formation of the E wave triangle, but now the picture under the influence of fundamental factors greatly changed in favor of the dollar, but if you look at нейросетевой prediction, all 3 models are in the transaction Buy (12.05.05 - 1.2679 at selected cycles ; 11.05.05 - 1.2805 in all cycles). To test

Fig. 11 List of the selected cycles and converted

Fig.12 Projections from 12 in the light of recent data

Neural networks input data for the current forecast takes time, and how he executed depends on the time cycles, which include the work in the next two months. And now, I print out this page with the latest forecasts and trading signals, and paste into your treydersky dnevnichok. To get this program you can download a demo version on the website: http://www.fx.winm.ru/ts.htm



Prepared by Vladislav Antonov (A_Vlad), analyst Viac
email: a_vlad@viac.ru

No comments:

Post a Comment