Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

ESM 644

Financial Management

Lecture 10
Dr. Hazim El-Baz
Technical Analysis of
stocks and commodities
Part II
Important note

 This lecture is not intended to encourage you to


trade stocks or commodities. We are simply viewing
the art and science of technical analysis from
engineering prospective.

 Actual trading is a dangerous business and requires


much more knowledge than we are exposed to here
as well as many years of practical experience. What
we learn here is only the tip of the iceberg

3
Reminder

 Technical analysis
 A method of evaluating securities by analyzing
statistics generated by market activity such as
past prices and volume. Technical analysts do not
attempt to measure a security's intrinsic value, but
instead use charts and other tools to identify
patterns that can suggest future activity

4
What is a technical indicator?
 Any class of metrics whose value is derived from generic price
activity in a stock or asset. Technical indicators look to predict the
future price levels, or simply the general price direction, of a security
by looking at past patterns.

 Please note that technical indicators do not analyze any part of the
fundamental business, like earnings, revenue and profit margins.
They are simply mathematical/statistical expression that is used to
determine future trends in security prices and to make or
recommend investment decisions.

5
Types of technical indicators

 There are two main types of indicators


 Leading: is one that precedes securities price movements
and maybe used for prediction. Practitioners use leading
indicators during sideways or non-trending periods.

 Lagging: is one that follows price movements (after the fact).


It is used mainly as a confirmation tool because it follows
price movement. Usually practitioners use lagging indicators
during trending periods.

6
Technical indicators classifications

 There are four classifications for technical


indicators:
1. Trend Indicators
2. Momentum indicators
3. Volume indicators
4. Volatility indicators

7
Trend indicators

 Trend indicators are used to identify trends. One


of the safest routes for practitioners is to identify
a trend and then ride it.

 Examples are the various type of moving


average (MA) and Moving Average
Convergence Divergence (MACD)

8
Momentum indicators

 Momentum indicators are “essentially”


oscillating indicators because they oscillate
up and down within some range. Practitioners
use them to identify the so called
“overbought” and “oversold” areas.

 Examples are Relative Strength Indicator


(RSI) and Stochastic.

9
Volume indicators

 Volume indicators show the volume of trades


for every price movement. When price moves
up or down with large volume, it may indicate
the conviction of those trading the security.
Low volume does not convey the same
message.
 Examples is the Money Flow Index (MFI)

10
Volatility indicators

 Volatility indicators are used to detect the


behavior of the price within price movements.
Slower movements within a given range are
different than the case when a dramatic move
takes place.

 Example is the “Bollinger Bands”

11
Applications examples
Moving averages (MA)
 Moving averages smooth the price data to form a trend following
indicator. They do not predict price direction, but rather define the
current direction with a lag. Moving averages lag because they are
based on past prices. Despite this lag, moving averages help
smooth price action and filter out the noise
 The time scale: Below is an example of a 10-day moving average
evolving over three days.

 Calculation:
 SMA = (sum of closes for n days / n)
 Where n is the chosen period for the SMA

13
MA

14
MACD
 The Moving Average Convergence-Divergence (MACD) indicator is
one of the simplest and most effective momentum indicators
available. The MACD turns two trend-following indicators, moving
averages, into a momentum oscillator by subtracting the longer
moving average from the shorter moving average. As a result, the
MACD offers the best of both worlds: trend following and momentum
 Equations:
 MACD = EMA[stockPrices,12] – EMA[stockPrices,26]

 signal = EMA[MACD,9]

 Signals:
 the MACD line crosses the signal line

 the MACD line crosses zero

 there is a divergence between the MACD line and the price of


the stock or between the histogram and the price of the
stock
15
MACD

16
Stochastic
 The stochastic oscillator is a momentum indicator that uses
support and resistance levels.
 The term stochastic refers to the location of a current price in
relation to its price range over a period of time. This method
attempts to predict price turning points by comparing the closing
price of a security to its price range.
 The indicator is defined as follows:

 where H and L are respectively the highest and the lowest price over
the last periods, and

17
Stochastic

18
Bollinger bands

 A band plotted two standard deviations away from a


simple moving average.

 Bollinger Bands consist of:


 an N-period Moving Average (MA)
 an upper band at K times an N-period Standard deviation
(MA + Kσ)
 a lower band at K times an N-period Standard deviation
below the moving average (MA − Kσ)
 Typical values for N and K are 20 and 2,

19
Bollinger Bands

20
Detrended price oscillator
 The detrended price oscillator (DPO) is an indicator in technical
analysis that attempts to eliminate the long-term trends in prices.
Leaving short-term trends, the indicator allows immediate
overbought and oversold levels to be found more effectively.

 The DPO is calculated by subtracting the simple moving average


over an "n" day period and shifted n/2+1 days back from the price.

 To calculate the detrended price oscillator:


 Decide on the time frame that you wish to analyze. Set "n" as half of that
cycle period.
 Calculate a simple moving average for n periods.
 Calculate (n / 2 + 1)
 Subtract the moving average, from (n / 2 + 1) days ago, from the closing
price:
 DPO = Close - Simple moving average [from (n / 2 + 1) days ago

21
Detrended price oscillator

22
Money Flow Index (MFI)
 The Money Flow Index (MFI) is an oscillator that uses both price and
volume to measure buying and selling pressure. Money flow is
positive when the typical price rises (buying pressure) and negative
when the typical price declines (selling pressure).
 Calculation
 1. Typical Price = (High + Low + Close)/3
 2. Raw Money Flow = Typical Price x Volume
 3. Positive Money Flow = Sum of positive Raw Money Flow over 14
periods.
 4. Negative Money Flow = Sum of negative Raw Money Flow over
14 periods.
 5. Money Flow Ratio = (Positive Money Flow)/(Negative Money
Flow)
 6. Money Flow Index = 100 - 100/(1 + Money Flow Ratio)

23
MFI

24
Chaikin Oscillator
 Chaikin Oscillator measures the momentum of the Accumulation
Distribution Line. Like other momentum indicators, this indicator is
designed to anticipate directional changes in the Accumulation
Distribution Line by measuring the momentum behind the
movements
 Calculations:

1. Money Flow Multiplier = [(Close - Low) - (High - Close)] /(High - Low)

2. Money Flow Volume = Money Flow Multiplier x Volume for the Period

3. ADL = Previous ADL + Current Period's Money Flow Volume

4. Chaikin Oscillator = (3-day EMA of ADL) - (10-day EMA of ADL)

25
Chaikin Oscillator

26
Momentum Indicator
 The Momentum Technical Indicator measures the amount that a
security’s price has changed over a given time span.
 Momentum is calculated as a ratio of today’s price to the price
several (N) periods ago.

 Calculations:
 MOMENTUM = CLOSE(i)/CLOSE(i-N)*100
 Where:
CLOSE(i) — is the closing price of the current bar;
CLOSE(i-N) — is the closing bar price N periods ago.

27
Momentum indicator

28
References

 http://www.investopedia.com

 http://stockcharts.com

29

You might also like