The use of technical analysis

My conclusion:
I haven’t found a study or meta-studies that are convinced that technical analysis works
But I agree with ETFOptimizer that to many studies test very simple technical indicators, and tend to test them in isolation. If technical analysis is to work, this must be done together with others to correct for the weaknesses that are inherent in the individual indicator.

I have read some studies that suggest that technical indicators may work on more trending asset classes than stocks, such as forex and commodities,

That said, it is recognized in financial theory that momentum and short term reversal work, so indirectly several of the technical indicators will measure in some way these two, but it probably won’t, in my view, mean that technical analysis overall works very well.

I’v thought sometimes that the reason technical analysis is so popular is first of all that it’s easier to learn and understand than the vast amount of information that needs to be incorporated into fundamental micro or macro analysis. The second is that technical analysis is a bit too easy to manipulate. With small changes in the indicators, they can provide good returns in a backtest, but which in turn makes them so optimized that they are unlikely to provide much value for future prediction of the price action of a stock.

Finally, of the simulations and screens that are available here as “public” , very few use technical analysis alone, and those who do often do poorly.

But I hope more people will publish their results with just technical analysis, so that it will be possible to probe this further.

In any case, if technical analysis is to be used, the simplest indicators cannot be used in isolation, they must be used together with others and it is important that they are not overoptimized.

But there are people in this forum who are way smarter than me, and who have done this “game” much longer, hope they can give some feedback?

I ran a 70 year timing backtest of the SP500 Index in excel, using only SMA and MACDD. Basically, the timer keeps up with the index with much lower drawdowns. It’s pretty well known that SMA works, but it’s not very exciting, and periods of whiplash occur which are emotionally hard to navigate. Here is a log plot of my test:

Mr. @sglinski, sir!

Thank you for your post. I have heard of using the 200 day moving average before, but not the MACD. Can you elaborate? I am currently using a version of the 200 Day moving average together with one of the economic indicators that Philosophical Economics mentioned back in 2016. (I only learned about those studies last year.) Perhaps the MACD would be superior.

But back to the question that Mr. @Whycliffes originally raised, do you know of an indicator or set of indicators that will improve the odds of getting a lower price for buys and a higher price for sells when acting on the live portfolio recommendations?

Cary

Good question and this gets down to trading using technicals and there is no one way to do this.
I think what everyone wants is to have the highest profit per trade on winners and lowest for losers and having a high percent winners helps. This also helps you control slippage. One way to do this is to identify stocks that have short term momentum (30 - 45 bars) and then have a shorter term pull back ~ 5 days. There are many ways to code both of these. Buying on the pull back you are getting a lower price for the stock. (Buy the dip and sell the rip). The next part is more of a trading question to control slippage. If the stock jumps 10% at the open most people will pass on it and wait for it to pull back again. If it does not pull back I pass. If your average profit per trade is 5% and the stock jumps 10% your odds of success are less. The simulation will use the average of the high and the low and would buy that stock that jumps 10% and would use the average of the high and the low so some people would just buy it. I’m sure other members have their own rules and code for this. The execution of the trade is very difficult. It comes down to trust the system and just buy it or use your own rules the day of the trade since you don’t know what the high will be for the day or the low until end of the market day. The same problem exists for the sell side. If your stock jumps 10% the day your system signals a sell that’s a good problem if it drops 10% that’s a bad problem. You just hope your system KPI’s hold for the future and it averages out over many years. This is why I avoid systems that have low profit per trade and high turnover. You really have to think about controlling slippage. I think there are members who can make this work but I can’t.

Cheers,
MV

1 Like

Great feedback here. Other TA tips: Buy stocks with a recent surge in volume, regardless of price. Use industry momentum, both short-term and long-term, and apply it anywhere from sector down to subindustry. Measure momentum (both individual stock and industry) using all sorts of methods, from the omega ratio to SMAs to VMAs to simple Close(X)/Close(X) to Close(X)/PriceH to RSI. One tip that I find works well for me is to measure individual stock momentum a month ago rather than now. That makes it much easier to buy on a dip, and it also means you don’t fall prey to mean reversion as often, since momentum is usually long-term and mean reversion is usually short-term.

