Australian (ASX) Stock Market Forum

Looking for and testing short term patterns in the market

Afternoon folks,

not really much to add today, typical lazy Friday afternoon for me:)

The comments I made yesterday suggested that some follow through was possible last night, which came in a little stronger than I was expecting. Had already run some what if situations based on yesterday's look at 3% up days with the focus on what could happen if we do get the follow through, it suggested that we'll possibly underperform tonight and on Monday as well. The fact that we have risen for 3 consecutive days also fits in quite well with that general idea.

Semis and banks underperformed compared with the overall market indicies last night too, not by anywhere near enough to trigger any alarm bells, but does fit in with the possibility of a mild pullback tonight if there is a bit of follow through on that front.

Cheers
 
Howdy folks, been quite busy this week, and seem to have been getting distracted by other things whilst I'm on ASF so haven't updated this one for awhile.

Couple of warning signs for the rally in stocks at the moment. Firstly, currencies - have a look at a few of the AUD pairs, 2 risk on trades, the AUDUSD and the AUDJPY. AUDUSD is currently flirting with it's June highs, but looks to be hitting some resistance at the moment.

currencies.png

AUDJPY is lagging behind and has sold off a little, and the 2 pairs that more reflect the risk off trade, the EURAUD and GBPAUD have both turned up in the past couple of sessions.

Bond yields moved down overnight as well. Chart of 10 yr yield below:

10 yr yield.png

Considering the S&P is currently pretty overbought in the short term and is due for a pullback, might be time to pay attention to some of the warnings coming from other markets:2twocents
 
Interesting Prof.
The correlation of the seemingly uncorrelated.
Meaning against our Index.
There must be a lot of other examples as leading indicators around.
Gold/Crude--etc
 
Interesting Prof.
The correlation of the seemingly uncorrelated.
Meaning against our Index.
There must be a lot of other examples as leading indicators around.
Gold/Crude--etc

I have been talking about the US markets in this thread, but that does translate over to our index in a round about way. Asia does have a life of it's own, but the general theme is still the same.

Crude is another one that could have been included in the charts above FWIW. I always struggle a little with gold, because of it's safehaven status, it does flip flop in the way it moves in relation to everything else(sometimes correlated with general market moves, other times it flips over and does the opposite), all depends on the circumstances at the time. I often find that I'm a little late on picking up when gold is changing it's relationship to other markets, so tend to leave it alone(from an analysis perspective and a trading one).
 
Thought I should update things with a test after my ramblings earlier:)

Was an interesting pattern last night in the S&P. Chart of the SPY below shows it, and the past couple of similar days:candle formation, positioning compared to recent range(green line on the chart is simply the highest price over the prior 10 bars).

SPY.png

The test run was looking for a similar "tail" on the candle that occurred in the top 10% of the prior 10 bar range. Results below:

test from 1507.png

Looks like a half decent bearish edge 1-3 trading sessions out:2twocents
 
That selloff we had on Friday, a move down of 2.7%+ when we had been at a short term high wasn't something you see very often.

So for a bit of a look at what's happened in the past when this has happened:

Yesterday was the highest close over the past 2 weeks and today sold off by more than 2.5%. Results below

14 2.5% selloff after a high.png

What's interesting is that despite the pattern showing the potential for short term weakness for a few days out from this happening, 11 out of the 15 times that we've seen this on the SPY, we closed up the following session.

So considering that we saw that overnight, thought I'd have a quick look at the times were we recovered after the pattern seen on Friday.

The next test is basically the same as the last, have just shifted the pattern back a bar and scanned for the times we closed up the day following it:

15 day following a 2.5% selloff.png

Would appear that weakness is still a possibility from here, especially for the next 1-2 days:2twocents
 
11 occurences over what time frame prof?

Do you think these sample sizes are getting a bit small?

It's on the SPY ETF so it's since 93.

The 11 instances above was based on a certain reaction to the pattern highlighted in the earlier part of the post from Friday's analysis that I posted this morning, there were 15 instances of the large fall happening on the SPY.

As far as coming to any definitive conclusion, the sample sizes are quite small and not to be traded as a stand alone method. The market over the past couple of months has been throwing quite a few of these patterns that don't have large sample sizes, it's a sign of the times.

Here's slightly tweaked version I ran based on the first test in my post this morning:

Instead of looking for just the highest closing price over the 10 bars, I looked at either that happening, or just an intraday high, looked for a 2% fall instead of a 2.5%+ one and ran it on the index data going back to 1975:

