I am happy to announce that I will be hosting a free webinar series on quantitative analysis and algorithmic trading. Dates and times for the first shows can be found over here: Tradesignal Webinar Series
Whenever the market shows an exceptional day ranges it is time to take bite. See how you can profit from large daily market moves.
When looking at any chart, you will surely notice that the large candles tend to close near the high or low. This is due to herding. Once the market is moving significantly, everyone hops on and the large move becomes even larger. This is true for daily, weekly and intraday candles.
The chart shows an indicator which plots the daily move. Every opening is set to zero and the absolute move of the day is drawn. Around these normalised candles a long term 2 standard deviation volatility band is drawn. Right now the 2 standard deviation volatility for SPX is about +/- 46 points.
Take a bite before the market closes
As you can see this +/-46 point barrier above/below the opening of the day is a wonderful entry point. If you enter long 46 points above the opening and go short 46 points below the opening nearly all entries would have lead to a profitable trade. To get an even higher probability of success you can volume as a confirmation. Large moves must also show high volume. The exit is done at the end of the session. This analysis does not give any indication for the next days move. So be fast, take your bite and go home with a small profit and no overnight position.
No free lunch
On the chart it looks easy, but be careful. As an example the last bar shown on the chart first crossed the band to the downside, reversed and crossed above the upper band. So you will need to use a trailing stop to lock in profits and avoid to take the full -46 to +46 points trade as a loss!
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.
Curve fitting – what is it?
Every algorithmic trading strategy will have some parameters. There is no way around it. You will have to decide what length your indicators have, you will have to specify a specific amount for your stop loss or profit target. Beside the actual rules of your strategy the chosen parameters will usually significantly influence the back-test performance of your strategy. And with any parameter you add the danger of curve fitting rises significantly. 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)
Quality of an Entry Signal
When you develop a new idea for an entry signal there are two things you would like to see after the entry: no risk and fast profits. This would be the perfect entry with the highest possible edge. In reality the market response to your entry will be risk and chance. With a good entry the upside would outnumber the downside. 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?
Generating completely synthetic market data to test algorithmic trading strategies is a dangerous endeavour. You easily lose significant properties like classic chart patterns or the trend properties of your market. Continue reading
“The stock market is never obvious. It is designed to fool most of the people, most of the time” Jesse Livermore
Technical analysis is a form of market analysis based on historic price patterns. The basic assumption of technical analysis is, that human behaviour does not change over time, and thus similar historic market behaviour will lead to similar future behaviour. Technical analysis is a predictive form of analysis, a technical analyst will try to estimate what the market might most probably do over the next period of time. 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.
Alpha and Beta
Investing in assets with low volatility and high return is on a lot of peoples wish list. Portfolios which archive this goal will have a high Sharpe ratio and in the end get the investors money. By reverse engineering this criteria, one can find promising stocks to invest in and out perform a given capital weighted index.
Alpha and beta are measures to describe an assets performance relative to its index. Both are used in the CAPM – capital asset pricing model.
Alpha is a measure for an assets excess return compared to an index. 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.
Bollinger bands width percentile
Bollinger Bands are a great tool to describe market volatility. And my favourite tool to measure the width of Bollinger Bands is Bollinger percentile.
Like the IV percentile indicator my Bollinger percentile indicator is a probabilistic indicator. It gives the probability of Bollinger Bands having a narrower upper band – lower band range than currently given. Continue reading
Volatility trading: when to buy and when to sell volatility
You got to know when to hold ’em,
Know when to fold ’em,
Know when to walk away,
And know when to run.
When to sell implied volatility
Volatility is a nicely reverting time series. If it is high chances are good that it will come down again. The only problem is to find out when volatility is high, and when it is low. Unfortunately there are no absolute levels, you can’t say that 50% implied volatility is high, as this specific stock might have an implied volatility of 80% most of the time. So you can only compare the current volatility level to historic levels and so define if volatility is currently high or low. Continue reading
(1) You shall only trade when the chances are on your side
Comparing implied and realised volatility
Selling volatility can be a profitable game, but only if you sold a higher volatility than the market realises later on. Comparing realised and current implied volatility gives you an idea if the chances are on your side.
We already had a look at realised volatility and what the fair price for a straddle might be. Have a look at the kvol–fair bet articles. These articles present a way to calculate the historically correct price for a straddle. Whenever you sell a straddle (to sell volatility), implied volatility should be higher than the fair bet price. Only then you will win on a statistical basis. Also have a look at the statistics of VIX, to get a clue when a downturn in volatility can be expected. 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.
Algorithmic RSI Support and Resistance Levels
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
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
A short update on the long term Candlestick Scanner.
The Candlestick Scanner scans the Nasdaq 100 stocks for long term bullish or bearish reversal patterns.
The basic idea is to search for hammer and hanging man candlestick patterns. Usually these patterns work nicely on daily charts. My Candlestick Scanner searches for these two patterns on every time frame, from a 1 day per bar compression up to a 250 days per bar compression. This enables me to use a simple, well defined and documented pattern as a description of short to long term reversal setups.
But see for yourself which Nasdaq stocks seem to change the direction according to the long term Candlestick Scan. The list gives you the duration of the reversal formation (expect about the same time to either reach the target or get stopped out) The detected pattern becomes a valid entry signal if a new high (hammer) or low (hanging man) is established.
Bullish reversals on the left side, bearish reversals on the right side.
read more about how to detect your own chart pattern in this article
Working on your position sizing algorithm is an easy way to pimp an existing trading strategy. Today we have a look at an energy trading strategy and how the position sizing can influence the performance of the strategy.
The screenshot shows you the returns of the same trading strategy, trading the same markets, the same time frames and using the same parameters. The returns on the left side look nice, making money every year. The returns on the right side are somehow shaky, and you would have to love volatility of returns if you would think about trading this basket. The only difference between the basket on the right and on the left side is the position sizing.
The energy basket:
The basket trades German power, base and peak (yearly, quarterly, monthly), coal, gas, emissions. All instruments are traded on a daily and weekly time frame chart, using the same parameters. If the daily trading uses a 10-period parameter, the weekly trading would use a 10-week parameter. This limits the degrees of freedom I have when doing the strategy-time frame-parameter merge, thus minimizing the curve fitting trap.
When it comes to simple trading strategies, the day of the week is surely one of the best things to start with. That’s nothing new when it comes to equity markets. Everybody knows about the calendar effects, based on when the big funds get and invest their money. I do not know about any fundamental reason for the day-of-week effect in German power trading, but is seems to be a fruitful approach.
First of all I have to point out that it is not only the day of the week which is important. A strategy that just buys on Wednesdays and sells 1 or 2 days later would be doomed. But if you add a little filter which confirms the original idea, you will end up with a profitable trading strategy.
This filter will just be a confirmation of the expected move: If you suspect that Wednesday ignites a bullish movement, then wait until Thursday and only buy if the market exceeds Wednesdays high. Same for the short side, wait for a new low before you enter!
Have a look at the chart. The strategy shown buys on Thursdays if Wednesdays high is exceeded. The position is closed 2 days after the entry.
If you run a simple test which day of the week is the best to get ready for a long trade the day after then the next chart shows the return on account of the strategy using data from 2012 up to now: (exit one day after entry)