I have created a simple price action strategy:

BUY: If, after at least 3 RED bars of lower highs & lower lows (that actually have wicks and are not "solid"), you have a break in the pattern: a higher high and higher low AND the breaking candle isn't enveloping the last RED candle (if this happens, wait for 2 candles to test the new "breaker.") If there is a definite trend, don't trade more than 50% of your regular size against it. WAIT: For {your bar size*6 bars} SELL: When the stock shows weakness, gets to resistance, or you have two lower highs and lower lows.

It seemed to work in the backtesting I did, and so I put it to use on a demo account for live trading. It generated about 80% wins over 120~ trades, while the S&P 500 was up 7%, with a R : R ratio of 1:1.5 Why? My price action strategy works better than I would have thought it would, but I can't exactly explain why...

Is this a trend-following strategy that relies on reversion to a regression line, a mean reversion strategy, or neither? Why does it work?

EDIT: I do not want to debate the effectiveness of technical analysis. I want the answer to this question: Is this a trend-following strategy that relies on reversion to a regression line, a mean reversion strategy, or neither? Please do not answer by saying that my strategy is not actually effective (I know that it only works sometimes.)

  • 3
    I notice this is a very specific algorithm with lots of arbitrary numbers in it. How many algorithms did you select from, to pick this one? Is it a xkcd.com/882 situation?
    – user253751
    Mar 11, 2021 at 17:05
  • Also what does "shows weakness" or "gets to resistance" mean?
    – user253751
    Mar 11, 2021 at 17:05
  • 1
    Try it during a time period when things are going down. You'll probably find the win/loss ratio nearly reverses. And then fact that your losses are 50% greater than your gains will kill you. Mar 11, 2021 at 17:13
  • 1
    @Mteam888 "Don't talk to me about curve fitting" why - it sounds like that is exactly what you have done, by optimizing it for a particular data set. Try running it again on various data sets [time periods, industries, countries, etc.], and see what happens. Mar 11, 2021 at 17:27
  • 1
    @Mteam888 Then all those other indicators are part of your algorithm, no? You forgot to write the whole algorithm in the post. And what algorithm do you use to establish a resistance level?
    – user253751
    Mar 11, 2021 at 17:39

3 Answers 3


The key thing about these types of analysis is they are just a form of data dredging if you don't have a clear hypothesis before you start exploring the back tests.

If you left a basic evolutionary technical analysis model just randomly mutating for a few days on a computer you will find literally millions of these that back test well. When you let them all loose in the wild, many will keep doing well for a while, many will fail fast, and many will look on and off for ages. Over very long samples, these models in aggregate will perform worse than just buying and holding minus the additional fees and spread you pay trading frequently.

So the simple answer to your question of why it works is it is extremely likely it is luck (so far). As a result you should be prepared for the performance to fall off a cliff at some point and not lose too much money chasing on it if/when it does stagnate vs the buy and hold return you could have got. If it doesn't, and it holds its profile for a large number of trades (1,000s+) and you follow something like the Kelly Criterion and invest it over and over you will be a multi billionaire long before you need to worry too much about why it works.

  • Thank you, this answer is useful, but is this a trend-following strategy that relies on reversion to a regression line, a mean reversion strategy, or neither?
    – mteam88
    Mar 11, 2021 at 17:17

I am going to avoid specific discussion of the actual methodology you have chosen, and add the proviso that I do not believe in the efficacy of technical analysis for use by individual traders [See my note below].

The short answer in why your model may be 'showing a profit' could be perhaps one of 4 things [and likely some others]:

(1) You've 'struck gold', and have found the perfect pattern that will yield you profit, not-yet discovered by institutional firms and thus still exploitable by an individual trader [again, see my note on this below].

(2) Your backtested data represents historical results, which are not the same as future results. In particular, from a statistical methodology perspective, if you create a model on 1 data set, all you have found is that it matches this data set - not that it is necessarily more broadly applicable to the world at large. In statistics, this is called 'overfitting' the model. It means that potentially, you have finely tuned your model to perfectly match a specific data set, which has its own quirks that in whatever way don't exactly match reality. You must then test across multiple other data sets to begin to assess broad applicability.

