subscribe

The more he talks about trust, the faster I count my silvers - George Soros

Fundamentals of technicals

MACD: What is it all about?

Tuesday, June 2nd, 2009

MACD: What is it all about?

 

Before jumping into MACD let us take a look at differential CalculusJ. Differential calculus is a study of how functions change when there is a change in input.   A concept that is widely used in differential calculus is slope. The slope is calculated at any point on any graph of a function.

Enough?

Ok, if you are really tired of this explanation then let me explain in simple terms. Think of a car that is speeding and a car that is slowing down to stop. In both cases car is going forward. However in the first cases you know that the car is going to keep on going forward and in the second case the car is going to stop. How do you know that? It is &*^&^ obvious you would say.

Now let us apply the same logic to stocks. Looking at the everyday closing stock prices of a stock, can you guess whether the stock is going to continue going forward or stop/reverse? May be you can but I cannot. I need some tools to figure this out.

This is where differential calculus comes in. The differential calculus is measuring the slope of the slope of the function that maps stock price.

Enough?

Ok, let me put it in simple terms. MACD in a sense calculates this slope of the slope and gives you figures that you can understand. Let us assume a car is at mile 35 and here is how it travelled over the next 20 days. (Ok, I could have started at Mile 0 but it was too late to redo all calculations and paste them in the blog)

Day

Distance travelled

Mile

5 day EMA of A

3 day EMA of A

(B-C)

2 day EMA of D

   

A

B

C

D

E

1

 

35

       

2

5

40

       

3

5

45

       

4

5

50

       

5

6

56

48.66667

52.16667

3.5

 

6

6

62

54.26667

58

3.733333

3.655556

7

6

68

60.06667

64

3.933333

3.866667

8

6

74

66

70

4

3.977778

9

7

81

72.33333

76.5

4.166667

4.111111

10

7

88

78.93333

83.33333

4.4

4.322222

11

7

95

85.73333

90.33333

4.6

4.533333

12

5

100

92

96.33333

4.333333

4.422222

13

5

105

97.8

101.6667

3.866667

4.022222

14

5

110

103.2

106.6667

3.466667

3.6

15

3

113

107.6667

110.6667

3

3.155556

16

3

116

111.4667

114

2.533333

2.688889

17

3

119

114.8667

117

2.133333

2.266667

18

1

120

117.3333

119

1.666667

1.822222

19

1

121

119.1333

120.3333

1.2

1.355556

20

1

122

120.5333

121.3333

0.8

0.933333

 

You can see that though the car is moving forward, it is slowing down from day 12 onwards and presto on day 12 you can also see that column D is falling below column E.

This is basically moving average convergence/divergence. MACD delivers in simple terms some relative complex calculations in differential calculus. Column D above is slope and difference between D and E is slope of the slope. In simple terms Column D is the speed of the car and Difference between D and E is the rate at which the speed is increasing or decreasing.

Of course the standard MACD calculations use EMA over 26 (column B), 12 (Column C) and 9 day (Column E) respectively.

So you can see that MACD does have some firm grounding in calculus. Note that the MACD is rendered worthless if any fundamental news has come out for the stock under observation.

MACD will come in very useful as a runner up to the earnings but not after the earnings. You would deploy a strategy where you buy the stock a week before earnings if MACD says that the speed of the car is increasing and then sell the stock a day before earnings.

 

Go back to index
 
 
 
 
  • Share/Bookmark

Stochastic oscillators

Saturday, May 30th, 2009

(There are a considerable number of pages that explain how this ‘oscillators’ is calculated so I am not going to explain the basics)

It is very important to remember what ‘Stochastic Oscillator’ does. All it tells us is where we are today as compared to the highest high and lowest low in the last 14 periods.

The basic principle behind this calculation is that there is finite number of buyers for any stock. Once a lot of people that are willing to buy this stock have bought this stock then the price is unlikely to go up any further since there is hardly anyone interested in buying the stock. But the price may go down since it is very likely that there are a lot of people who are interested in selling the stock. Vice-versa when the price is very low.

It is important to note that sctochastic oscillator is contrarion indicator, you are playing against the trend betting that thrend has gone on for too long and must reverse itself.

So it is important to remember that

1) This oscillator will work only when stock is moving side-ways. i.e. it will not work when stock is going up or down because of some news. The news can be related to the stock or to the sector or the economy.

2) Stochastic oscillator does not consider volume and hence it is very important to use some kind of a volume confirmation.

3) I can bet my &*^&^* that people who are using stochastic are missing on rally. This is because the previous 14 periods of the rally will have a ‘recent low’ that will make the rally appear as over-bought.

4) I can also bet my *(z&^* there is a very high likelihood that people who use stochastic oscillator as the sole trading methodology end up losing heavily when stock market takes a sudden down turn. This is because the previous 14 periods of the downturn will have a ‘recent high’ that will make the rally appear oversold.

5) Never ever use this indicator for stocks that are ‘in’ the news. Remember (1) above, stochastic oscillator is only for stock that is moving sideways.

6) Never ever us this indicator for stocks that are in ‘in’ the sector. For e.g. it was not a good idea to use this indicator on mortgage related companies during the latest crash.  

Update: 19th Sept 2009

This has been at the back of my mind for a month or two but I never had energy to actually write even a short note.

After writing this article I noticed a different trading style in Stochastic Oscillator.  The pitfalls above can be avoided by this slightly altered strategy.

Allow me to go back to "Trading in the zone" and recap the important lesson in this amazing book. The only way to make money in the market and stick around for a long term is to set up trading rules. Once you set up trading rules, you do not let short term phenomenons influence your buying and selling. In other ways you do not listen to your gut-feeling, you listen only to your rules. You never ever let doubts/fear/greed overcome your trading rules.

However, this rule makes trading with Stochastic Oscillators very risky. If a stock is falling below over-sold position then it might be for a genuine reason, the company may be going bankrupt after all. If a stock is crossing over-bought position then again it may be for a genuine reason. It might be a pharma company that has discovered an important product and in that case you end up losing outsized returns.

However, these pitfalls can easily be avoided with a slightly altered strategy. One buys when stochastic oscillator falls below 20 and then rises above 20 and one sells when the oscillator rises above 80 and then falls below 80.

It should be fairly obvious why this strategy greatly reduces the pitfalls asscociated with this contrarion indicator.

Go back to index

  • Share/Bookmark