0% found this document useful (0 votes)
7 views10 pages

Vol 2

vol2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

Vol 2

vol2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Volatility and volume indicators 145 ‘The formula is as follows: CMP =SUM (AD, n)/SUM (VOI, n) + (6) where nis the number of periods and AD equals Volume (VOL) * (Close — Open)/ (High - Low), where AD is accumulation distributio mn, Prices close in the lower half of their daily range with increasing volume. As can be seen from the formula, ifprices consistently close in the upper hall oftheir range on ‘ator would be positive. If prices are closing in the lower half of their daily high low range on increased volume then the indicator woul be negative Te also enables us to have overbought and oversold levels for ths indicator, Pesta divergence is seen when prices are making lower lows, but the indicator makes higher lows, and similarly, a negative divergence is seen when prices make higher highs while the indicator makes lower highs. While divergences are common in all oscil. lators, it looks very strong and balanced in the money flow indicator (Pring, 2014). Just like the volume ROC, the Chaikin Money Flow Index helps with under- standing the volume accompanying the price. We can see at point 1 of Figure 7.7 prices have been increasing as shown by the higher highs made by price, but che (Chaikin Money Flow Index shows a fall, suggesting that the trend is not supported by increased volumes. Similarly, at point 2, we note divergences in prices and the volume, ‘At point 3, prices have been making a higher high, and the volume histogram also shows an increase in the volume, However, the Chaikin Money Flow Index shows lower highs, suggesting that the price trend is not supported by an increase in volume. FIGURE 77. Chaikin Money Flow Index on SBI (daily chart), Created with Bikon, Refinitiv 146. Volatility and volume indicators 7.4 Case studies: using volatility indicators for trading decisions Se ing the Let us discuss the use of volatility indicators to make trading decisions using following cases. A. Reliance industries ple methods applied ~ Bollinger In Figure 7.8 of reliance industries, there are m Bands, volume, and ATR, Following are the important observations, During the period from November 2018 to mid-January 2019, the stock moved in a narrow range. This resulted in a contraction of Bollinger Bands. During the same period, the average volume also steadily reduced. Prior to the consolidation, there was a sharp fall in prices in October 2018, This sharp correction resulted in a rise in the ATR value as expected. A fall in prices is normally associated with a rise in volatility and bigger candles. The trending move was followed by non-trending move, and the ATR moved lower during the consolidation phase. On 18 January 2019, there was a clear breakout above the upper end of the Bol- linger Bands. There was a contraction in the bands which indicated a non-trending move, and this was followed by an expansion that confirmed a trending move is Probably emerging. This was also associated with a sharp rise in volume which far- ther supported the breakout. The ATR also rose slightly along with the breakout, FIGURE 7.8 \ce industries (daily chart). Created with Amibroker , ) ) y ; > J ) > » > > > > > > > > > + a+ Ao oe: Pye Vuwuwvyy » - -, - Volatility and volume indicators 147 as expected, which provided secondary confirmation and increased the validity of he positive trend emerging. Se ee a ee linger Bands, volume, and the ATR. By using multiple techniques, the conviction to take the trade increases and ensures objectivity. The ATR can also be used in order to derive stop loss for the position and to trail the stop for riding the trend. As the ATR tracks volatlivy it is best to use it for systematically deriving the stop levels. A trailing stop can be kept at two times the ATR value. This will ensure that with a rise in volatility, the stop is placed sufficiently far away to avoid getting whipsawed during the day. In Figure 7.8 of reliance industries, we can see the ATR value around 25 on 18 January. Two times the ATR gives 50. This value is subtracted from the close of 18 January, which was at 1184. Thus, an ideal stop will be at 1184 — 50 = 1134. This is also just below the low of 18 January, which was at 1135. Thus, 1134 becomes an ideal stop based on volatility and below the lowest point of the day. A trailing stop will keep changing with prices and volatility movement. By simply following the preceding method of ATR and keeping a trailing stop Joss, one can ensure to ride the trend using a systematic method of a volatility- based stop. Bollinger Bands, pattern breakout, and ATR can thereby be combined to derive a high-conviction trade set-up. B. Nifty 50 In Figure 7.9, the Nifty Index daily chart is taken to keep it in continuation from the case in the previous chapter. This will enhance the perception of looking at the charts using diferent methods discussed in previous chapters and analysing the crash during 2020 known historically for financial markets meltdown, economic turmoil, and the COVID-19 pandemic. During the period from September 2019 til January 2020, there was wedge-pattern formation discussed in detail in earlier chapters, This was associated with a reduction in volatility, and the ATR. clearly represented that. The average range of the index continued to decline until the breakdown from the wedge pattern was witnessed. The Bollinger Bands contracted during the period, and the break on the downside from the ther confirmed along with the Bollinger Bands’ expansion. The ATR also reversed back on the upside, thereby indicating the rise in volatility w' ciated along with the fall. The ATIC reading was nearly 10 Mbich shot up above 500 levels by 24 March 2020. The similar outcome was seen in the India Volatility Index that moved from the sub-12 levels to the high above 86 by 24 March 2020, This cleutly confirms that the ATR. can be eoed as a proxy for ass fey peels ase a this scenario would have had to adjust and stoy cordingly to accommodate for the rise in 5 hanged post Ja ‘The cases discussed in the last three chapters under! here ee pattern was later firr- hich is normally asso- 0 on 28 January 2020 148 Volatility and volume indicators cm 13200 12000 1200 = Gane Baa TTD) BBToOEe DA ora TUEaTTS EA Cove 080800 TO Darron a 2 ier ea a EW ara areas Reenare wit FIGURE 7.9 Nifty 50 (daily chart). Created with Amibroker markets have become more volatile the use of volatility and volume indicators will be crucial for trading decisions. Both volatility and volume in, refine trading decisions and have effec vhich, as we will see, is ¢ Useful for longer-term forecasting and in-depth unde Tet us now take up an understanding of the price ‘9 Predict long-term price movements: the Blow ‘xtremely ‘standing of the market trend. movemtent which will alow ue ‘Wave Principles, in Chapter 8, 7.5 Key takeaways 1 Moving average envelopes are the Simplest measure of the volatility of Price movement, 2 Por Bollinger Bands, two trading bands are placed around a suitable TB: #2 standard deviations of the series 3 The difference between the pber band and lower band (bandwidth) is an indicator of the extent of volatility of the series. moving ie 2) nere 5. Given 2/6) +H6*(1— returns =LN yamn F); SMA ns H, J, and /s-period SMA. y. the 10-period rages start in VOLS oe LY LOLELDDDODUOOOOCCECECECC EES NN Volatility and volume indicators 149 4 Narrowing of the bands indicates squeeze and is followed by period of expan- sion in volatility. 5 During range-bound market, the upper and lower bands provide resistance and support to prices, respectively. 6 The ATR looks at the range between high and low prices to arrive at an esti- mate of volatility. 7 The volume ROC is the percentage change between current period’s volume and the volume n periods back. 8 The Chaikin Money Flow Index compares the closing price to the daily high— low range to determine what is the volume that flows in or out for securities trades. Notes 1. Taleb, NN. (2001). Fooled by randomness: The hidden role of chance in life and in he markets New York: Penguin Random Howse LLC. 2 Normal distribution is a continuous probability distribution frequently used for repre senting random variables whose distribution is not otherwise known. Standard normal Gistribution is a normal distribution with mean O and the standard deviation 1, Fora vari~ Sble with the standard normal distribution, 68% of the observations lie within £1 stand. ged deviation of the mean of O and 95% lie within +2 standard deviations of the mean. arket action closely) will average. This means that the shorter-period will cross the det Petiod average from above, signifying given here, we use 5-, 10-, and 20-petiod EMAs for the gen- Bene Of signals. As the calculation Of EMA requires the SMA, at the outset, the SMA columns are created, Table 10.3 sho SMAS (in column EMA? =Close Price, * weight + (1—weight)* EMA,,, Q) where weight equals 2/( that the B column has cl lose prices, we therefore have 2/6). Similarly, EMA EMA, and EMA® can be calculated. Column M calculates log returns as Log (Pt/Pt — 1). In Excel, Log returns =LN (B3/B2), where column B gives closing prices. he file “Ch_10_2' gives the calculation of average prices (column F); SMA >, 10, 20 (columns G, 1, and K, respectively); EMA 5, 10, 20 (columns H, J, and {, respectively), and Log Returns (column M). Please note the 5-period SMA, and EMA will sart in the sixth row in the Excel sheet, Similarly, dhe 10-period SMA and EMA start in the 11th row while the 21st row, B7*(2/6) +H6*(1— 20-period moving averages start in TABLE 10.3 Calculation of the average, SMA, and EMA _— G H Average ‘SMas BMas ——— Os 2: - 31 3 4 2 AVERAGE (2.06) 6 7 =AVERAGE(@3:B7) ‘Where column B gives clowe prices and C gives open prices Source: Author 7*(2/6) + 61-276) trading ‘212 Backtesting andl algorithmic r Strategy 1: Simple Crossove! ie 1: Sett when 2) < EMA (ay Pecudo code of trade signal & Bay when 2. >!MA, cay ental that if the price is wreater than gh The coding ofthis rosa STCRY eh the Bh — EMA, a buy decision is made, eee ee) ae ee eee se) 1,-1), where the open price is recorded in ae ae a ou a. or ‘buy’ position, and -1 indicates a short op ‘sell column C, 1 represents a y position. Strategy 2: Double Crossover Jn coding a double crosover, the buy signal inthis example is generated when the 10-period moving average cuts the 20-period average from below. This identifica tion of this point on the chart is as follows: in period t ~ 1, the 10+ 's below the 20-period average, and then in period t, above the 20-p. Period average the 10-period average is «riod average. The sell signal in chis example is generated when the 1G-period moving average cuts the 20-period average from above. This identifi. cation ofthis point on the chart is as follows: in the period t — 1, the 10-period Teake # above the 20-petiod average, and then the 10-petiod average is below the 20-period average. Pseudo code of trade signal: Buy when EMA, EMA» (4a) Sell when EMA, > EMA‘ EMA" < EMA® (4b) Let us code the c sheet ‘Ch10_2°( Irian aad feng sian oe 22 is as follows: 2>1.22), “buy i 3 shere E 1 UY TFAND (2151: “sell, 2 ae a ae ae Measured in Sie J aoe a Pe Detween py » Tes r coded as AS and EMA 10 Doubs Cross Signal 1) will be I AND H21<)21,44225)99) ; “buy”, 1 (Ay where EMA 5 and F} SAND (Ha1>)9; “sell”, 9), Md EMA 10 ae messuceg in columns eee ee ou TABLE 10.4 EMA 10. 20, and the double crossover signal’ Jj EMA10 *(2/11)4]21*(1-2/11) 323%(2/11)+]22%(1-2/11) 24 = 324*(2/11)4)234(1-2/11) Soune: Author, L EMA20 }22*(2/21)4L21*(1-2/21) =B234(2/21)+L224(1-2/21) 324¥(2/21)4L.23*(1-2/21) “Where column B gives close prices, and column F gives average prices Q R DOUBLE CROSS SIG! VAL 2 RANSPI =IF (AND (21<121J22>122), “buy” IE (AND (21>L21J22<122),"sell”")) F (AND ()22123), “buy” IF (AND (22>122,23<123),"sell",*")) F (AND (]23<123,)24>L24),, “buy” IE (AND (23>1.23,)24<1.24),"sell"")) =IF(Q21<>"",F22,R21) =IF(Q22<>"",F23,R.22) =IF(Q23<>"",F24,R23) €1z Guipe 2ywipyobye pue Bunsayea ic trading ith 214. Bactesting and 2!90% and exit transacti con price (ETP) is ie co materialize iM€O 3 CCT cither open, close, OF average price, he transaction Pree ane high oF low price. Again, white | ers tse assumption for daily data, it can arom the open price for the next periog prior cell is not empty (ie. there i a buy riod), the close price or average price is vinues, This is shown in the last cohimn rice ae ¢ in the next period, as the strat. = e open pric e : ne omer the OTe een the next period. While it may cay is assumed te be assumed that th wwe eat astne transacting at the open ' e will transe handly be assumed that we will eran for, say, hourly or minute data, If the or sell signal generated in the previous P ¢ cont that we will price may taken, or the previous position price of Table 10.5. Return calculation In this example, we calculate returns assuming a buy position is held till the next sell signal, and the position is short till the next buy signal. In other words, a trader will remain long on a strategy till he gets an opportunity to sell, and similarly, he ‘will remain short tll he gets an opportunity to buy back the security. For buy decision, TP, ae (5a) And for sell decision, (5b) Tr. This is shown in Table 10.5, The performance metrics f for the two strategi ‘gies are shown in Tabl. le 10.6. TABLE 10.5 Transaction prices and returns” urns eee s TRANSP1 — RETURNS 2 = pucanl ty ey ienaamt ) SIF P12 =4cy RiB/RiB VR13 “1, IF (P12=“buy”, 14 AIF (QU3<>"", F14, R13) phar, —) SIF P13 s¥sehp> 15 Que" FSR) PRIS omy ARIS, IB (P13="buy”, P14 =cip 3 I”, 16 IRQ Peis) ERR Ig RA, Te eae =IB (P15 os 5 sel» ERI ALIS, RIS, IF P15: buy”, Source: Author, * Where column Q gives the double cro *SOVEr signal AVA che ee

You might also like