24

If Technical Analysis is working, why is not possible to program a bot to do it automatically?

The bot will be much faster than any human, will not make any numeric error, will not fail due emotions, will work 24/7 and also could analyse thousands of markets at the same time. And will be easy to develop! the rules for Technical Analysis are very simple.

EDIT: I am a developer, I know there are bots out there of course, I coded one myself too, and I did a lot of backtesting. And none of these bots works, that's my question, why the bots are not working if they use technical analysis. Why a human can make profit using technical analysis and a bot can not? If they are much more accurate than us making technical analysis...

LAST EDIT: I asked this in the wrong way, my question was about the public and well known strategies used in TA, like RSI overbought/sell, MACD, BB, etc. Because I'm new in trading and I can see a lot of people drawing this Fibonacci retracements, weird things like harmonic patterns, and I can't understand why people waste time drawing those things, if they work they could just create a software to detect them and buy/sell automatically. And if they don't work why those things are so famous, are all them scam? are these techniques just a tramp for beginners like me?

Enrique
  • 593
  • 1
  • 5
  • 15

12 Answers12

44

No, your anecdotal experience is not proof that a concept is flawed. There are many many many many many flaws with TA, but proving something takes a lot more than one person's casual attempts.

If I had a profitable strategy, I would not sell it, I wouldn't explain it to anyone, and I probably wouldn't even tell anyone I had it. So no, very unsurprisingly, profitable robots are not for sale. Information is far and away the most valuable part of investing. Just because you haven't figured something out, doesn't mean no one has. When people figure something out, and it's vital to their own profitability, they don't run around sharing it.

And sometimes someone figures it out and then the very successful robot runs amok, blows $440,000,000, and bankrupts your whole organization. All the great market strategies work really well right up until the point at which they don't. Some of the strategies you've back tested would likely be very profitable over the next year or two or ten because market conditions change and just because it didn't work in the past doesn't mean it won't work in the future. Backtesting is great, but the past performance cannot predict future results and that goes both ways.

To address your comments below. I think you need to define what you're referring to as "technical analysis." Generally speaking there are two avenues for which a person can analyze a security, Fundamental Analysis and Technical Analysis. Fundamental analysis involves looking at the financial state of the company over time generally focusing on the company's financial reporting. Technical analysis involves tracking the pricing of the security over time.

There is no blanket strategy of "Technical Analysis." There's no TA gospel that says definitively buy/sell when the price crosses the 200 day moving average. You're simply looking for some pricing pattern that appears in the chart to influence your decision to buy or sell, but there are literally an infinite number of pricing patterns. Maybe it's not a 200 day moving average but a ratio of 200 days times 1 minus the increase in an index over those 200 days. People come up with all sorts of weird algorithms; some people even find one that will work for a bit. Ultimately, it could be anything: as long as it involves the quoted price relative to some historical metric for the price it qualifies as technical analysis.

quid
  • 49,074
  • 11
  • 101
  • 161
14

There are firms and people doing exactly that:

WSJ article

Part of my masters thesis was using candle stick analysis and genetic algorithms, but my conclusion is that it is not really possible. The reason was that you needed an exhaustive amount of sell algorithms and one can never be sure that they discovered a sufficient set.

Others disagree.

There are plenty of scholarly articles on the subject and is an "easy" area of research due to the data and the ease of testing. If you make a profit you win.

Pete B.
  • 80,097
  • 16
  • 174
  • 245
11

Technical analysis is, by its nature, something that evaluates the past. Making money in stocks requires evaluating the future. If there was a foolproof way to evaluate the future by measuring things in the present and past, everyone would use it and it would stop working (because prices would adjust to reflect it).

I think that the story of Peter Lynch is relevant here. Lynch ran Fidelity's Magellan fund. His investment strategy was pretty simple. He went around doing things in his life and observing what companies' products he liked. So he might eat at an Applebee's restaurant and decide that they did a good job. He would then go out and do technical analysis on the stock to evaluate its fundamentals. If the stock was fundamentally sound and offered a good product, he invested.

Robots don't eat out. As a result, perhaps they will never give the evaluation that a human being will.

Note that the key here is to use the technical analysis not to pick stocks but to reject them. Some companies are on a sound financial basis and some are not. Technical analysis can, with some false positives, find companies that are not. What it can't do is see into the future and tell which companies are going to expand successfully and which are going to fail anyway.

Having a great technical analysis is no guarantee of success. Some of the best stocks had a good enough technical analysis and a bit of luck in their choice of products. That bit of luck is difficult to measure before the fact. In some cases (e.g. pharmaceuticals or oil exploration), it may be impossible.

Beyond all that, most human beings do not beat the market. While Magellan beat the market during Lynch's tenure and his replacement's, it did less well for the next guy and tanked for the guy after that. Was Lynch actually better than others? Or was he just lucky? We can't really say. It's not like we can rerun him on other time ranges and see how he does. However, with a bot, you can do exactly that. It may not be that humans are better than bots. Perhaps it's just that we are better at testing bots than we are at evaluating human performance.

An infinite number of monkeys banging on typewriters may eventually produce Shakespeare. But who wants to read through all the lines that just say faldfjoiwejifajslkf jdlaj? It's possible that humans who pick stocks successfully just happened to fit the market. With random choice, not everyone can be beat by the market.

Brythan
  • 20,986
  • 6
  • 54
  • 67
6

Your idea is flawed in the first place. You assume that your hypothetical bot competes against mathematical laws. It doesn't - it competes against other bots (and humans).

You may be able to code a bot which masters the market and produces large profits.

Until a better bot comes up, exploits the weaknesses of your design and ruins you.

You don't need a bot which can work Technical Analysis, you need to have the best bot of all times (including future times). Or be at least ahead of the competition - which you cannot be certain of in advance, only at the end of the day.

