Log in

Market States and Neural Net trading signals

The analyse of the market state can ve used to select the training range for the Neural Nets.

One of the concepts is to incluse different kind of market states and to try to generalize a solution. That we would do in the Elliotware approach we would select an Elliot wave pattern that would serve as a basis for the neural net training and testing.

So we can use the trend as the training period and save the best performing training on the correcting pattern.

As a general it is wise to allow 20-25 % of the data for validating the model.  

However according to the elliot wave theory there is an alternation between the corrective patterns, for example for the wave 2 it is usually a simple corrective pattern, and for the wave 4 it is usually a more complex corrective pattern. 

So in theory we would try to catch the following impulse wave as we can but we would not expect to work that good on the following corrective pattern. 

And for the bear markets the corrective patterns are more similar and we could expect a more robust solution for bear markets, as they usually are also characterized by lower entropy and larger Hurst exponent than the Bull markets.

Another approach is to use a market state and try to optimize the neural net to the current market state and hope that the market will not change much. It is difficult because the neural net very often does not perform very well at the very beginning it needs some time and during that time you do not know if it is going to work finally or not. 

Here on those models I was trying to select a relevant market state. Here it was ranging and volatile and trading and volatile. As those market states have some similarities it is possible to mix them, As you can see after the market state drifted somewhat, it looks like the frequency of the cycles has changed, however the neural nets were succesfull. 

The inputs here are not very relevant, the inputs were completely different for the different neural nets. For the first two neural nets I was using digital filters from the jurik family of digital filters. For the third and the fourt I used 4 Daubechies Wavelets, letting the genetic algorythm to choose the windows exponent and the number of wavelts.

For the the fourth (bottom) I used 2 inputs:

(1) classification algorythm that uses 4 Daubechies Wavelets

(2) hurst exponent

As they say when you have nothing to write about you compare trading systems. But here what I mean is that even if the algorythms are very different the results were quiet close. By the way even if you use the same algorythm with the exactly same architecture, with exactly the same training and validating set the results in this software will vary. 

 

image
От 08 ноември 2011

Comments

  • JohnLast 2839 days ago

    The grey bars are indicating the sample that is used for training. 

    The green bars are the out of sample results. 

  • JohnLast 2828 days ago

    Here I would like to give the results several days later for the same neural networks, how they perform.

    First on 1 h chart I will show from where started the current market state. And how that was used to train the panel of neural nets.

    If you feel out of tune for the last month with the market, do not have a doubt, that is because the market state right now is different. You can look for fundamental reasons why that is happening, but it is what it is. Look on the chart the current market state, it is completely different from what we had several months ago. I may say it looks like the market state we had in August 2011.

     

    image
    От Technical Analysis

     

    You can comprare the current market state with the market state of July and August. There are some similarities indeed. And that market state is completely different from the clear trend market state we had in the last months of 2011.

     

    image
    От Technical Analysis

     

    And finally you can see how the neural nets that were trained for the specific market state performed quiet well undor those market conditions. Only one neural net was not profitable, but it was profitable at the very beginning. 

    In fact as the market is chaotic every meural net is loosing predictive power with the time, the more chaotic is the market the more predictive power it is loosing. And as you can see here the neural nets were trained only once at most of the tests here is out of sample (the green bars). 

     

     

    image
    От Technical Analysis

     

    1. Neural net: 4 JJMA inputs with lag

    1 yr return on account

    Optimizing    270.6%

    Trading       67.6%

    profit factor

    Optimizing    0.0

    Trading       8.22

    profitable trades

    Optimizing   100%

    Trading       87.5%


    2. Neural net: 4 JJMA inputs

    1 yr return on account

    Optimizing    297.5%

    Trading       17.1%

    profit factor

    Optimizing    46.67

    Trading       1.24

    profitable trades

    Optimizing   92.3%

    Trading       42.1%

    3. Neural net:  4 Daubechies Wavelets as inputs

    1 yr return on account

    Optimizing    393.1%

    Trading       -18.6%

    profit factor

    Optimizing    66.35

    Trading       0.58

    profitable trades

    Optimizing   91.7%

    Trading       60.0%

    4. Neural net: Classification algorythm that uses 4 Daubechies Wavelets

    1 yr return on account

    Optimizing    313.1%

    Trading       12.2%

    profit factor

    Optimizing    0.0

    Trading       1.40

    profitable trades

    Optimizing   100%

    Trading       50.0%

  • JohnLast 2827 days ago

    Just to precise the Software used here is Neuroshell Daytrader.