15.11.2010 г.

Curve fitting or optimization: Statistical versus Phenomenological optimization




When we try to optimize using an optimization algorithm are we doing curve fitting and our model is it going to work in the future?

This is a major problem, there are authors that suggest when we test our system for a long period we should not change its parameters anymore. Others prefer to optimize everyday the parameter of the system.

Where is the truth?

I will try to see the things under other perspective. When we try to optimize a system, we are doing basically a statistical optimization. We optimize return on account, maximum winners, Profit/Loss ratio etc. And we optimize statistically with an algorithm the system.
So how robust are the results when they face the real markets. Well, this is tough question.
Sometimes it works, sometimes it does not. That is the reality.

On the other hand not testing a strategy is suicidal. Some authors state that they limit the variables of the system so the over-fitting is less probable concentrating on the most important things like trend direction and support and resistance zones.

Statistical versus Phenomenological optimization

Phenomenological Theory. A theory which expresses mathematically the results of observed phenomena without paying detailed attention to their fundamental significance

With this kind of optimization we choose to have not one system for all market conditions but some systems phenomenologically optimized for a certain condition.

And we need some criteria to switch between the systems. The Fractal dimension graph index is an useful tool in the phenomenological approach.

For example we can use one system when we have antipersitent fractal characteristics and another when the characteristics of the price are persistent. In fact the adaptive robots are a hype, when they know when to stop trading a particular strategy and when they start again.

6.11.2010 г.

Chart patterns or Chaos attractors?

All the chart patterns can be analyzed as attractors.

That is a modern explanation of the chart patterns that make sense. I will give a definition of an attractor using the Wikipedia. The problem is that the traders do not understand the science of chaos, and the scientists do not understand the trading. As for me I do not understand them both but I will try my best.

An attractor is a set towards which dynamical evolves over time. That is, points that get close enough to the attractor remain close even if slightly disturbed. Geometrically, an attractor can be a point, a curve, a manifold, or even a complicated set with a fractal structure known as a strange attractor. Describing the attractors of chaotic dynamical systems has been one of the achievements of chaos theory.

Please read this short article in the Wikipedia

What is important is that "A dynamical system is generally described by one or more differential or difference equations. The equations of a given dynamic system specify its behavior over any given short period of time. To determine the system's behavior for a longer period, it is necessary to integrate the equations, either through analytical means or through iteration, often with the aid of computers."

And The Fibonacci numbers are defined using the linear recurrence relation. And they can be helfull in the analysis.

According to my analysis the chart patterns can be analyzed as chaotic attractors.

Fixed points: In a trend environment, Higher highs, or lower lows, does it look familiar

Limit cycle: Oscillating price patterns: In fact all the technical analysis chart patterns are in this category: Triangles, Wedges, Harmonic patterns etc.

Limit tori: Complex patterns. It is arguable if they are a part of the technical analysis.
maybe the Elliott Wave Sequence may be close, but I am not sure.

Strange attractors: are not part of the technical analysis. Of course the Elliott wave theoreticians claim that they can predict a lot but their instruments are not adapted to the this task. Moreover those attractors are not necessary for trading, it is better to use lower order attractors for trading.

What is important that the price in the Forex markets are not in the void. They are in a phase space.

The phase space is a space in which all possible states of a system are represented, with each possible state of the system corresponding to one unique point in the phase space. For mechanical systems, the phase space usually consists of all possible values of position and momentum variables.


For example the daily volatility can be analyzed in practice as a phase space of the price time series for the day. Of course as according to the hypothesis that the distribution is not normal but stable paretian with infinite variance this does not holds true, but is an useful practical approach (in fact we can detect in real time with the peaks of Hurst difference how and when the a powerful shift occurs).

Sensitivity to initial conditions

Sensitivity to initial conditions means that each point in such a system is arbitrarily closely approximated by other points with significantly different future trajectories. Thus, an arbitrarily small perturbation of the current trajectory may lead to significantly different future behavior.

In practice a powerful spike even it is corrected will influence the future price action and will set a new set of solutions. If a spike modifies the current phase space (current volatility) it is a signal that the system will be perturbed.

In practice we can analyze the beginning and the end of the market periods.

Let look what happened in the Euro.

For example when we had a powerful trend in September that state was set be the initial conditions. Unless they were not perturbed they set particular attractors that were working. In this case the trend was so simple that it was unbelievable how simple trading can be. But some people did not make money because they cannot believe that and countered the trend for a reversal.

After that Happened in October a break - out in the European session that was directed downwards. What did that mean? That means that the structure of the market has been perturbed. The market started to make another type of patterns: oscillating patterns.

In November this week a powerful shift and spike has occurred. This spike perturbed the structure of the chaotic attractors (cyclic type of patters with nice swings ). The subsequent break - out upwards was a part of the new structure and will participate in the new chaotic attractor that will emerge.

So we can analyze the price action as chaotic attractors in a particular phase space. What is important to know when a powerful shift in the structure occurs. We cannot know how, when, and why and that cannot be predicted. You can analyze that by your experience or you can use an algorithm (like this which is posted on this blog).

The most common errors that is made by the technicians is when a powerful shift in the structure occurs they try to use a pattern that was in force before.

That is a point when the complex neural net models fail, because they are used for a structure that is not anymore valid and a new structure is about to emerge.

This is just a theory guys and gals. But the calculation of the Hurst exponent showed a clear long term process in the markets. The lyapunov exponents calculations showed that even sometimes the processes are really not dissipative.

4.11.2010 г.

The phase of the digital filter







Here I add some shots to illustrate how the phase of a digital filter can make a difference in the trading signal.

The first shot has a phase of the signal +100
The second shot has a phase of the signal +5 (neutral)
The third shot has a phase of the signal -100

The degree of smoothing is 6.

2.11.2010 г.

Fringe Technical Analysis




I am a fan of Fringe. So that is why I can call those ideas as Fringe Technical Analysis. Fractal technical analysis does not sound good anyway.

So the fringe technical analysis covers all the unconventional and strange ideas and methods.

According to the dictionary it means:
something that is marginal, additional, or secondary to some activity, process, or subject

In the blog as a link has been developed some day trading strategies who do not depend on the classical notions of trend. Hey we do not need that stuff. What is important is if the price movement is persistent or anti-persistent and the volatility.