16 tweaks to Friday's test.png

Helps the sample size a bit loosening up the criteria and running it on index data with a longer history, and still looks for the same basic pattern: a short term rally that gets dumped hard. Tells a pretty similar story to the first test I posted this morning too:)
 
Interesting trading in the US overnight! Decent sized gap down, decent sized rally. At face value, it would be hard to interpret it as anything but bullish.

17 SPY 20 July.png
Generally I find taking things at face value to be rather dangerous, so off I go to test it out:)

Firstly, the reversal bar. Today we gapped down below yesterday's low with a gap of greater than 1%, and then rallied to close up by more than 1%. Results below:

18 reversal bar.png

Few points - hasn't happened very often firstly. Results for the first few days after such a bar haven't been bullish at all, but once you look out by more than a week they can be interpreted as fairly bullish. Not really worth looking at any variations on the basic pattern here as the results wouldn't yield much of a sample at all.

To try and get a bigger sample size, I've also run a test based on a gap below yesterday's low, and a close higher than the previous close. Still looking at the same general theme, just incorporating the less extreme examples into the test.

19 reversal bar.png

Obviously with a less extreme set of conditions we are going to get different results. But what's important here is that the theme for the test is still the same, and the theme within the results still comes out similar. There doesn't seem to be much to get excited about in the short term, but the prospect of higher prices further out does seem to be a possibility.

One other way of looking at today's action is within the context of an outside day. Today's was a rather extreme one, in that the open was below yesterday's low and the close was above yesterday's high

Results for that test below:

21 outside day reversal.png

Once again it's telling a similar story. Looking at a few variations on this test- positioning relative to the past week's trading and volume today being higher than yesterday all say the same thing, there doesn't seem to be any significant edge in getting long right now, but we may see higher prices over the next few weeks.
 
Prof

Some good stuff here keep it up--there are people watching even though your not getting much comment.
Are you using Amibroker for this testing?
 
Prof

Some good stuff here keep it up--there are people watching even though your not getting much comment.
Are you using Amibroker for this testing?

Thanks tech, appreciate it:)

Yeah most of the stuff I do is with ami, the tables that I'm posting in here are just basic optimisations run through the backtester.
 
Interesting thread. I have done a lot of work with short term candle stick patterns. Mainly on the currency markets though and shorter time frames. Unfortunately my coding skills are zip and I had to do it manually which is quite time consuming. My initial main source of ambition was to find patterns that would provide me a slight edge at 1:1 risk/reward. Anything consistently above 51% would be a winner replayed enough. Not as easy at it sounds. I found most technical analysis stuff is no better than random at 1:1. You have good runs and bad. Basically the spread kills you.

This is one of the patterns I traded live. A thousand odd trades. I dont know what it is called. I would be interested to see it coded up and tested properly. It had a great run but then went into a big drawdown and I pulled the pin. The profit/stop was a 200sma of the ATR(1).

3pointtradesetupA.gif

That enough about me. I am a little confused. Are you taking profit after X days? Can you try alternate profit stop methods for your patterns? Do you have a stop loss in place for testing? This may skew your results if you dont. ie it goes down stops out and goes for a win in allotted time.

I have a few candle patterns for you to test if you are interested.
 

Attachments

  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
Interesting thread. I have done a lot of work with short term candle stick patterns. Mainly on the currency markets though and shorter time frames. Unfortunately my coding skills are zip and I had to do it manually which is quite time consuming. My initial main source of ambition was to find patterns that would provide me a slight edge at 1:1 risk/reward. Anything consistently above 51% would be a winner replayed enough. Not as easy at it sounds. I found most technical analysis stuff is no better than random at 1:1. You have good runs and bad. Basically the spread kills you.

This is one of the patterns I traded live. A thousand odd trades. I dont know what it is called. I would be interested to see it coded up and tested properly. It had a great run but then went into a big drawdown and I pulled the pin. The profit/stop was a 200sma of the ATR(1).

3pointtradesetupA.gif

Hi overit,

Haven't done too much testing on intraday currencies though have traded them quite a bit. What timeframe are you looking at? What pairs are you trading? Is this a 3 bar pattern that is looked at coming off a low or high price, or one that you look at within the context of an already established trend? A bit more information here might help you get some answers from someone!


That enough about me. I am a little confused. Are you taking profit after X days? Can you try alternate profit stop methods for your patterns? Do you have a stop loss in place for testing? This may skew your results if you dont. ie it goes down stops out and goes for a win in allotted time.