Klaws
  • 191
  • 3
4

No, it isn't. Most of the stuff I have seen used to test, and I would presume implement, is deeply mathematically flawed. I don't use technical analysis, but I can think of the state of affairs in which it should work. It is, in its essence, surfing. You cannot surf in most of the ocean, but there are places you can surf. I haven't been willing to rule it out mathematically, but I think most of the content out there is garbage.

Dave Harris
  • 4,287
  • 13
  • 22
4

Yes, it is. Any publicly known "technical analysis" is a joke for the exact reasons you pointed out. Do patterns occur? Sure, they do. Is "head and shoulders" a joke? Yes, it is - it works a couple of times, then you buy and the market crashes.

"Secret workable patterns" are NOT technical analysis - they are just trends that people noticed. Maybe some MAJOR firm buys when there is a pattern. This, in itself drives the stock price up. And you can ride that wave before trading on it becomes oversaturated (this is also why anyone willing to sell their "secret sauce algo" is scamming you - if it worked, they wouldn't want to dilute it). This has NOTHING to do with traditional technical analysis.

VSO
  • 161
  • 6
3

Trading is "art masquerading as science". This is something that any successful professional trader knows, and something that every academic sets out to disprove.

Like all things, its always best to evaluate from first principles. What actually causes markets (i.e. prices) to move?. The fundamental reason (pun intended), prices move is because of the twin reasons of greed and fear. When all is said and done, these are the primal emotions at work here.

As a mathematician and coder (with almost two decades of experience as a trader and trading system developer), I have come to realize that "mechanical systems" (especially crude* methodologies such as Technical Analysis), can at best, merely approximate (with large margins of error), complex human behaviour such as emotions.

So, to answer your question, it is not so much that Technical Analysis doesn't work, its that its the wrong tool for the job - I say this as a previously ardent believer in Technical Analysis.

However, from a technical point of view (pun unintended), unless you have exhausted the entire set of all possible combinations of technical analysis methods and their terms etc, you cannot conclude that your lack of success is conclusive proof that TA doesn't work. However, if you start from first principles, you will soon find that it is the wrong tool to use if you want consistent success in trading, as it fails to capture the nuances and interconnectedness of market movements caused by human emotion.

[[Note]] I use the word crude when discussing methodologies such as TA, because some of the central notions (e.g. taking an average over a fixed time interval) - are patently absurd, and have no bearing on reality. For those who don't get the absurdity of such an operation - I'll explain further: by averaging over a fixed time interval, there will be several times when you will be averaging prices that are being driven by entirely different processes.

2

Your methodology was most likely at fault. Just because you backtest (build a model based on historical performance) and see that something worked does not mean it necessarily will in the future, you need robustness. A key part is knowing why something works, it's not good enough that it just does. It's possibly the most competitive industry on earth, so expect it to be extremely difficult to turn a profit.

misantroop
  • 604
  • 4
  • 9
1

The thing about technical analysis is, if it analyzes anything at all, the thing it analyzes least noisily is, sentiment.

This is why human interpreters will do better than unconscious bots at using this type of pattern-"recognizing" (not to say "imagining") analysis to make trading decisions.

It's exactly like fortune telling: No bot can know enough about the facts being divined to provide worthwhile advice. But humans can, with results which might even occasionally satisfy the trader (not to say "the mark").

Beanluc
  • 448
  • 2
  • 6
0

The periodicity of any security's prices varies. The time length of the pattern is variable and sometimes it recurs. During recurrent periods, the indicator with the correct periodicity wins. Otherwise, it fails.

To demonstrate this, pick a technical analysis indicator and optimize it for the first 500 days of a security's 1,000 day data set. You have determined the indicator length that provides the optimal result (other indicator lengths may result in losses). And yes, this is curve fitting. Now test that optimal indicator on the next 500 days. Far more often than not, the results will be subpar, possibly even losing significantly. IOW, in order to get the right result, you have to know the right periodicity and that can't be known in advance.

As a simplified example, George Lane developed the stochastics indicator which measures the relationship between an issue's closing price and its price range over the previous X periods (stated in percent). 80 is considered overbought and 20 is considered oversold. Suppose the time period is the previous 10 days and the value is 80. That means that the current close is higher than 80% of the closing values of the last 10 days. Now you get a small downturn, the indicator drops below 80 and it's a sell signal (sell existing position or go short). And now, the security reverses and increases significantly in price. The signal was worthless.

There are many other such indicators and many of them provide the same general signals except that they are achieved via different mathematical calculations.

All of these technical indicators merely reflect historical performance. None of them predict anything.

Bob Baerker
  • 77,328
  • 15
  • 101
  • 175
0

Technical analysis will never be simple. Its not about mathematics but the accuracy. Uncertainties exist in any form of technical analysis. No computer is going to predict the future price movements with hundred percent accuracy. There are innumerable ways one can do technical analysis. Every method will have its own merits and demerits. Two analysts rarely arrive at the same expected price.

In short, technical analysis is not just science but an art of human judgement with the help of science. Science can be programmed but not the "art". A real human application of logic throughout an analysis workflow is more important than automating the math part of the workflow.

Kannan
  • 556
  • 5
  • 11
0

TAs can work when the market is behaving normally and the underlying mathematical assumptions behind the TA are satisfied. For example, there are a lot of assumptions that depend upon approximately Gaussian distributions in some way. These tend to hold true during normal situations.

Unfortunately economic stressors, government intervention, unexpected company decisions, and even individual actions can highly skew human reaction in the markets which can violate the underlying mathematical principles the TA relied upon. This will make the TA unreliable in reacting to these outside forces, which could result in significant losses.

Kora
  • 437
  • 2
  • 9