# Technical Indicators

#### 1Y Max Loss

Indicates the maximum fall in the value of the investment over the previous 1 year; In simple terms, it is the % return an investor would have made if they would have bought a stock at the highest price point and sold and the lowest price point in the past year. It gives investors an idea of the worst-case return if they decide to invest in a particular stock. Also known as maximum drawdown, the calculation of this metric is not as straightforward as the % difference between the 52 week high and low. Since the low could be before the high, that might not necessarily be your worst return, rather the % difference between 52 week high and the lowest point occurring after it would be your max loss.

#### Simple Moving Average

A simple moving average (SMA) is just what it sounds like, simply an average of the closing prices in a particular date range. For instance, a 10D SMA means the average of all closing prices from today to 10 days ago. It is primarily a technical indicator more relevant for traders. Comparing average closing prices of different stocks doesn’t tell much, since the absolute stock price can be anything, and irrelevant to how good the company is at its core. However, since closing prices change daily, it can cause unnecessary noise in price-specific ratios like P/E, P/S, etc. To avoid this, users can implement smoothened out ratios like (50D SMA)/E rather than just P/E as custom filters.

We have added 10, 50, 100, and 200 day SMAs as screener filters

#### Exponential Moving Average

An exponential moving average (EMA) is a type of moving average (MA) that places a greater weight and significance on the most recent data points. The exponential moving average is also referred to as the exponentially weighted moving average. An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average (SMA), which applies an equal weight to all observations in the period.

The following formula is used to calculate the current EMA:

EMA = Closing price x multiplier + EMA (previous day) x (1-multiplier)

The multiplier is added for smoothing (weighting) the EMA, which typically follows the formula: [2 ÷ (number of observations + 1)]. For a 20-day moving average, the multiplier would be [2/(20+1)]= 0.0952.

We have added 10, 50, 100, and 200 day EMAs as screener filters

#### Alpha

The data item is calculated as the excess return of the stock over and above the corresponding benchmark returns. The data item is calculated using 104 weekly price close points

Benchmark is the standard against which performance of a security is measured. For example if one were to analyse the stock price performance of HDFC Bank over the previous year, just saying the stock moved up 17.3% will not give us the correct picture. It is important to compare the returns with the either Nifty 50 returns or Nifty Bank returns. Suppose we choose Nifty Bank as the benchmark, which has moved up 12% over the previous year. We can then conclude that price performance of HDFC Bank over the previous year has been better than the corresponding benchmark index.  Alpha in this case is (17.3 – 12.0) = 5.3%

#### Beta

Beta is a measure of a company’s stock price risk in comparison to the market

A company’s stock price faces 2 different kinds of risk. The first one called the “unsystematic risk” is specific to the company and affects only the specific company. For example labor dispute in Maruti Suzuki will affect only shares of the company and not other shares in the market. However natural calamity, political instability etc. will affect all the participants in the market  and hence is called “systematic risk”. Beta is a measure of systematic risk and indicates the extent to which the stock price will move in comparison to the market

Companies whose beta is greater than 1 are classified as “high beta stocks”. The stocks of such companies are very volatile and move up or down a lot more than index prices. If the investor is foreseeing a bull run in the market, investing in such stocks might increase the possibility of better than market returns. “Low beta stocks” have beta less than 1 and are less volatile. Prices of such stocks are subdued when compared to index prices. These stocks usually act as safeguard against price drop in a bear market

#### Sharpe Ratio

The ratio helps understand the excess return earned on the stock over and above the benchmark rate of return for a single unit of risk. The data item is calculated using 104 weekly price close points. Before understanding Sharpe ratio, it is important to know more about benchmark. Benchmark is the standard against which performance of a security is measured. If one were trying gauge the performance of a banking stock like Indusind Bank, it could be compared with Nifty Bank. Similarly auto stocks could be compared with Nifty Auto