I covered the basic outline of what I'm doing here in the first post

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.

It's not so much a question of taking profits after a certain time or stops for that matter. I'm looking at what's happening in the market currently, and then looking at how similar instances have performed in the past, with the goal of coming up with an expectation of things that could possibly happen.

Take yesterday's analysis I did on the US markets as an example. At a glance, it would appear that that particular days trading could be a decent reversal candle and signal a move up from here. When you have a look at the last test I posted yesterday, an outside bar like the one just gone has seen the market lose, on average, nearly half a percent over the next 3 trading sessions. The test still showed that, on average, the market has been higher 2 weeks after this pattern more often than not too, even with the possibility of short term weakness. In this instance it can serve as a signal to me to not go in long with anything close to a full position, as there is the distinct possibility that I'll get a better price in the coming days and can build a full sized position at a better average price, or to even sit back and wait for some more information that would confirm that being long is the way to be positioned.

Hope that helps.

I have a few candle patterns for you to test if you are interested.

I'm heading off for a few days and won't have regular access to the net or most of my software, but feel free to post up some patterns of interest if you want, either I can have a look at them when I'm back, or another poster on here might be able to help you out:)
 

Attachments

  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
  • 3pointtradesetupA.gif
    3pointtradesetupA.gif
    6.4 KB · Views: 0
Haven't done too much testing on intraday currencies though have traded them quite a bit. What timeframe are you looking at? What pairs are you trading? Is this a 3 bar pattern that is looked at coming off a low or high price, or one that you look at within the context of an already established trend? A bit more information here might help you get some answers from someone!

I was just throwing it out there in context of the thread title and to give an idea of the 1:1 principle. Oddly enough you cant find much on the net about it which adds to my theory that if a pattern didnt have an edge at 1:1 then it really has no edge. My trading theory these days is based around what I learnt from testing these patterns in this way and what Peter Crowns and to a lesser extent his mate TheRealThing had to say over at the forex factory.

I mainly traded this pattern on the eur/usd 30min chart but I out of sample test everything on different timeframes and currencies. The pattern was traded whenever it happened, no bias. This was very difficult to trade. You had to put the hours in and be robotic. Although it ended in a death by a thousand cuts it taught me an enormous amount about timeframes, risk/reward, spreads, market volatility and following the rules.

My trading these days is based around patterns on support and resistance. Do I think my patterns by themselves have an edge. Not really. But it gives me defined entry and risk in an area that has the most potential to rebound and have a big run.

I would like to see the 1:1 results for all the candlestick patterns. I searched the net for these but only ever found what happened after X days. If you found something which occurred frequently enough and punching above 50% success you can just keep punting (perhaps create a bot). Afterall thats what the casino does isnt it. Slight edge and repeat.
 
Hi overit,

You keep mentioning that you want to see a pattern have a greater than 50% accuracy with a fixed 1:1 risk reward ratio. Why do you think that this is important, and why would you prefer to see this instead of how a pattern performs simply by looking out by different amounts of days?

Maybe I just need a proper explanation here, but I just don't get it:confused:
 
Hi overit,

You keep mentioning that you want to see a pattern have a greater than 50% accuracy with a fixed 1:1 risk reward ratio. Why do you think that this is important, and why would you prefer to see this instead of how a pattern performs simply by looking out by different amounts of days?

Sorry I am not good at explaining things and why I generally stay out of this type of thing.

Firstly any pattern with a 1:1 reward greater than 50% could be traded solely in this way. Extracting your edge by volume of trades. ie roulette.

Secondly I feel that if your pattern is only 50% it has no intrinsic value by itself. I am not saying that it cant be used as an entry signal but that it would not be where your edge would come from. ie lets look at a pin bar. That candle is telling you the same thing no matter where on a chart it is placed. If I need to filter that candle by only trading it on support or resistance where is my edge... the pinbar or the support and resistance.

pinbarresistance.gif

Is your real signal the candle formation (pinbar) or the break out of the low from that candle on the resistance line.

Oops time got away from me and I have to leave it there for the time being. Gotta go out. Something to think about anyway.
 

Attachments

  • pinbarresistance.gif
    pinbarresistance.gif
    6.4 KB · Views: 0
  • pinbarresistance.gif
    pinbarresistance.gif
    6.4 KB · Views: 0
  • pinbarresistance.gif
    pinbarresistance.gif
    6.4 KB · Views: 0
  • pinbarresistance.gif
    pinbarresistance.gif
    6.4 KB · Views: 0
