Trading Spectrum module
�2019 Trading Spectrum Timing Solution. All rights reserved.
written by Sergey Tarassov
Fast introduction for busy people
This is a brief explanation of this module. It shows only how to work with it. We recommend to read the whole article to understand its idea better.
This module works for EOD data. It may be applied for some intraday data, to 60 min at least, no less. It allows to build a forecast with the forecast horizon from several days up to one month.
Open Trading Spectrum module in TI section and click "Calculate Cycle" button there:
In some seconds (2-7 sec.) the arrows for uptrend and downtrend periods will appear. And these arrows are prolonged into the future suggesting a trading possibility:
The 70-days cycle is shown. It is calculated in a special way, so these up and down arrows repeat themselves every 70 calendar days. Since February we could observe 7 such patterns: 7 long trades (expecting up) and 7 short trades (expecting down market move). Only one trade here was losing, this one:
Once the cycle is found, please remember that it has been found for this financial instrument only. It may be different for different financial instruments, and it changes with the time for that same financial instrument. It is not surprising as now we know that there are no permanent cycles in finance.
Instead of one permanent cycle for all instruments, we can calculate tradable zones for any financial instrument that are changing with the time. The pattern that forms this cycle is changing as well. It may consist of only one arrow, as this up arrow shown below:
or two up arrows within 76.89 days cycle:
or two up and one down arrow like this:
Any pattern is possible. Also, there is a possibility when no tradable cycle could be found. We do not define a cycle to look for beforehand, the program finds it for us.
Let us get back to our first example with 7 up and 7 down arrows and only one losing trade. Be careful, it does not mean that you have 13/15 = 93% accuracy system, i.e. system that generates 93% winning trades. This is just the result of the optimization and a typical way how mathematicians may confuse traders. The high percentage here is expected. At this stage, we only explore a possibility of a tradable cycle.
WFA Expert: The next step is to get the best trading cyclical model for our chosen financial instrument. Each model has its own set of parameters; the quality of our forecast depends critically on these parameters. Here are the most important parameters:
1) Stock Memory - the most important parameter, it shows how many full cycles would be use for trading to verify our cycle. For example, consider SM=7 for analyzing 100-days cycle. We would need last 7x100=700 days of data to verify a tradability of this 100-days cycle. In other words,. we watch how this cycle would trade within the latest 700 days.
2) Scheme - it is the algorithm applied or the procedure that is used to reveal a cycle. By default (as in September 2019) we use Q-Spectrum.
3) Some schemes have additional parameters; for Q-Spectrum it is WFA sample size (WFA SZ), this is an important parameter as well.
So, to get the best model for our price chart, we need to find a proper combination of these parameters. We do that running WFA Expert system. Click this button:
It takes 1-5 hours of calculation, the program will conduct walk forward analysis (WFA) for dozens of different cyclical models. As a result, the program displays the equity curve for each of these models. Highlight any model to see the equity curve it produces:
Choose the model with best equity curve. We recommend choose the model with:
a) equally climbing equity curve without big drawdowns. Especially pay attention to the most recent years (the end of your data set). For example, the equity curve below looks good though for the latest year this system does not generate any profit:
b) the rate of winning trades; it should be 57% and higher
c) SQN (system quality number) 1.3-1.5 and higher
Walk Forward Analysis (WFA): after the model is selected in the previous step, we recommend to preview trading signals produced by that cyclical model, to see how it trades historically. Click this button:
In a few minuses the trading signals generated by this cyclical model will be shown:
These up/down arrows represent long/short trades recommended by this cyclical model. To make these arrows visible, set ON "WFA trades" option.
Final Forecast: now click this button:
We get future trading signal/signals together with the projection line:
Inverted Strategies: also pay attention, very often inverted models work better, like this one:
This model provides 37.4% winning trades with negative SQN -2.7. If we invert this model by clicking this button:
we get a very good equity curve with 62.7% of winning trades and big SQN value, equal to +2.7:
Now we can save this model into TS worksheet for further usage, it also saves into worksheet the list of backtested models in WFA expert.
If you have some time and are willing to learn more, please read this following article.
In the trap of harmonic analysis
Being a financial software developer for more than 20 years, I always feel uncomfortable explaining the importance of the projection line. Usually I say that the projection line points at the general direction of the future price movement. And this is true: the projection line really forecasts that future movement, and we can also estimate the accuracy of this forecast. If we start with 50-50 %% of guessing, the information provided by the projection line gives extra 10% of forecasted price movement. This information is really valuable for a trader. I believe it is more valuable than the information that we can get from Technical Analysis tools (according to different sources, these tools add 5% to a possible outcome).
The reason of my discomfort has a fundamental nature. The world of classical cyclical analysis and the world of trading are two totally different worlds. And each one has its own language. In the World of Cyclical Analysis we speak in terms of spectrum (Fourier transform), harmonic function, correlation, etc. In the World of Trading we speak mostly in terms of profit and risk management, i.e. win/loss ratio, drawdown, and so on. One of the most confusing questions that I get from software users is: "OK, we have a good projection line that provides a good correlation with the price. The question is: can we convert this correlation into something more suitable for trader's needs - like profit or win/loss or something else?". I really spent a lot of time trying to combine cyclical analysis criteria and trading criteria, to build a bridge between these two worlds, World of Cyclical Analysis and World of Trading. Timing Solution users are very well familiar with this phenomena: if we use a correlation as a criterion to optimize the projection line, everything is going nice and smoothly. While when we set a profit as a target, everything is going crazy: the projection line becomes choppy, a slight change of one parameter only leads to a drastic change of the profitability of the same projection line. Instead of harmony, we observe a classical behavior of some chaotic system. For some reason, the classical cyclical analysis "does not like" when we try to apply some trading criterion like profit, win loss, SQN...
For a long time I did not understand what is possible to do
here, where to move further. It is very
frustrating when you do not see a perspective, when paths that you take look like
a dead end.
Bridge between Cyclical and Financial analysis Worlds: the first brick
The major player of any kind of classical cyclical analysis is Her Majesty Harmonic function. Everyone who deals with that type of analysis knows her very well:
No doubts, this is one of the most beautiful person in mathematic, maybe the most beautiful one. Classical cyclical analysis just serves Her Majesty Harmonic function, in anything where this technique is applied. This beauty has some side effects though. While conducting any kind of cyclical analysis, it is very difficult to think in some other terms than those of harmonic analysis. I believe any person with a scientific background can confirm this inevitable temptation of harmonic analysis.
My first successful attempt to build the bridge between these two Worlds was a creation of Q-Spectrum module: http://www.timingsolution.com/TI/16/index.htm
The idea grew inside me slowly. For a long time I did not dare to make this step as it is very different from what the cyclical analysis does. It proved to be worth to do that: in one month it became one of the most used modules in Timing Solution. What I did was just applying walk forward analysis method to the cyclical analysis. It was my first case where cyclical and financial approaches had worked together.
Bright idea found in a garbage bin
When I was trying to get as much as possible from classical cyclical analysis, there was a question asked by many Timing Solution users: what to do with inverted cycles? Timing Solution team did a lot of back testing in this regard, and we too observed this inversion phenomenon. We decided to ignore it for now - as a mathematical nonsense, a kind of negative information. This situation continued for more than 10 years...
When the first Q-Spectrum diagram was build, it became obvious that inverted cycles are not a nonsense, they are reality. To bring this reality to life, we had to get out of the box of classical cyclical analysis: http://www.timingsolution.com/TS/Articles/anti_information/
Trading Spectrum - harmonic wave free cyclical analysis
The next step was very clear to me: we need to build a cyclical analysis tool that is 100% based on trading criteria - such as profit, win/loss etc. This is an absolutely new approach. I have started working on it almost two years ago: http://www.timingsolution.com/TS/Articles/Trading_Spectrum/index.htm
It took me so much time as it was necessary to check all steps. If I would stay on a position of classical cyclical analysis, that would be easy: more than two hundred years of achievements in this field were at my fingertips. Following the new approach, there is not much done by others here. So I had to do that by myself. And, like in the space industry, any imprecise step/calculation or any omission could be fatal for all our models.
Lyric is over, now let me show how it works.
I will make a forecast for SNP500 index using two approaches: classical spectrum and trading spectrum.
The classical spectrum has revealed a presence of 67-days cycle since May 2018. It is shown on the diagram as a red projection line in the bottom panel (to be exact, this is 67-days cycle with 2H, 3H and 4H overtones:
As you see, this projection line hits some turning points, some it does not. This is because classical cyclical analysis is more focused on fitness between the price and the projection line. If we would base our trades on this cycle, we need to work with it more trying to catch as many turning points as possible - by adding astrological insights, definitely including Annual cycle into the picture, and checking the performance of the combined cycle for extended data.
Now let us look at Trading Spectrum (TSp), Its task is to find the most profitable cycle. This is what TSp shows:
Long trades are shown there as green arrows (we expect the market moving up), and short trades are represented by red arrows (we expect the downward movement). And here comes the first surprise: the period suggested by TSp is a bit different from what is revealed by classical Spectrum. The trading pattern here repeats itself in 70 days. In total, since the end of April 2018 there were 12 such trades, and just one short trade in July-August was a loosing one (it is marked by black bars; the index went up instead of expected down):
All other trades were profitable.
The program shows the trades overlay of the price chart, so a trader can visually evaluate if these trades are good/not good for him or her:
Thus, Trading Spectrum looks for the most tradable cycles, the cycles that bring more money. It is a totally different approach. Here we do not care how well our model describes the price movement, how it correlates with the price. The only things we are looking for is periods when to buy and when to sell, everything else does not matter here. Is not it what a trader wants?
Here are several examples that show how Trading Spectrum works:
SNP500 in 2013:
The program can analyze only long (or only short) trades using these options:
June 8, 2019