Let’s assume investor P buys 100 stocks of company XYZ on 1st Jan 2016 at Rs.40/share. On 1st Jan 2017 the price of the stock has risen to Rs.57. So 1 year return of the stock is (57/ 40) – 1 = 42.5%. During the same period benchmark index moved up 5% . Standard deviation (risk) of the excess returns of XYZ over BM is 28%. Sharpe ratio is then calculated as (return on the stock – return on the benchmark index) / (standard deviation of the excess returns of the stock over benchmark)

(42.5% – 5%) / (28%) = 1.34

So the investor earned 1.34% excess return over the benchmark return for every 1% of risk that he had to bear.

One can use sharpe ratio to compare the risk adjusted returns of different stocks. Other things remaining the same the stock with the higher sharpe ratio is obviously the better one

#### Relative Volume

Often called RVOL, this ratio displays the average volume of the stock over the previous 10 days divided by the average volume of the stock over the previous 91 days.The ratio helps understand how in demand the stock has been in past few days

Suppose the 10 day average volume is 10,000 and the 90 day average volume is 4000, then relative volume is 10,000/4,000 = 2.5. RVOL above 2 is considered to be a signal of high demand for the stock and when a stock is in demand, price tends to moves up very quickly

#### Volatility

The data item is calculated as the annualised standard deviation of the daily price change for the 200 most recent trading days. Suppose we have 2 batsmen, A and B. Scores of A and B in the previous 5 matches are as below:

Match 1Match 2Match 3Match 4Match 5TotalAverage
Player A321257112321643.2
Player B119218433720740.2

As can be seen, both players have on an average scored about 40 runs per match in the previous 5 matches. However average score does not allow us to understand who amongst the 2 players is more consistent. This can be understood by studying the difference between individual scores and the average score of each player. Standard deviation is a measure of how far each number is from the average. The closer the numbers are to the average, the more consistent the batting performance is.

AverageStandard deviation
Player A43.243.70
Player B40.231.80

We have calculated the standard deviation with the help of excel. As can be seen player B, has slightly lower average than A. However his standard deviation is significantly lower than that of A, indicating more consistent performance and hence lesser risk of not performing. In the case of stocks we define volatility as riskiness of the stock and is measured using standard deviation. Higher the standard deviation, greater the volatility and vice versa.

#### Volatility vs Nifty

This data item is calculated as the difference between the annualised standard deviation of the stock minus the annualised standard deviation of the Nifty

Standard deviation of a stock or index is a measure of its volatility/riskiness. A positive number indicates that the stock is more volatile than the index and is more likely to see extreme price movements when market experiences a shock and moves up or down rapidly. A negative number indicates the opposite

#### Volume weighted average price

Volume weighted average price (VWAP) is calculated by adding the Rupee amount traded for every transaction and dividing this by the total shares shares traded for that particular day. Rupee amount is calculated as price multiplied by the number of shares traded. Formula is as below:

VWAP  = Sum of (number of shares bought * price at which share bought)  /  Total shares bought

Average price calculated using VWAP is not just based on closing price of the stock and factors in the volume of transactions at a specific price point as well.

VWAP is used as reference point to understand the price at which the security should be bought or sold. It is good to buy a security when it is trading below the VWAP. Similarly it is smart to sell the security when it is trading above the VWAP.

#### Percentage Price above 1M SMA

The data item is defined as the percentage difference between close price of the stock and the simple moving average of close price of previous 20 trading days. Suppose current stock price is Rs.30 and previous 20 trading day average price is Rs.28, the data item is calculated as (30/28) – 1 = 7.14%. This is one of the most basic types of technical indicator and helps understand the momentum of the stock. Price momentum is the rate of change in price of a particular stock
Momentum investing is a strategy that tries to understand the existing trend in the market and attempts to capitalize on the same. So if a momentum investor feels that the bull run in the market will continue, he/she will buy stocks whose prices are increasing in order to benefit from the trend. If he/she feels that the market is in bear phase and stocks will continue to go down, he/she will sell stocks with negative momentum in order to gain from the trend. Once the momentum investor identifies the trend he/she can use the percentage price above 1M SMA to shortlist stocks that have either been trending higher or dropping down

#### Percentage Price above 12M SMA

The data item is defined as the percentage difference between close price of the stock and the simple moving average of close price of previous 250 trading days. Suppose current stock price is Rs.30 and previous 250 trading day average price is Rs.22.7, the data item is calculated as (30.0/22.7) – 1 = 32.2%. This is one of the most basic types of technical indicator and helps understand the momentum of the stock. Price momentum is the rate of change in price of a particular stock

Momentum investing is a strategy that tries to understand the existing trend in the market and attempts to capitalize on the same. So if a momentum investor feels that the bull run in the market will continue he/she will buy stocks whose prices are increasing in order to benefit from the trend. If he/she feels that the market is about to enter bear phase, then it makes sense to sell stocks that have been falling in order limit losses

Once the momentum investor identifies the trend he/she can use the percentage price above 12M SMA to shortlist stocks that have either been trending higher or dropping down. If the investor is analyzing short term trend then it makes sense to use 1M SMA and when he/she is analyzing long term trends, it’s better to use 12M SMA

#### Percentage price above 1M EMA

The data item is defined as the percentage difference between the close price of the stock and the exponential moving average of close price over the previous 1 month. Suppose current stock price is Rs.30 and previous 1 month exponential average price is Rs.28, the data item is calculated as (30/28) – 1 = 7.14%.

The exponential moving average (EMA) helps understand the momentum of the stock. An EMA is very similar to simple moving average, however the former gives more weight to the latest data. Because of this, EMA is more sensitive to recent price changes compared to simple moving average. A rising EMA shows that prices are generally increasing and vice versa if EMA is falling.

Price momentum is the rate of change in price of a particular stock. Momentum investing is a strategy that tries to understand the existing trend in the market and attempts to capitalize on the same.

If a momentum investor feels that the bull run in the market will continue, he/she will buy stocks whose prices are increasing in order to benefit from the trend. If he/she feels that the market is in bear phase and stocks will continue to go down, he/she will sell stocks with negative momentum in order to gain from the trend. Once the momentum investor identifies the trend he/she can use the percentage price above 1M EMA to shortlist stocks that have either been trending higher or dropping down.

#### RSI – 14D

Relative strength index (RSI) – 14D measures the speed and change of price movement over a 14 trading day period to determine whether a stock is in overbought or oversold range. RSI values range from 0 to 100. If the RSI is above 80, it is considered that a security is overbought zone or has run up too much and might fall soon. On the contrary if the RSI reading is below 20, it is considered that the security is oversold or has fallen too much and might see price reversal soon.

Relative strength is calculated using 14 trading days of price data. A simple average of daily price gains and daily price losses are compared with each other to calculate relative strength.

#### RSI Exponential – 14D

Relative Strength Index exponential (RSI) – 14D works just like RSI -14D and measures the speed and change of price movement to determine whether a stock is in overbought or oversold range. RSI exponential above 80 indicates that the stock has run up to much, whereas a reading below 20 indicates an oversold position

RSI exponential is calculated using exponential average of price close of stocks, for previous 14 tradable days. An exponential moving average is a type of moving average that is similar to a simple moving average, except that more weight is given to the latest data

#### ADX Rating – Trend Strength

Average Directional Index (ADX) is an indicator that measures the strength or weakness of the trend regardless of whether markets are moving up or down

ADX value is calculated over a 14 day period and ranges between 0 to 100. If the stock prices have been falling and the ADX value moves above 25, it indicates that the trend is strengthening and prices will continue to fall. If in a rising market ADX value moves above 25, it indicates continued bullishness. An ADX value below 20 indicates no trend.

#### MACD Line 1 – Trend Indicator

Moving average convergence divergence (MACD) is a trend indicator that is calculated using difference between 12 and 26 day exponential price average (EPA) and tells whether a stock is in an uptrend or downtrend

An exponential moving average is a type of moving average that is similar to a simple moving average, except that more weight is given to the latest data. MACD is extremely helpful in spotting increasing short term momentum

A positive MACD line 1 value is caused when 12 day EPA is greater than 26 day EPA. This indicates increasing upward momentum. An increasing negative MACD line 1 output indicates that the downward trend is getting stronger

