Whenever you develop an algorithmic trading strategy, unwanted curve fitting is one of the most dangerous hazards. It will lead to substantial losses in real time trading. This article will show you some ways to detect if the performance of your algorithmic trading strategy is based on curve fitting. Continue reading
When developing a new trading strategy you are usually confronted with multiple tasks: Design the entry, design the exit and design position sizing and overall risk control. This article is about how you can test the edge of your entry signal before thinking about your exit strategy. The results of these tests will guide you to the perfect exit for the tested entry signal (entry-exit combination) Continue reading
Finding complex chart patterns has never been an easy task. This article will give you a simple algorithm and a ready to use indicator for complex chart pattern recognition. You will have the freedom to detect any pattern with any pattern length. It has been described as Fréchet distance in literature. This article shows a simple adaption for chart pattern analysis.
Defining a chart pattern
As an option seller you want the market to stay within the range prognosticated by implied volatility. But what is the historic probability that markets behave as expected? And what other analysis could be done to enhance your chances and find the periods when it is wise to sell an at the money straddle? This article will try to give some answers to this question.
The normal distribution cone
Classical technical indicators like RSI and Stochastic are commonly used to build algorithmic trading strategies. But do these indicators really give you an edge in your market? Are they able to define the times when you want to be invested? This article will show you a way to quantify and compare the edge of technical indicators. Knowing the edge of the indicator makes it an easy task to select the right indicator for your market. Continue reading
Analysing at which time daily market extremes are established shows the significance of the first and last hours of market action. See how different markets show different behaviour and see what can be learned from this analysis.
Probability of Extremes
A day of trading usually starts with a lot of fantasies for the future, then we try to survive the day and end it with a lot of hope for tomorrow. This psychological pattern can also be shown when analysing intraday market data. A high level of fantasies usually leads to a strong market movement, and thus market extremes can often be seen near the beginning or the end of the trading session. Continue reading
The stock market shows some astonishingly stable date based patterns. Using a performance heat map of the S&P500 index, these patterns are easily found.
Date based performance
The chart below shows the profit factor of a long only strategy investing in the S&P500. Green is good, red is bad. The strategy is strictly date based. It always buys and sells on specific days of the month. Continue reading
Adding some random noise to historic market data can be a great way to test the stability of your trading strategy. A stable strategy will show similar profits with noisy and original data. If the noise has a great impact on your results, the strategy might be over fitted to the actual historic data.
Synthetic market data?
Monte Carlo Simulation uses the historic returns of your trading strategy to generate scenarios for future strategy returns. It provides a visual approach to volatility and can overcome limitations of other statistical methods.
Monte Carlo Simulation
Factor investing has been around in portfolio management for some years. Based on algorithmic rules it became the big thing in trading and the ETF industry. But is there still some money to be made? Is small beta still smart or just beta? This article will give you a Tradesignal framework to test the factor investing ideas by your own. Continue reading
This article is about the dollar cost averaging investment strategy and the influence of luck in it. Continue reading
Since S&P500 has lost 20% from its top in 2018 and everybody is talking about bear markets. See what has happened in history. Continue reading
Analysing the market performance of the day session vs. the overnight movement reveals some interesting facts.
Daytime vs. Overnight Performance
So you are bullish on a specific stock, but you also have realised that timing is major problem? So what would be the best strategy to implement your bullish opinion but avoid the problems of any timing strategy?
Selling a put option might be the answer. Continue reading
“The stock market is never obvious. It is designed to fool most of the people, most of the time” Jesse Livermore Continue reading
In this article I will discuss a simple algorithmic stock picking approach based on momentum and volatility. The goal will be to generate excess returns versus a capital weighted stock basket. Continue reading
Markets have a high degree of randomness (and madness), but there are some things which hardly change over time. One is the width of an average market move before a counter-move can be observed. Continue reading
Over the last days and weeks some traders have been worried if the currently ongoing correction in the markets will evolve into a crash, or if it is just a normal correction. Continue reading
Usually it makes no sense to fight against normal distribution. But there are setups which have got a high probability of unexpected behaviour. Volatility can be the key to future market movements. Continue reading
The Weis Wave indicator combines trend and volume information. It seems to be of some interest for timing short term market reversals. Here comes a version of this indicator for usage in Tradesignal. Continue reading
Implied volatility data is key in options trading. This article shows how to access free volatility data in the Tradesignal software suite. Continue reading
Volatility trading: when to buy and when to sell volatility Continue reading
The Hindenburg Omen is an indicator which is believed to forecast market crashes. Unfortunately it does not work, but the idea behind this indicator is worth to be discussed. Continue reading
(1) You shall only trade when the chances are on your side Continue reading
“Tomorrow never happens. It’s all the same fucking day, man. ” Janis Joplin Continue reading
Ever since John Bollinger introduced his Bollinger Bands in the early 1980s the bands have been a favourite indicator to all technical trades. This article is about the prediction capabilities of Bollinger bands. Continue reading
I have been in search for a signal I could use for a short vertical spread or naked short option strategy. So my main concern has been to find a level, which will most probably not be penetrated over the next few bars.
This is what I came up with. Continue reading
The markets will go up and down, and usually it’s not my business why they do it, I am just interested in making my luck with a position on the right side of the trade. Continue reading
If you want to trade volatility, you can place a bet on the option market. Just buy an at the money put and call, and at expiry day you will either win or lose, depending on the actual market move since you bought the straddle and the price you paid for the straddle. To put it simple, if the market moves more than you paid for the two options you will win, otherwise you will lose. This article is about a back test of volatility. Continue reading
The 200 day average is considered as a key indicator in everyday technical analysis. It tells us if markets are bullish or bearish. But can this claim be proved statistically, or is it just an urban legend handed down from one generation of technical analysts to the next? Let’s find out and demystify the 200 day moving average. Continue reading
Sometimes my data provider has not got the data I am looking for. Searching for downloadable csv data I recently came across google spreadsheets. It provides an easy way to get historical stock price data. Save it as csv and use it with your Tradesignal. Continue reading
If a bitchy prime minister and a crazy president weren’t enough, for the upcoming months the seasonal chart is also indicating further price setbacks. Continue reading
The CBOE volatility index VIX measures the market’s expectation of future volatility. This article will show you some key statistics of VIX and help you to decide if it is better to buy or to sell volatility. Continue reading
Volatility is a measure of risk. It describes how far a commodity will most probably move within a given period of time. The most common measure for volatility is historical volatility. But I do not like the complicated formula for standard deviation.
There has to be a better way to explain and calculate volatility…. Continue reading
A graphical approach to indicator testing
The first step in algorithmic strategy design usually is to find some indicators which give you an edge and tell you something about tomorrow’s market behaviour. You could use a lot of statistics to describe this edge, but I like to take a graphical approach in indicator testing first, and only later on worry about the maths and statistics.
A scatter chart is a simple to read chart style to see the correlation between two input values. A regression line on the scatter chart gives you a visual idea if the two securities are positively or negatively correlated, the “cloud structure” of the scatter points tell you if this correlation is tight or loose.
This sample scatter shows the correlation between the DAX and DOW levels, and it can be easily seen that these two markets are tightly correlated in a positively way.
The horizontal scale is used for the second security (DAX), the vertical scale is used for the first security (DOW). This chart type is predefined in Tradesignal, just drag&drop it onto the securities on the chart and select the right amount of data to get the analysis you want to see. (eg. 2000-now). If you see a tight and positive correlation like on the chart above, It might be used to select the instrument you want to trade. If market A is easier to predict than market B, select A.
Scatter on Indicators
Although a scatter chart is usually used to show the correlation between two markets, it can also be used to show the correlation between two indicators.
The chart above shows the correlation between digital stochastic and momentum. Have a look at the clustering of points in on the right side of the scatter, a high level in digital stochastic usually goes with a high momentum. This insight enables you to get rid of momentum, as digital stochastic is easier to read than the shaky momentum. Less indicators = less parameters = less curve fitting.
Doing this analysis and getting rid of parameters is great if you want to minimise the dangers of curve fitting, but it does not tell you if your indicator is of any use at all, when it come to describing tomorrows move of the market. Surely it is valuable insight that a high level of stochastics corresponds to a high momentum, but does a high momentum today also mean that the market will move up tomorrow? And this question about tomorrow is the key question I ask myself when searching for some edge.
To get a glimpse on the prognosis quality of an indicator we will have to add some colour to our scatter chart. This colour tells me what the market has done after a specific indicator level has been reached. Green for an up move, red for a down move, black for not decided by now.
This chart shows the prognosis quality of the stochastic indicator. The left chart shows the 1 day prognosis of a 5 day stochastic, the right chart gives you the 5 day prognosis of a 21 day stochastic. Observe the clustering of the red and green dots. (black for not decided by now) As you can see on the left chart, the one day prognosis using a 5 day stochastic is not the thing to do. Regardless if stochastic is high or low, you get a nice mixture of red and green dots. This means the market, at a given stochastic level, sometimes moved up, sometimes moved down. Not this behaviour is not very useful for trading. Only in the extreme, near 0 and 100, this indicator seems to implicate a bearish next day movement.
The right chart, showing the longer term prognosis of a long term stochastic seems to be more useful. High levels of the indicator also show positive returns on the 5 days after, unfortunately you can not reverse the logic, as low indicator levels give a rater mixed prognosis. This visual analysis can give you an idea which areas of the indicator might be useful for further analysis.
A one dimensional analysis like on the chart above could also be done without this scatter chart. Going from one dimension to two dimensions is more useful, as it directly can be translated to do a kNN machine learning trading strategy. Have a look at the following chart. It shows the scatter of two indicators and the implication on the next days market move.
Lets start with he right chart. As you can see the red and green dots are evenly distributed, meaning there is no useful correlation between the used indicators and the movement of the market on the day after. If you would use a kNN algorithm with these two indicators, I would bet it would not return great results. Even if you would get a positive return, it might just be a lucky hit or curve fitting.
The opposite is true for the chart on the left. Here you can see some nice clustering of the red and green dots. Low indicator levels seem to predict a bearish move, high indicator levels result in a bullish move on the next day. A distribution like this is the perfect starting point for investing some time in a kNN machine learning trading strategy. The kNN algorithm would give you a strong prognosis with high or low indicator levels, and most probably only a weak or no prognosis when the indicators are around 50. The returns will be stable, no curve fitting problems should be expected.
Using a scatter chart can give you a nice visual indication if your indicator might be useful for a prognosis of the next days market move. This is valuable insight, as you can see the whole data universe with one glimpse, even before you do a thoroughly statistical analysis. Numbers can deceive you, pictures usually tell the complete story.
Tradesignal Equilla code:
I always thought that inspiration and experience are key factors in trading. But every time my chess computer beats me without any inspiration, just by brute force, I get my doubts. This article will be about a brute force approach in trading. The kNN algorithm. Continue reading