Candlesticks don't work!

Well, I have always been a skeptic of candlestick patterns, but I thought It would be best to test them. So I put together a bunch of rules that are meant to emulate the “high reliability” bullish patterns as found on:

http://www.candlesticker.com/Bullish.asp

I tried to convert them into rules for P123, in order to test:

Piercing Line
close(1) < open(1) AND open(0) < close(1) AND 2*close(0) > close(1) + open(1)

Kicking
close(1) < open(1) AND open(0) > open(1) AND close(0) > open(0)

Abandoned Baby
close(2) < open(2) AND hi(1) < low(2) AND low(0) > hi(1) AND close(0) > open(0)

Morning doji star
close(2) < open(2) AND open(1) < close(2) AND open(0) > close(1) AND open(1) > 0.99close(1) AND open(1) < 1.01close(1) AND 2*close(0) > open(2)+close(2)

Morning star
close(2) < open(2) AND open(1) < close(2) AND open(1) > 0.95close(1) AND open(1) < 1.05close(1) AND 2*close(0) > open(2)+close(2)

Three inside up
close(2) < open(2) AND close(1) > open(1) AND open(1) > close(2) AND close(1) < open(2) AND close(0) > close(1)

Three outside up
close(2) < open(2) AND open(1) < close(2) AND close(1) > open(2) AND close(0) > close(1)
T
hree white soldiers
close(2) > open(2) AND open(1) < close(2) AND close(1) > close(2) AND open(0) < close(1) AND close(0) > close(1)


So I wanted to see if they had any effect. I set a rule for “nodays > 10” as the sell rule, to allow a 10 day holding period. I then ran sims with each of the above rules, to see if it would outperfom a “control” case, with no rules at all with a non technical ranking system.

None of the above patterns appear to work, i.e. outperform the control. If you want to run for yourself just copy the following sim, and uncheck the rules as required:

http://www.portfolio123.com/port_summary.jsp?portid=261882

I am hoping to invite some sort of “peer review”, have I got this wrong? I had the impression that Stitts may think candlesticks did work, I would be very interested in being proved wrong!

Olikea,

Thanks for putting this together. At one time I tried back-testing candlesticks and I found it became very “fuzzy”: i.e., there is not a standard definition of the size of the body relative to the range in a shooting star, etc. When one puts it to code or some logical form one realizes the degree of fuzziness. That said, it’s cool (to use a technical term) to see that testing candlesticks can be done in P123 also.

There are a few candlestick patterns I found in the past that work, but they did not involve using the candlestick pattern itself in isolation to everything else. This could be an interesting thread; good idea.

It’s possible candlesticks only work for the rice market and only if the political environment is a feudal society :wink: In other words and joking aside, they may have looked pretty darn good when there were scant data, but not so great in the data immersed world in which we live. Who knows? I wouldn’t discount anything.

Olikea -

I have only tried one candlestick. I haven’t gotten around to others. Sell rules always have to be compatible with buy rules. You are testing a short term pattern so try setting sell rule to NoDays > 3.

Steve

At one time I tried back-testing candlesticks and I found it became very “fuzzy”:

I know exactly what you mean. I have an instant dislike of any technical system that cannot be explictly prescribed, such as “head and shoulders”, and the worst offender “elliot wave analysis”, which I consider to be first class nonsense!

It comes down the the Scientific doctrine that every hypothesis should be falsifyable, and those that can’t should be ignored. People who say “you need to intepret the chart” etc. annoy me greatly because then it becomes impossible to test their claims, except through a lengthy real time experiment. And usually the answer is that they cannot outperform the market.

There is quite a good example of this in the book “evidence based technical analysis”, where he presents a few amusing graphs that could be a head-and-shoulders or a flag-and-pennant, the true “signal” only obvious in hindsight! Very amusing!

so try setting sell rule to NoDays > 3.

Thanks Stitts, I tried this, still no good. To try and make the test as scientific as possible, I wanted a sell rule that would not introduce any uplift or downlift.

So Stitts - what candlestick pattern works for? Go on wisper it in my ear :wink:

Olikea - Pssst. Listen closely, whisper, whisper - “candlesticks work, no bull!”

candlesticks work, no bull

I want to believe! I really do! Help me find my faith, show me the light (sim)! :slight_smile:

Olikea - if you want to see the light then read my last post again. And again, and again. You never know. Maybe there is a clue there somewhere!

Steve


StittsHolyGrail.png

:slight_smile:

In a game of “spot the difference” I am going in the right direction:

http://www.portfolio123.com/port_summary.jsp?portid=262329

?

You are on the right path! Only about a million times improvement to go. But the close < SMA(10) doesn’t make sense. Instead try making sure that the close is higher than a longer term moving average. Also it might help to use a neutral ranking system (if such a beast exists) until you get the technical pattern worked out.

Steve

close < SMA(10) doesn’t make sense.

Interesting, I thought “no bull” maybe meant it was to show a short term downtrend before reversing… it does seem to work, adding in the rule significantly imrproves the results! isn’t that the point? looking for a reversal?

So close to seeing the light. Along time ago I gave out two clues. One clue was candlesticks. The second clue was … Gee wiz, I forget now.

http://www.portfolio123.com/port_summary.jsp?portid=262365

Profit of 0.49% per trade, still a long way from being tradable :frowning:

You gotta get much higher profit. These stats are with 0.5% slippage and $10 commission.

Main Parameters
Starting Capital $10,000.00
Total Cash Added $0.00
Ending Market Value $28,035,360,768.00
Start Date 03/31/01
End Date 04/13/07
Days Since Inception 2204
Trading Summary
Total Buy Trades 760
Total Sell Trades 758
Annualized Turnover 5,399.25 %
Total Trading Cost $8,438,566,400.00
Realized Winners 74.14 %
Unrealized Winners 100.00 %
Overall Winners 74.21 %

Realized Unrealized
All Winners Losers All Winners Losers
Trades 758 562 196 2 2 0
Avg Return 4.21 % 8.36 % -7.69 % 8.47 % 8.47 % 0.00 %

I would be happy with a quarter of that performance!

I agree with the comments about a “neutral” ranking system. Ironically, the best candidate for such a system seems to be the average analysts recommendation!

Unfortunately it seems to suggest the Morning Star pattern, the one that looked the most promising fails miserably on this ranking system, implying all of the performance observed was down to buying value;

http://www.portfolio123.com/port_summary.jsp?portid=263088

I think I am at a dead end…

Please can I have another clue? Pretty please!

Only larger cap stocks are followed by analysts. So I’m not sure this will result in a neutral ranking system. I’m not sure what the answer is.

Steve

Random().

It does not appear in the documentation (as far as I can see), but there is a public RS named Random, which contains this function.

Thanks jtbaccarat that is very useful, we can now test systems without introducing funny uplifts or whatever, and that is precisely what I have done:

First off, a truely “Random” simulation, which is the control, it gives 2.55% annualised:

http://www.portfolio123.com/port_summary.jsp?portid=263185

Now for the tests of the candlestick patterns. Note that in all cases except for kicking, a rule “price < sma(10)” is used to catch something in a recent downtrend, as specified on the candlestick website I mentioned in the OP. Shares were held for 4 days and sold. This is only a test of the buy rules. Slippage ignored. Mktcap > 50m

In order of best to worst:

Thee Inside Up
This is the best, returning 31% annually, though the shape of the equity curve is not good:

http://www.portfolio123.com/port_summary.jsp?portid=262363

Three White Soldiers
This might have some promise, returning 23% annually. However, it this form it is completely untradable due to high turnover:

http://www.portfolio123.com/port_summary.jsp?portid=262359

Three outside up
This returned 18% annually. The equity curve is not convincing:

http://www.portfolio123.com/port_summary.jsp?portid=262362

Morning star
This returned 12% annually:

http://www.portfolio123.com/port_summary.jsp?portid=262365

Kicking
Apparently quite a rare pattern, this is frequently not invested, perhaps this hampered performance with only 10% annually:

http://www.portfolio123.com/port_summary.jsp?portid=262372

Abandoned Baby
This pattern actually managed to lose money over the period, with a negative return of -4% annually!

http://www.portfolio123.com/port_summary.jsp?portid=262368

Morning doji star
Even worse than the abandoned baby, this lost -6% annually:

http://www.portfolio123.com/port_summary.jsp?portid=262367


So in summary it would appear that candlesticks don’t work. The “three white soldiers” might just have something in it, but the edge it provides seems to be too small to be useful.

I haven’t tested “Concealing Baby Swallow” as I am not sure there is enough space in 255 characters to code that. This is not an exhaustive test of all candlestick patterns, I have only chosen the “high reliablity” ones from candlesticker.com. With results like this, I am not really inclined to test the “medium” and “low” reliability indicators!

Am I missing something?

" I am not sure there is enough space in 255 characters to code that."

Since buy rules are AND’d together, you should be able to overcome the 255 limit with multiple buy rules.

BTW, very interesting thread; science verse the “art” of reading candlesticks. I, for one, am hoping you can join the “Holy Grail” folks :slight_smile:

  1. Thanks for the effort putting this together.

  2. The “art” involves combining candlesticks with other ideas.

  3. You forgot to test the candlestick pattern, “Sashimi Violent Regurgitate Health Notice Wish Saw Before”. I think it is kind of like an island pattern at the end of a bull trend, with a explosive gap downwards. The pattern is usually accompanied with the trader keeled over moaning “I wish I hadn’t traded (ordered) that!”

Hi Olikea -

Thank you very much for saving me the work of testing all these candlestick patterns. Presumably you have tested all the major patterns?