CompanyMACD Line 1 value
Infosys-23.44
Reliance Industries35.53
HDFC Bank28.44
Bharat Financial Inclusion-4.65

As can be seen from the table above Reliance Industries and HDFC Bank have positive MACD line 1 values indicating short term uptrend in the stocks. In case of Infosys and Bharat Financial Inclusion the line 1 value is negative indicating that stock are in down trend

#### MACD Line 2 – Signal Line Comp

Moving Average Convergence Divergence (MACD)  Line 2 is calculated as the difference between moving average convergence divergence (MACD) indicator and signal line. A signal line is a 9 day exponential average of MACD line 1

A positive MACD line 2 value occurs when MACD line 1 value is greater than signal line value. There can be different interpretations of this value depending upon the absolute value of the MACD line 1. For example, if the MACD line 1 has a positive value, it means the stock is in uptrend. In this case, a positive line 2 value would mean a strong uptrend and a negative line 2 value would mean a weak uptrend. If the MACD line 1 has a negative value, it means the stock is in downtrend. In this case, a positive line 2 value would mean a weak downtrend and negative line 2 value would mean a strong downtrend

#### Percentage From Upper Bollinger Band

Bollinger band consists of 3 lines. The middle line is calculated as 20 day moving average of price close numbers, refer to column 2 in the below table. The upper and lower bands are set at 2 standard deviations from the middle line, refer to columns 4 and 5. The last column is calculated as the difference between upper and lower band and indicates volatility. If volatility is high, the band in the last column will widen and will narrow down when volatility is low.

DayMiddle band - 20 day SMA
(A)
20 day standard deviation
(B)
Upper band
(C) = [(A) + 2*(B)]
Lower band
(D) = [(A) - 2*(B)]
Band width
(E) = (C) - (D)
188.711.2991.2986.125.17
289.051.4591.9586.145.81
389.241.6992.6185.876.75
491.801.7792.9385.857.09
592.661.9093.3185.707.61

The upper and lower band acts as resistance and support lines. This allows the trader to anticipate the price action of the stock. Generally Bollinger bands contain 80-90% of the price action, which makes a move outside the bands significant. Prices above the upper Bollinger bands are considered relatively high. The filter value is calculated by dividing the close price by upper Bollinger band and subtracting one – indicating how far the close price is from upper Bollinger band in percentage terms. Thus, a high positive value of the filter might indicate relatively higher price. Bollinger bands should always be used in tandem with other technical indicators, as in a strong uptrend prices can remain close to or above the upper Bollinger band for a long period of time.

#### Percentage From Lower Bollinger band

As explained above, Bollinger band consists of 3 lines – upper, lower and middle line. The filter value is calculated by dividing the close price by lower Bollinger band and subtracting one – indicating how far the close price is from lower Bollinger band in percentage terms. Thus, a high negative value of the filter might indicate relatively lower price. Bollinger bands should always be used in tandem with other technical indicators, as in a strong downtrend prices can remain close to or below the lower Bollinger band for a long period of time.

#### Percentage From Parabolic SAR

Parabolic SAR is used to determine the direction of a security’s momentum and the point at which this momentum might switch direction. Calculation of the item is complex and beyond the scope of this discussion.

When the SAR is below the stock price it indicates bullish uptrend in price action and is also considered the support level for the stock. When the stock price falls below the SAR it leads to bearish trend in prices and the SAR acts as a resistance level. This filter is calculated by dividing the close price by the parabolic SAR and subtracting one to calculate how far is the close price from SAR in percentage terms. A high positive value of the indicator signals strong uptrend and vice versa.

#### William %R

William %R uses a 14 day look back period and compares the close price of the stock with it’s high – low range  to understand whether the stock is in oversold or overbought range. It is calculated using the formula:

%R = (Highest High – Close) / (Highest High – Lowest Low) * -100
Lowest Low = lowest low for the look-back period
Highest High = highest high for the look-back period
Close = close price of the security for the day

William %R values range from 0 to -100. -50 is the center point and it is important to watch out for movement above and below this level. A crossover above -50 indicates that the price of the stock is trading in the upper half of the high – low range for the 14 day period. Conversely a move below -50 indicates that prices are trading in the bottom half of the given lookback period.

A reading between 0 to -20 shows overbought market conditions. Readings between -80 to -100 indicates oversold market conditions.

#### Stochastic %K and %D

Just like William %R, Stochastic %K and %D indicates the momentum of a stock. It uses the current close price of the stock and it’s high – low range to understand whether a stock is in overbought / oversold range. The indicator is based on the assumption that in an upward trending market, prices will close near the day’s high and in downward trending market, prices will close near the day’s low.

Stochastic %K is calculated using the formula:

(Current Close – Lowest Low)/(Highest High – Lowest Low) * 100

It uses a 14 day lookback period. Stochastic %D is the 3 days simple moving average of %K. The %D number acts as a signal or trigger point.

Both %K and %D values range between 0 and 100. Buying and selling signals are generated when %K and %D come close to each other. When %K point moves above %D point, buy signal is generated. A sell signal is generated when %K crosses below %D.

Values of %D line that are above 80 indicates that the security is overbought and values below 20 indicates that it is oversold.

#### 1W Change in On Balance Volume

Just like William %R and Stochastic indicators, On Balance Volume (OBV) is a momentum indicator that uses volume to forecast changes in stock price. OBV is based on the premise that sharp volume increase without corresponding change in stock price will eventually lead to price jump and vice versa.

OBV is a running total of positive and negative volume of a security. A period’s volume is positive when the current price close is above previous price close of the security. A period’s volume is negative when the current close is below the security’s previous close.

DayPrice close
(A) : Up / Down
(Mark 1 if current price close is higher than previous close else -1)
(B) : VolumePositive / Negative
(A) * (B)
OBV
17661.6
27578.8-1385730-385730-385730
37457.4-1676390-676390-1062120
47608.51328598328598-733522
57701.21488766488766-244756
67582.5-1321296-321296-566052
77598.81332924332924-233128

OBV moves up when volume on price up days outpaces volumes on price down days. OBV falls when volume on price down days outpaces volume on price up days. In the above table, the cumulative volume on down days is 13,83,416 whereas on up days the cumulative volume is 11,50,288, hence the OBV number is negative.

Percentage change in OBV volume is calculated as the percentage difference in OBV over a 1 week period. So if the current OBV number is 100 and the OBV 1 week ago was 85, percentage change in OBV is (100/85) – 1 = 17.64%.

A positive percentage change in OBV accompanied by positive price change is a signal of strong upward price momentum. But a positive percentage change in OBV accompanied by a flat or small downward moving price signals that a price reversal might be coming.

Similarly, a negative percentage change in OBV accompanied with negative price change indicates strong downward momentum. But a negative percentage change in OBV accompanied by a flat or small upward price momentum signals that a price reversal might be coming.

#### 1W Change in AD line

The Accumulation Distribution (A/D) line is used to measure the cumulative flow of funds into and out of a security. There are 3 parts to calculating the A/D line. First calculating the money flow multiplier using the price close, price high and price low numbers. Next money flow volume is calculated by multiplying volume for the period with money flow multiplier. Finally A/D line is calculated as the sum of previous A/D point and current money flow volume.

Percentage change in A/D point is calculated as the percentage difference in A/D points over a 1 week period. So if the current A/D number is 100 and the A/D number 1 week ago was 85, percentage change in A/D is (100/85) – 1 = 17.64%.

Uptrend in prices accompanied by negative percentage change in A/D line suggests underlying selling pressure and could be a precursor to a bearish trend in stock price. Conversely downtrend in prices accompanied by positive percentage change in A/D line indicates underlying buying pressure and could foreshadow a bullish reversal.

#### Super trend

Super trend is a trend following indicator and works well in trending markets, i.e in uptrends and downtrends. It does tend to give false signals when market moves sideways. Calculation of supertrend is complex and is beyond the scope of this discussion.

Super trend generates a buy signal when it closes above the security’s close price. A sell signal is generated when it closes below the security’s close price.