3 Likes

I’ll throw in something concrete. I’ve found this useful to sell an over-bought holding and bump up the ports Avg Return.

Eval((LoopSum("Close(CTR)>BBUpper(60,2.0,CTR)",5)>=3)&(RankPos>X),1.0,0)

Here, set ‘X’ to the number of holdings (i.e. for a model that holds 10 stocks, set X to 10).

1 Like

Her are some of the best performing from danp`s excel sheet:

Pullback Loopsum( (close(CTR)-open(CTR)),5)/5 Universe Lower 10,4
Pullback RSI(8) Universe Lower 9,8
Pullback close(0)/lowest(#close, 50, 1) Universe Lower 9,7
Pullback rsi(10) - RSI(10,10) Universe Lower 9,7
Pullback (close(0)-Low(0))/(Hi(0)-Low(0)) Universe Lower 9,6
Pullback UpDownRatio(5,0) Universe Lower 9,6
Pullback close(0)/sma(10) Universe Lower 8,9
Pullback RSI(10) Universe Lower 8,5
Pullback ((Close(0) - Close(5))/Close(5)) Universe Lower 8,3
Pullback Close(0)/ema(10) Universe Lower 8,0
Pullback RSI(12) Universe Lower 7,9
Pullback (Pr4WRel%Chg-Pr52WRel%Chg)/abs(Pr52WRel%Chg) Universe Lower 7,4
Pullback close(0)/lowest(#close, 10, 1) Universe Lower 7,4
Pullback rsi(10) - RSI(10,5) Universe Lower 7,1
Momentum Close(0)/lowest(#close,10,0) Universe Lower 7,0
Pullback Close(0)/ema(5) Universe Lower 6,6
Pullback RSI(20) Universe Lower 5,9
Pullback Loopsum( (close(CTR)-open(CTR)),10)/10 Universe Lower 5,5
Momentum Price/PriceH Universe Higher 5,5
Pullback close(0)/lowest(#close, 5, 1) Universe Lower 5,5
Momentum Eval(Low(240)=Hi(240),(close(0) - Low(241)) / (Hi(241) - Low(241)),(close(0) - Low(240)) / (Hi(240) - Low(240))) Universe Higher 5,1
Pullback ((Close(0) - Close(10))/Close(10)) Universe Lower 4,7
Momentum ema(50)/ema(100) Universe Higher 4,4
Pullback Close(0)/SMA(20) Universe Lower 4,3
Momentum SMA(50)/SMA(200) Universe Higher 3,9
Momentum Loopsum( eval(close(CTR)<close(CTR+1), 1, 0),5) Universe Higher 3,9
Momentum Sortino(100,5,10) Universe Higher 3,6
Momentum Sortino(100,5,5) Universe Higher 3,5
Momentum sma(120)/sma(240) Universe Higher 3,5
Momentum Pr52W%Chg/Beta Universe Higher 3,4
Pullback Close(0)/sma(50) Universe Lower 3,2
Momentum (close(20) - close(220)) / close(220) Universe Higher 3,1
Pullback Close(0)/SMA(5) Universe Lower 3,1
Momentum (Pr4WRel%Chg-Pr26WRel%Chg)/abs(Pr26WRel%Chg) Universe Lower 3,1
Momentum Pr52W%Chg/PctDev(52,5) Universe Higher 3,0
Momentum Pr26W%Chg/PctDev(26,5) Universe Higher 3,0
Pullback Close(0)/ema(50) Universe Lower 2,8
Pullback Loopsum( eval(close(CTR)>close(CTR+1), 1, 0),20) Universe Lower 2,8
Momentum Pr26W%Chg/Beta Universe Higher 2,6

Thank you! Nice. It improved both performance and “overall winners” compared to my “test” system:

Test system:

Adding sell rule:

Do you use a similar buy rule to avoid overbought stocks?

Yuval,

I have not done a lot of testing of technical factors… But these were the strongest of the technical factors by any statistical tests that I did do.

Perhaps no coincidence that you mention this first. But again there are a ton of technical factors that I have not even looked at and I would not disagree with anyone who believes they have found better technical factors.

Best,

Jim

I’ve experimented a bit but not enough to use it in my models.

BTW, from your list, the following is a biased indicator. It favors low priced stocks. If it were a percentage, that concern would go away.

Pullback Loopsum( (close(CTR)-open(CTR)),5)/5 Universe Lower 10,4

Mr. @Whycliffes, sir!

Thanks for your excellent posts. I fear my I/Q is getting in the way for some parts of your posts, so I am hoping you can help me understand.

  • When you said " danp`s excel sheet", which excel sheet are you referencing?
  • When for the first rule you wrote “… Lower 10,4”, I assume that the “Lower” means lower is better, and I assume the “10,4” is the European notation that we in the US would write “10.4”. But what does the “10,4” signify?