My trading these days is based around patterns on support and resistance. Do I think my patterns by themselves have an edge. Not really. But it gives me defined entry and risk in an area that has the most potential to rebound and have a big run.

When it all boils down I think this is the greatest point I am trying to make. If a pattern is only 50% at 1:1 I see it as no better than random. But what it does is give you an entry and set risk in your place of interest then you let your exit sort the rest out.

The point I was trying to make with my diagram is that it was not the pattern that set up the run. Both those setups to me are exactly the same. It just depends on when the bar started and closed.
 
Sorry I am not good at explaining things and why I generally stay out of this type of thing.
Hi overit,

No need to apologise, everyone has a different way of looking at the market, all comments are welcome regardless of how well they are or aren't explained. I think you explained it ok, I'm more struggling with the 'why' of it all:)

I should thank you as well, having questions like this help me to qualify why I do what I do, which helps me to spend a little time thinking about things more, which is never a bad thing

Firstly any pattern with a 1:1 reward greater than 50% could be traded solely in this way. Extracting your edge by volume of trades. ie roulette.

Secondly I feel that if your pattern is only 50% it has no intrinsic value by itself. I am not saying that it cant be used as an entry signal but that it would not be where your edge would come from. ie lets look at a pin bar. That candle is telling you the same thing no matter where on a chart it is placed. If I need to filter that candle by only trading it on support or resistance where is my edge... the pinbar or the support and resistance.

In regards to a pattern needing to be valid at a 1:1 ratio, I personally feel it's not the most optimal way to look at the validity of a pattern. A lot of the testing that I do is on stocks/indicies which have a natural upward bias to them. The outcome of the test, and the validity of any edge perceived can be influenced by this drift, depending on the parameters that you input to get a 1:1 risk reward ratio. Obviously this isn't an issue in the same way for forex, but it does highlight the drama of testing this way. What you essentially have to do is impose a set % move up or down as a cutoff for the test in order for the test to accurately have a 1:1 ratio. This opens up an extra set of variables to any test done that can greatly influence the result.

For example, if you are looking at testing a candle reversal pattern, then to get a 1:1 ratio, you need to code up the test to exit a set% move from the entry day. If you set the % move at a level that is too low, you'll end up with a much lower win % and it would appear that their is no edge involved. If you set it too high, there is the danger that any random drift in the market will make the results look a lot better than they might be. There may or may not be an element of outperformance to the pattern, but when you start imposing extra rules to get a set risk reward scenario, then you are muddying the waters somewhat and it becomes harder to draw any definitive conclusions from it.

In my opinion, this is going to be the most likely reason for you not finding much in the way of common patterns tested this way, and even if you did, you'd find an enormous amount of conflict in the results due to any differences in arbitrary cutoffs between users, and markets/timeframes involved in tests. Different parts of different markets obviously have different volatility levels which would greatly influence the results, you would need to come up with some kind of volatility based method to try and find the most appropriate cutoff to test different shares or currencies. Basically you are looking at a minefield of problems to try and do this properly, especially when even within the same market, volatility can expand and contract quite dramatically.

When you simply test a pattern and don't impose any additional criteria to it like I've been doing in this thread, it allows for a slightly more objective view of what's going on - quite a few of the patterns I've tested in the thread so far have shown differing levels of performance over different timeframes, ie some have shown good or bad performance in the shorter timeframes(days), but the opposite when you look a couple of weeks out. Getting this kind of information wouldn't be possible when running a test that imposes exit criteria to get a 1:1 ratio.

Having the extra layer of information here, once you start looking at them regularly enough, will start to show up key elements of how the market behaves over shorter timeframes, which is my main goal for the thread;)

And in regards to:

Secondly I feel that if your pattern is only 50% it has no intrinsic value by itself

I'll have to respectfully disagree with that one. Each to their own though:)

I prefer to look at not just the win%, but the R:R on things as well(all summed up nicely by the profit factor). Personally, I'd be more than happy taking a short term trade that has shown 45% winners and an average win 3 times greater than the average loss, and would be more inclined to pass up the 60% winner with a 1:1 R:R ratio. I'm sure some would disagree with me here, but that's ok! And at the end of the day, the way you manage a trade after the entry can have an impact on the win% and R:R ratio for the pattern anyway. A pattern that may not win more than it loses, but also shows tendency for immediate strength can leave a trader with the option of scaling out of a position during the trade, which when completely change the winning % of trades that are based on the pattern.
 
Top