professor_frink
Moderator
- Joined
- 16 February 2006
- Posts
- 3,252
- Reactions
- 5
Morning all,
Not sure how many people here use this type of analysis or not, so thought I'd throw something out there and see what bounces back
One thing that seems to get thrown around the forum quite a bit is to test out patterns and ideas before putting them to use. Even if you are a discretionary trader, extensive testing and investigation is an absolute must for short term trading. Whilst I have my own set of triggers to enter a trade which doesn't generally change that much, I'm also running the kind of analysis that'll be outlined below to help fine tune things/ find a bias for general market direction/keep track of the way the market is changing over time.
General idea is this: find a pattern/point of interest in price,volume,range, breadth,etc and then test it out as a buy signal. Instead of looking at a pattern and using a predefined exit to go along with it, the performance of the market following the pattern is logged to get an idea of what can be expected.
Generally, I'll use amibroker for this type of thing, but there's no reason why it couldn't be done in excel either.
So, onto a basic test. If we have a look at Friday's bar for the S&P500, we can see that it was an inside day(see chart here). So our first test will be to see if an inside day has typically lead to any strength or weakness in the past. So we will code up an inside day and run it as the buy signal by itself, and see how the market has performed 'x' amount of days out from one. Results below:
The left hand column is the number of days after an inside day has occurred, the rest should be self explanatory(for those who don't have ami, the payoff ratio is simply the avg win loss ratio).
Whilst that is interesting, we need something to compare it to. It's all well and good to say that 5 days out from an inside bar, there is a 55% chance that the market will be higher than it is now, but how does that compare to any old 5 day period? Results for that below:
If we look 5 days out here, results are pretty similar. Comparison of the two tests below:
There really isn't that much of a difference there at all. By itself, the inside day doesn't really add any kind of value as a standalone indicator of upcoming strength or weakness.
Another way of looking at these types of things that can impact on the results is the general positioning of a bar relative to where the market has been recently. Is the pattern occurring at a relatively high or low level? Are we in an uptrend or a downtrend? And on and on we can go. So for a few more tests to look a little further. In this instance, we have had an inside day that has occurred after the market was printing new lows. So to investigate further we'll go and test it out.
The next test:Today was an inside day after the market traded at it's lowest price over the past 20 bars yesterday. Buy today's close. Results out 'x' days from the signal below(the benchmark average on the right)
What stands out here is the relative outperformance immediately following this pattern, and that it falls away after that. Whilst I wouldn't exactly classify this as a strong upside edge for the following few days, it is slightly better than average over the short term and worth noting. The fact that it falls away quite quickly after that is also worth paying attention to.
To continue on looking at the positioning of the market, lets have a look at how an inside day performs at a relatively higher price. This next test will look at how the market performs after it made a fresh 20 day high before the inside day. I've left the test at a low point next to it, and the random average on the right to help compare:
Now it's starting to look interesting. Whilst the test for an inside day at new lows shows the potential for some strength immediately before returning to not being any kind of a signal at all, when it happens after the market makes short term highs, we can see slight underperformance 1-9 days out, before it outperforms the average from 10-20 days.
Have hit my attachment limit, so will post the rest in a minute.....
Not sure how many people here use this type of analysis or not, so thought I'd throw something out there and see what bounces back
One thing that seems to get thrown around the forum quite a bit is to test out patterns and ideas before putting them to use. Even if you are a discretionary trader, extensive testing and investigation is an absolute must for short term trading. Whilst I have my own set of triggers to enter a trade which doesn't generally change that much, I'm also running the kind of analysis that'll be outlined below to help fine tune things/ find a bias for general market direction/keep track of the way the market is changing over time.
General idea is this: find a pattern/point of interest in price,volume,range, breadth,etc and then test it out as a buy signal. Instead of looking at a pattern and using a predefined exit to go along with it, the performance of the market following the pattern is logged to get an idea of what can be expected.
Generally, I'll use amibroker for this type of thing, but there's no reason why it couldn't be done in excel either.
So, onto a basic test. If we have a look at Friday's bar for the S&P500, we can see that it was an inside day(see chart here). So our first test will be to see if an inside day has typically lead to any strength or weakness in the past. So we will code up an inside day and run it as the buy signal by itself, and see how the market has performed 'x' amount of days out from one. Results below:
The left hand column is the number of days after an inside day has occurred, the rest should be self explanatory(for those who don't have ami, the payoff ratio is simply the avg win loss ratio).
Whilst that is interesting, we need something to compare it to. It's all well and good to say that 5 days out from an inside bar, there is a 55% chance that the market will be higher than it is now, but how does that compare to any old 5 day period? Results for that below:
If we look 5 days out here, results are pretty similar. Comparison of the two tests below:
There really isn't that much of a difference there at all. By itself, the inside day doesn't really add any kind of value as a standalone indicator of upcoming strength or weakness.
Another way of looking at these types of things that can impact on the results is the general positioning of a bar relative to where the market has been recently. Is the pattern occurring at a relatively high or low level? Are we in an uptrend or a downtrend? And on and on we can go. So for a few more tests to look a little further. In this instance, we have had an inside day that has occurred after the market was printing new lows. So to investigate further we'll go and test it out.
The next test:Today was an inside day after the market traded at it's lowest price over the past 20 bars yesterday. Buy today's close. Results out 'x' days from the signal below(the benchmark average on the right)
What stands out here is the relative outperformance immediately following this pattern, and that it falls away after that. Whilst I wouldn't exactly classify this as a strong upside edge for the following few days, it is slightly better than average over the short term and worth noting. The fact that it falls away quite quickly after that is also worth paying attention to.
To continue on looking at the positioning of the market, lets have a look at how an inside day performs at a relatively higher price. This next test will look at how the market performs after it made a fresh 20 day high before the inside day. I've left the test at a low point next to it, and the random average on the right to help compare:
Now it's starting to look interesting. Whilst the test for an inside day at new lows shows the potential for some strength immediately before returning to not being any kind of a signal at all, when it happens after the market makes short term highs, we can see slight underperformance 1-9 days out, before it outperforms the average from 10-20 days.
Have hit my attachment limit, so will post the rest in a minute.....