written by Sergey Tarassov
Trading Strategy Constructor module
Quantum Mechanics in 200 words
Quantum Mechanics was the highly demanded branch of physics in 20th century. The hypothesis proposed by Max Planck (1900) to describe some physical phenomena (black body radiation) made a revolution in physics compatible with Newton Laws discovered two centuries earlier.
In brief the Planck's hypothesis states that the energy of the light is always emitted or absorbed in discrete units. These units are called Quanta. This fact means that our Universe is built from smallest bricks; we live in the discrete World, and those bricks are used to build all apparent properties of this universe like mass-energy, time-space. For example the electrons spin around the nucleus on some discrete orbits. Applying this analogy to the Solar system, we can say that the Sun is a nucleus while Mercury, Venus, Earth and other planets play a role of electrons. As electrons, planets can spin on certain orbits only, and neither electrons nor planets can move between the orbits. However, electrons may move to the neighboring orbit absorbing or emitting huge amounts of energy. Theoretically, planets also can move to another orbits - if the way is found to increase the planetary speed accordingly. Without energy added or taken, electrons (as well as planets) keep going through the same orbits though some variations in speed make take place.
Quantum: Step following Trading Strategy
The question is can we find these bricks -quanta inside the financial data and can we use them? The common sense says NO. The bricks of Universe show themselves on the very very small scales; from the point of view of our macro World, these bricks of Universe are too small.
And I was very surprised several years ago finding with my friends a kind of quantum effect in financial data. This effect can be define this way: "in financial data quantum of a trend persists". In practice it means that the price movement can be presented as some step form like the one below, i.e. the price moves from one step to another. When the price moves within the step, it tends to continue moving in accordance with the current trend, while the most common changes in trend happen when the price jumps from one step to another:
Thus the trading strategy that implements this idea looks very simple: the trend changes when the quantum step occurs that confirms the opposite movement:
Here the price has moved seven steps in up trend direction; then on April,16 the downtrend step has appeared. This is a potential turning point.
This approach is very appealing for financial analysis because it allows to handle the market noise (I believe it does it better than standard Technical Analysis techniques such as moving averages).
There is no need to watch all noisy price history, instead we can deal with so called quantum moving average. Here is the example of it:
This quantum moving average is flat during significant period of time, and sometimes it switches from one price level to another (like the electron in the atom moving around its nucleus).
Thus, from the point of view of this quantum moving average, most of time the price does not change until something important happens. It (quantum MA) pays attention to the most important events and ignores market noise. When something important happens, the price switches to another price level.
What events are important? This is the most important question, see below some answers to it.
In example above we discussed the simplest case where the price movement was considered as a measure of quanta. The sample system may look like this - the price tends to change the trend when it jumps over the 100-point step. In other words, in this system we would watch price levels 10000, 10100, 10200, 10300 etc. The quanta here is 100-point price movement. In other words, the important events in this case coincide with the price moves of 100 points without correction. When the price moves 100 points without correction, the price switches to the next level in quantum moving average. If this movement is opposite to the previous movement, we consider this moment as a turning point.
However this direct approach does not work. So we tried to apply more sophisticated formula to calculate the quanta that describes the price movement more precisely. It can be taken as the amount of accumulated energy while the price moves from one step to another. We tried many variants looking for the parameter where the quantum nature of stock market movements becomes apparent (This idea is especially appealing to me as I have spent many years working as a scientist in Institute of Nuclear Research, Russian Academy of Sciences.). This approach totally changes the picture.
To verify these results I run Trading Strategy Constructor module in Timing Solution strategy. This module analyses different trading strategies that generate buy and sell signals and finds the best ones.
It is interesting that quantum based models provide the best buy/sell signals, especially for intraday data. We compared these strategies with moving averages crossovers strategies (double and triple moving averages).
The typical buy/sell signals generated by quantum model look like this:
Work in progress
This module is under development. We tried here applying dozens of quantum models that involve different parameters like volume, momentum, true range etc. These models generate different "step" curves. This is a sample:
We call these "step" curves as quantum moving averages. Then we construct trading strategies based on these quantum moving averages and watch what model provides the best trading strategy.
Now it becomes a classical problem of optimization of the parameters. Actually this is a very sophisticated task and our "know how" are brand new developed fast algorithms to performs these calculations. We have found algorithms that perform these calculations extremely fast, thousands times faster than under the standard approach.
Here is the screenshot of our typical workplace. Here is 5 min chart for e-Mini S&P futures since mid 2003 till mid of 2009 years, totally 121.000 bars. The program tries 1198 different trading strategies for this financial instrument. As you can see, the best trading strategies are provided by quantum models. For each model you can see statistic information, buy/sell signals and equity curve:
The program performs these calculations within several minutes!!!
May 9, 2010