Sorry, Mr. @Whycliffes, sir! I accidentally hit “Send” before I was finished. Now to more of my questions…

  • You have as your ranking system “AAA US 15 Total rating API 500N uten yt sine”. Is that the name of a private ranking system or is it a public one? I ask because I am so ignorant of a large part of the P123 web site.

Thank you for your replies,

Cary

Thanks. This same rule can be simplified by taking out the Eval as:

LoopSum("Close(CTR)>BBUpper(60,2.0,CTR)",5)>=3 & RankPos>X

True. But the given form was used to realize partial sells. I kept in that form to facilitate testing under the optimizer.

I see. It makes sense.

Take a look at the last post from danp here: Single factor testing tool developed using the API - #26 by Whycliffes

You will find the spreadsheet from danp.

There is a score in the right column, and yes lower is better :slight_smile: And yes your are right on the notation.

The score is a combination is based on:
image

There are some comment in the top cells on how the total score is calculated.

This is my private one, it’s just a testsystem I used to see if: “Eval((LoopSum(“Close(CTR)>BBUpper(60,2.0,CTR)”,5)>=3)&(RankPos>X),1.0,0)” would improve the performance.

Thank you so much, Mr @Whycliffes , sir!

You have pointed out something in this post that may have saved me a good bit of suboptimal work. As for the spreadsheet, as I described in this post located at Explanation for List of factors.xlsx spreadsheet and the ranking of rank factors - #6 by carymac07, I figured out almost all of the causes and the data made a lot more sense. But now for something for which I need clarification.

Your post shows the columns AU through BA, with BA “TOTAL SCORE” being the one to use. I had been using the column AE “avg top 5 buckets” and column AS “Top 5 rank”. Now you indicate that I should use column BA “Total Score” sorted low (good) to high (bad). As I look at the columns, shouldn’t I focus on column BB “Rank” sorted low (good) to high (bad)?

I want to thank you very much for your post, because as of Thursday I have been performing simulations of each single factor (sorted by column AS “Top 5 rank”) for 6 different stock universes using 3 different rank sell rules, i.e., “Rank < 95”, “Rank < 60”, and “Rank < 40” instead of the one that what was intended to be used.

And I will try out your use of Bollinger Bands as you showed.

Thank you again,

Cary

I use BA, high to low:

image

But I have tried several of the other columns also, just as a test. But the total score gives a good indicator on nodes that can be used in a rankingsystem.

Thank you so much, Mr. @Whycliffes , sir!

Here is some info related to technical analysis in general you may find interesting:

  • The book “The Encyclopedia of Technical Market Indicators”, 2nd edition, by Robert W. Colby, published in 2003. In this book, Mr. Colby looks at over 200 different technical indicators and assesses each indicator’s performance by itself, akin to @danp’s spreadsheet for the different stock factors and formulas. It includes our beloved Chaikin Money Flow indicator, as well as different moving averages, MACD, Bollinger bands, etc. While there are most likely more recent books, this is still worth your time.

  • The book “Evidence-Based Technical Analysis” by David Aronson. While you may already know the material in the book, it shows a (the ?) proper way to test the validity of technical analysis indicators.

I hope these 2 books help.

Cary