Funny example of this flaw in practice: I heard a story once (possibly apocryphal, I don't know), about a trader who had a model that exactly predicted the price of gas. It was really, really good - you could plug in the day from the past 40 years or so, and it would use data only available at that time to predict what the crude price would be the following month and year. But someone analyzing the model before applying it to their own investments made a discovery - not only did it pick up things like shipping orders internationally, or price of consumer goods, or currency - it also exactly predicted the surge in gas prices in the early 90's... which was impacted by the first gulf war.

How did the model so effortlessly predict it? The creator had inserted a calculation variable that was basically "if Saddam Hussein invades Kuwait, surge the price of gas 15%". Which is all well and good for understanding why the price of gas went up, but it has no applicability to a post Saddam Hussein world. The error was that the model's creator had over-fit the model to exactly match the data on hand, and while it reduced the statistical variance in historical trends, it did nothing to increase future accuracy.

(3) Your intended investment plan works exactly as intended, BUT has a risk element not readily apparent from tested results. What I mean by this is that if there is a company which will increase in value 10% every year, except it has a 1% chance of going completely bankrupt every year, then it would only show failure in the final year of its existence. You must understand that there is risk inherent in any financial investment, and that risk [defined as the variance in possible outcomes] is not strictly related to returns. It would be very hard to capture this type of risk in backtested modelling, because of its infrequency.

Consider it in terms of flood insurance. Depending on the elevation of where you are, and what the rain patterns are, your insurer might say that your house is on a '50 year flood plan', or perhaps a '200 year flood plain', etc., meaning that it thinks on average that it will flood every 1 in 50 or 1 in 200 years. Even if you look at the last 200 years of data, you wouldn't statistically expect that you would see exactly 1 flood on a 200 year flood plain. This is particularly relevant in a bull market - if you are investing with long positions on equities in the most profitable market period in history, then no matter what you do should make money, even though lurking in the background is significant risk which you should be mindful of.

(4) Have you actually beaten the market? Again, the past 10 months or so post-COVID's beginning is an incredible period of growth in the US stock market. Perhaps your plan netted an annual return of 20%, but pick the right day and you could likely say exactly the same thing about a simple diversified index fund. So remember that 'performing well' needs to be in the context of relative earnings to the market.

Now your question to consider before you launch your model in practice: are you confident that the reason is #1, and not #'s 2-4, above?

[Note on technical analysis as a possible decision-making method for individual traders: You are welcomed to disagree with my bias, but please understand that at the core, I believe my position is sufficiently defended by the idea that the mega-trading houses that exist today have such superior analytical power [both through computing resources and human experience] that any simplified 'if x then do y and profit' would be immediately employed by firms able to trade in sub-milliseconds, leaving individual traders in the dust.]

  • Thank you for your answer, but it does not answer the first part of my question: Is this a trend-following strategy that relies on reversion to a regression line, a mean reversion strategy, or neither?
    – mteam88
    Mar 11, 2021 at 17:28
  • 2
    @Mteam888 I am not familiar enough with standard TA terminology, such as it is, to provide a comment on that additional question raised, but I would suggest that if you don't know how to categorize your method, you don't understand it enough to be aware of its risks. Mar 11, 2021 at 17:30
  • A good point, but I would like to know to adjust my strategy and how to classify (I personally think it is a strategy that relies on reversion to a regression line) but I wanted a second opinion.
    – mteam88
    Mar 11, 2021 at 17:34

In order to judge whether this is a mean reversion or trend following, you have to look at the distribution of returns.

If the returns are most of the time on the lower side, but have occasional large positive spikes, the skewness of the distribution is positive, and you are doing trend following.

If the returns are most of the time on the higher side, but have occasional large negative spikes (crashes), then the skewness is negative, and you are doing mean reversion.

I don't have a way of judging the distribution of returns, because I don't know what the typical or extreme return happens to be when your arbitrary candlestick rules trigger.

But you say you have 80% wins; it also matters HOW BIG of a win they are, and HOW BIG of a loss the remaining 20% are. Is your strategy overall profitable in backtests?

I must say I am very skeptical you'll beat the market over the long run; I believe you will have rare but severe crashes. This means you are doing mean reversion.

I warmly recommend the book Systematic Trading by Rob Carver, that taught me these concepts and more.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .