You are on page 1of 18

Oscillators Back Testing Project – Automobile Sector

An Assignment submitted in partial fulfilment of the requirements for


the SIP Programme of Bajaj Allianz General Insurance

By

DIVYANSHU SHARMA
CHRIST UNIVERSITY (Kengeri)
Bangalore, Karnataka

SIP PROGRAMME
BAJAJ ALLIANZ GENERAL INSURANCE,
NEW DELHI
JUNE 2021
 Oscillators
An oscillator is a technical analysis tool that constructs high and low bands between two
extreme values, and then builds a trend indicator that fluctuates within these bounds. Traders
use the trend indicator to discover short-term overbought or oversold conditions. When the
value of the oscillator approaches the upper extreme value, technical analysts interpret that
information to mean that the asset is overbought, and as it approaches the lower extreme,
technicians consider the asset to be oversold.

How Oscillators Work


Oscillators are typically used in conjunction with other technical analysis indicators to make
trading decisions. Analysts find oscillators most advantageous when they cannot find a clear
trend in a company's stock price easily, for example when a stock trades horizontally or
sideways. The most common oscillators are the stochastic oscillator, relative strength (RSI),
rate of change (ROC), and money flow (MFI). In technical analysis, investors find oscillators
to be one of the most important technical tools to understand, but there are also other
technical tools that analysts find helpful in enhancing their trading, such as chart reading
skills and the technical indicators.

If an investor uses an oscillator, they first pick two values; then, placing the tool between the
two, the oscillator oscillates, creating a trend indicator. Investors then use the trend indicator
to read current market conditions for that particular asset. When the investor sees that the
oscillator moves toward the higher value, the investor reads the asset as overbought. In the
opposite scenario, when the oscillator trends towards the lower value, the investors consider
the asset oversold.
Following is the report on Back testing done for oscillators.
Sector – Automobile
Company – Tata Motors

1. Supertrend

As the name suggests, ‘Supertrend’ is a trend-following indicator just like moving averages
and MACD (moving average convergence divergence). It is plotted on prices and their
placement indicates the current trend. The indicator is easy to use and gives an accurate
reading about an ongoing trend. It is constructed with two parameters, namely period and
multiplier. The default values used while constructing a super indicator are 10 for average
true range or trading period and three for its multiplier.
The buy and sell signals are generated when the indicator starts plotting either on top of the
closing price or below the closing price. A buy signal is generated when the ‘Supertrend’
closes above the price and a sell signal is generated when it closes below the closing price. A
‘Supertrend’ is overlaid on the price chart and when the indicator slips below the closing
price, it generates a buy signal as the colour of the indicator changes into green

This is an example of Super Trend Oscillator, here we can see it is written short and long
in the chart alongside candlesticks. So when the system will write short, then we have to
short sell and if it writes long, then we have to buy the stock.
Supertrend Buy
Quarter P&L Signals Wins Losses WS LS Max DD
June - August -6.25 16 5 11 2 5 -2.47
September -November 2.3 16 8 8 5 3 -1.69
December - February -1.3 13 6 7 3 2 -1.14
March - May -12.6 14 5 9 2 3 0
Total -17.85 59 24 35

 This is a table which will tell about the backtest for Supertrend Oscillator for Buy for
last 1 year.

Supertrend Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August -1 14 5 9 2 4 -5.11
September -November -5.25 15 5 10 2 4 0
December - February -4.8 15 5 10 2 4 -2.35
March - May 15.75 16 11 5 4 2 -0.62
Total 4.7 60 26 34

 This is a table which will tell about the backtest for SuperTrend Oscillator for Sell for
last 1 year.

2. Relative Strength Index

The relative strength index (RSI) is a momentum indicator used in technical analysis that
measures the magnitude of recent price changes to evaluate overbought or oversold
conditions in the price of a stock or other asset. The RSI is displayed as an oscillator (a line
graph that moves between two extremes) and can have a reading from 0 to 100. The indicator
was originally developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book,
“New Concepts in Technical Trading Systems.”

Traditional interpretation and usage of the RSI are that values of 70 or above indicate that a
security is becoming overbought or overvalued and may be primed for a trend reversal or
corrective pullback in price. An RSI reading of 30 or below indicates an oversold
or undervalued condition.
 This is an example of RSI oscillator. Here we can see that the line is going to cut 30
mark and is coming up, at this point we are going to purchase the stock. If the line
goes above 70, then it means it is overbought and prices will fall, which means right
moment to short sell.

RSI Buy
Quarter P&L Signals Wins Losses WS LS Max DD
June - August -9.75 16 3 13 1 6 -11.26
September -November -10.2 19 6 13 2 8 -6.23
December - February 0.75 16 7 9 2 4 -1.5
March - May 3.95 22 10 12 4 6 -0.8
Total -15.25 73 26 47

 This is a table which will tell about the backtest for RSI Oscillator for Buy for last 1
year.

RSI Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 10.9 27 13 14 3 5 -1.2
September -November 4.7 30 14 16 5 4 -3.5
December - February 43.05 24 14 10 4 3 -0.33
March - May 19.45 22 13 9 4 3 -0.49
Total 78.1 103 54 49

 This is a table which will tell about the backtest for RSI Oscillator for Sell for last 1
year.
3. Moving Average Convergence Divergence (MACD)

Moving average convergence divergence (MACD) is a trend-following momentum indicator


that shows the relationship between two moving averages of a security’s price. The MACD is
calculated by subtracting the 26-period exponential moving average (EMA) from the 12-
period EMA.

The result of that calculation is the MACD line. A nine-day EMA of the MACD called the
"signal line," is then plotted on top of the MACD line, which can function as a trigger for buy
and sell signals. Traders may buy the security when the MACD crosses above its signal line
and sell—or short—the security when the MACD crosses below the signal line. Moving
average convergence divergence (MACD) indicators can be interpreted in several ways, but
the more common methods are crossovers, divergences, and rapid rises/falls.

 This is an example of MACD Oscillator. Here we can see that the blue lines need to
cut first red line and then have to go up to the middle area. If that happens, then
decide on to short sell and long.
MACD Buy
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 11.75 46 21 24 3 5 -2.1
September -November 7.15 41 21 20 5 6 -0.96
December - February 1.1 45 16 29 4 9 -3.86
March - May -12.45 43 15 27 4 8 -2.36
Total 7.55 175 73 100

 This is a table which will tell about the backtest for MACD Oscillator for Buy for last
1 year.

MACD Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 11.35 45 21 24 3 5 -0.55
September -November 15.45 41 21 20 8 5 -0.4
December - February -1.1 46 22 24 5 9 -2.48
March - May 59.6 38 27 11 7 2 -0.28
Total 85.3 170 91 79

 This is a table which will tell about the backtest for MACD Oscillator for Sell for last
1 year.

4. Stochastic RSI

The Stochastic RSI is an indicator used in technical analysis that ranges between zero and
one (or zero and 100 on some charting platforms) and is created by applying the
Stochastic oscillator formula to a set of relative strength index (RSI) values rather than to
standard price data. Using RSI values within the Stochastic formula gives traders an idea of
whether the current RSI value is overbought or oversold.

The Stochastic RSI oscillator was developed to take advantage of both momentum indicators
in order to create a more sensitive indicator that is attuned to a specific security's historical
performance rather than a generalized analysis of price change.
 This is an example of Stochastic RSI. This is same like RSI but in this we get more
confirmation when we have to take the trade. If the blue line cuts the red line, that is
sufficient enough to take a trade, no need to wait for it to go and cut the mark of 30.

Stochastic RSI Sell


Quarter P&L Signals Wins Losses WS LS Max DD
June - August 9.1 60 28 32 4 6 -0.66
September -November 1.8 55 23 32 2 4 -1.3
December - February 19.5 46 24 22 6 5 -1.72
March - May 9 56 25 30 6 6 -1.16
Total 39.4 217 100 116

 This is a table which will tell about the backtest for Stochastic RSI Oscillator for Buy
for last 1 year.

Stochastic RSI Buy


Quarter P&L Signals Wins Losses WS LS Max DD
June - August -5.95 53 20 33 4 6 -3.8
September -November 0.5 51 23 27 3 6 -2.48
December - February -7.05 50 19 31 2 5 -11.03
March - May -36.95 45 11 34 1 8 -64.67
Total -49.45 199 73 125

 This is a table which will tell about the Backtest for Stochastic RSI Oscillator for Sell
for last 1 year.
5. Volume Weighted Average Price (VWAP)

The volume weighted average price (VWAP) is a trading benchmark used by traders that


gives the average price a security has traded at throughout the day, based on both volume and
price. It is important because it provides traders with insight into both the trend and value of a
security.

 This is an example of VWAP oscillator, if the line cuts the red candlestick, then
short trade is done, if it cuts blue candlestick, then buy trade, but one condition that
need to be taken in consideration is that second candle should also be of the same
color. Then only we will implement this strategy.

VWAP Buy
W L
Quarter P&L Signals Wins Losses Max DD
S S
June - August 10.1 72 29 42 4 5 -1.96
September -November 11.1 60 26 33 4 5 -2.18
December - February 0 63 24 39 3 7 -2.52
March - May -27.6 56 18 38 4 6 -15.38
Total -6.4 251 97 152  

 This is a table which will tell about the back test for VWAP Oscillator for Buy for last
1 year.
VWAP Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 2.95 64 28 36 4 6 -1.1
September -November 11.95 63 27 36 4 5 -0.66
December - February 21.15 67 28 39 5 7 -1.72
March - May 46.6 58 31 27 7 7 -0.42
Total 82.65 252 114 138

 This is a table which will tell about the backtest for VWAP Oscillator for Sell for 1
year.

6. Aroon Indicator

The Aroon indicator is a technical indicator that is used to identify trend changes in the price
of an asset, as well as the strength of that trend. In essence, the indicator measures the time
between highs and the time between lows over a time period. The idea is that strong uptrends
will regularly see new highs, and strong downtrends will regularly see new lows. The
indicator signals when this is happening, and when it isn't.

The indicator consists of the "Aroon up" line, which measures the strength of the uptrend,
and the "Aroon down" line, which measures the strength of the downtrend.

 This is an example of Aroon Oscillator. When the blue line cuts red from bottom, it
indicates to take a trade and if blue cuts from above, it means to short sell. The
only condition is that when it cuts from bottom, make sure that it cuts below 50
mark and after that goes above 50 mark.

Aroon Buy
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 2.25 51 19 31 2 5 -1.63
September -November -5.1 39 16 23 3 8 -2.8
December - February -31.15 54 18 35 4 6 -10.65
March - May -15.2 49 19 29 4 5 0
Total -49.2 193 72 118

 This is a table which will tell about the backtest for Aroon Oscillator for Buy for last
1 year.

Aroon Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 3.5 51 23 28 3 4 -0.79
September -November 14.05 40 19 21 5 5 -0.94
December - February 30.7 53 26 27 7 5 -1.28
March - May 22.8 47 25 21 5 5 -0.64
Total 71.05 191 93 97

 This is a table which will tell about the backtest for Aroon Oscillator for Sell for last 1
year.

7. Pivot Point

A pivot point is a technical analysis indicator, or calculations, used to determine the overall
trend of the market over different time frames. The pivot point itself is simply the average of
the intraday high and low, and the closing price from the previous trading day. On the
subsequent day, trading above the pivot point is thought to indicate
ongoing bullish sentiment, while trading below the pivot point indicates bearish sentiment.

The pivot point is the basis for the indicator, but it also includes other support and resistance
levels that are projected based on the pivot point calculation. All these levels help traders see
where the price could experience support or resistance. Similarly, if the price moves through
these levels it lets the trader know the price is trending in that direction.
 In this chart we can see many lines. In this oscillator we can use trailing stop loss.
We have to look for the first candle and if it is blue and above P line, then we will
long and if it is below P line, then we will short it.

Pivot Points Standard Buy


Quarter P&L Signals Wins Losses WS LS Max DD
June - August 12.75 60 26 34 6 8 -1.05
September -November 0.8 44 16 27 7 6 -0.9
December - February 8.45 51 21 30 5 6 -1.78
March - May -13.6 35 12 23 2 5 0
Total 8.4 190 75 114

 This is a table which will tell about the backtest for Pivot Range Oscillator for Buy for
last 1 year.

Pivot Points Standard Sell


Quarter P&L Signals Wins Losses WS LS Max DD
June - August 0.75 25 12 13 3 3 -3.95
September -November 3.05 32 14 18 4 6 -1.46
December - February -9.5 30 10 20 3 4 -17.67
March - May 4.7 36 15 21 3 4 -1.12
Total -1 123 51 72

 This is a table which will tell about the backtest for Pivot Range Oscillator for Sell for
last 1 year.
8. Central Pivot Range
The Central Pivot Range (CPR) is an indicator to identify key price points to set up trades.
CPR is beneficial for intraday trading.

Before you understand the CPR, it is important for you to know the Support and Resistance;
I’d suggest you read through this chapter to know what more about Support and Resistance
before proceeding further.

The CPR consists of three components –

1. Pivot
2. Bottom Central Pivot (BC)
3. Top Central Pivot (TC)
These are derived out of the underlying’s High, Low, and Close calculations –

Pivot = (High + Low + Close)/3

Bottom CPR = (High + Low)/ 2

Top CPR = (Pivot – BC) + Pivot

Spend a minute to understand the formula. These are simple averages and manipulation to the
averages. In any technical indicator, the moment you see averages, you need to associate the
indicator to the underlying trend.

The CPR does just this, i.e. helps the trader identify key price points and the associated trend
around these price points.

 Above is an example of Central Pivot Range. Here we have to look for 3 lines and
only take trade when they are slimmer, as they get bigger in size, our chances of
taking trade gets decreased.

Central Pivot Range Buy


Quarter P&L Signals Wins Losses WS LS Max DD
June - August -6.45 113 42 70 7 7 -3.14
September -November -15.55 102 36 65 10 11 -8.09
December - February -7.5 110 38 72 5 13 -3.04
March - May -25.65 69 24 45 4 7 0
Total -55.15 394 140 252

 This is a table which will tell about the backtest for Central Pivot Range Oscillator for
Buy for last 1 year.

Central Pivot Range Sell


Quarter P&L Signals Wins Losses WS LS Max DD
June - August 12.65 77 34 43 4 8 -1.11
September -November -5.35 84 29 55 5 14 -37
December - February -16.8 78 29 49 3 6 -18.89
March - May 18.6 76 30 45 3 6 -0.58
Total 9.1 315 122 192

 This is a table which will tell about the backtest for Central Pivot Range Oscillator for
Sell for last 1 year.

9. Fibonacci
The fibonacci Oscillator can be used to identify buying and selling opportunities with its
own merit. When the stock price trades above its average price, it means the traders are
willing to buy the stock at a price higher than its average price. This means the traders are
optimistic about the stock price going higher. Therefore, one should look at buying
opportunities.
How to use Fibonacci Oscillator:

● Open the trading view and in f(x) search moving average.

● In moving average, go to settings and write length as 55 and 21.

● A chart will get formed with all the information related to fibonacci oscillator.
 This is an image of Fibonacci Oscillator where we can see that if red cuts blue to
downward, then we need to short sell, if the red cuts blue to upside direction, then
we need to long it.

Fibonacci Buy
L
Quarter P&L Signals Wins Losses WS Max DD
S
June - August -1.25 9 4 5 4 3 -1.53
September -November -2.2 13 4 8 1 5 -2.74
December - February 6.25 13 5 8 2 4 -1.02
March - May -10.65 11 2 9 1 7 -10.45
Total -7.85 46 15 30  
 This is a table which will tell about the backtest for Fibonacci Oscillator for Buy for
last 1 year.

Fibonacci Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August 0.95 8 3 5 2 2 -0.74
September -November -2 9 3 6 1 4 -1.67
December - February -13.2 15 4 11 2 5 -5.41
March - May 21.15 10 7 3 3 1 -0.29
Total 6.9 42 17 25

 This is a table which will tell about the backtest for Fibonacci Oscillator for Sell for
last 1 year.
10. Bollinger Band

Bollinger Bands are a type of chart indicator for technical analysis and have become widely
used by traders in many markets, including stocks, futures, and currencies. Created by John
Bollinger in the 1980s, the bands offer unique insights into price and volatility. 1 In fact, there
are a number of uses for Bollinger Bands®, such as determining overbought
and oversold levels, as a trend following tool, and for monitoring for breakouts.

 This is an example of Bollinger Bands Oscillator. Here we can see that an area
structure forms. Take trade only when it is big in size not narrow. If the above line
cuts the candlestick, depending on which color candlestick it cuts, take the trade.

Bollingers Band Buy


Quarter P&L Signals Wins Losses WS LS Max DD
June - August -18.45 54 16 37 2 9 -40.22
September -November 11.7 51 27 24 5 4 -1.36
December - February -16.85 56 19 37 4 7 -3.12
March - May -21 52 20 31 3 4 -8.12
Total -44.6 213 82 129

 This is a table which will tell about the backtest for Bollinger Band Oscillator for
Buy for last 1 year.
Bollingers Band Sell
Quarter P&L Signals Wins Losses WS LS Max DD
June - August -0.15 61 25 36 3 4 -1.23
September -November 10.2 55 26 28 4 5 -0.91
December - February 20.1 50 25 25 5 4 -0.87
March - May 21.7 53 29 23 6 4 -1.14
Total 51.85 219 105 112

 This is a table which will tell about the backtest for Bollinger Band Oscillator for
Sell for last 1 year.
Cumulative Ranking for Oscillators
 Below is the table depicting the ranking of oscillators as per the Back
test reports of past One year on 10 sectors cumulatively.

Winning Losing
Rank Name of Oscillator
Probability Probability
1 MACD 0.454 0.546
2 Supertrend 0.453 0.547
3 RSI 0.445 0.555
4 Aroon 0.445 0.555
5 Stochastic RSI 0.444 0.556
6 VWAP 0.440 0.560
7 Bollingers Band 0.437 0.563
8 Fibonacci 0.423 0.577
9 Pivot Points Standard 0.411 0.589
10 Central Pivot Range 0.398 0.602

Cumulative Data:

Buy Sell Cumulative


Total Win Loss Total Win Loss Total Win Loss
RSI 627 254 373 887 420 467 1514 674 840
Supertrend 664 290 374 677 317 360 1341 607 734
Stochastic RSI 2034 857 1177 1987 930 1057 4021 1787 2234
VWAP 2454 986 1468 2463 1179 1284 4917 2165 2752
MACD 1791 741 1050 1844 911 933 3635 1652 1983
Aroon 1836 751 1085 1791 862 929 3627 1613 2014
Fibonacci 521 210 311 496 220 276 1017 430 587
Central Pivot Range 3319 1245 2757 2146 1175 1582 6076 2420 3656
Pivot Points Standard 1434 562 872 992 436 556 2426 998 1428
Bollingers Band 2098 854 1244 2238 1042 1196 4336 1896 2440

Conclusion:
 From the above table, it is certain that the MACD has the highest
probability of winning with winning probability of 0.4544, while the
CPR has the lowest winning probability with 0.3982. MACD is the best
oscillators in all the sectors, namely FMCG, Private Banking, IT, NBFC,
Steels, Automobile, Pharma, Public Banking, Hotel and Entertainment.

You might also like