RSI Indicator: Stocks, Formula, Calculation and Strategies

文章推薦指數: 80 %
投票人數:10人

Step 6: Calculation of RSI ... RSI = [100 - (100/{1+ RS})]. For example, for (14-05),. RSI = [100 - (100/{1+ RS})] = [100 - (100/{1+ 1.24})] = ... ByRekhitPachanekar TheRelativeStrengthIndex(RSI)indicator,asthenamesuggests,tellsustherelativestrengthoftheasset.Inotherwords,theRSItellsushowwellthestockisperforming(ornot)withrespecttoitself.RSIiscountedasarobusttechnicalindicatorwhichcanbeusedtoanalysethemarketandisanimportantpartofthetrader’sarsenalasithelpsthemtomakebetterdecisionsintimingthemarket.Ofcourse,likeotherindicators,itisalwaysadvisabletousemorethanoneindicatorasithelpsusinavoidingthelimitationsandoverdependencyonjustone. Thus,inthisblog,alongwithunderstandingtheRSIindicator,wewillalsolookatitslimitationsandwhentousethem.Wewouldbecoveringthefollowingpointsinthisblogarticle: RSIplot,FormulaandExample StrategiesbasedonRSIindicator DifferencebetweenRSIandMACD IfyoualreadyknowhowtofindtheRSIindicatorvalues,jumptotheRSIbasedstrategieshere. RSIcalculationwiththehelpofanexample Let’sunderstandhowtocalculateandgraphtheRSIindicatornow.WhileyoucaneasilycalculatetheRSIindicatorvaluewiththepythoncode,forexplanationpurposeswewilldoitmanually. Date Close (1) Change (2) Gain (3) Loss (4) AvgGain (5) AvgLoss (6) RS (7) 14-dayRSI (8) 24-04 283.46 25-04 280.69 -2.77 0.00 2.77 26-04 285.48 4.79 4.79 0.00 27-04 294.08 8.60 8.60 0.00 30-04 293.90 -0.18 0.00 0.18 01-05 299.92 6.02 6.02 0.00 02-05 301.15 1.23 1.23 0.00 03-05 284.45 -16.70 0.00 16.70 04-05 294.09 9.64 9.64 0.00 07-05 302.77 8.68 8.68 0.00 08-05 301.97 -0.80 0.00 0.80 09-05 306.85 4.88 4.88 0.00 10-05 305.02 -1.83 0.00 1.83 11-05 301.06 -3.96 0.00 3.96 14-05 291.97 -9.09 0.00 9.09 3.13 2.52 1.24 55.37 15-05 284.18 -7.79 0.00 7.79 2.91 2.90 1.00 50.07 16-05 286.48 2.30 2.30 0.00 2.86 2.69 1.06 51.55 17-05 284.54 -1.94 0.00 1.94 2.66 2.64 1.01 50.20 18-05 276.82 -7.72 0.00 7.72 2.47 3.00 0.82 45.14 21-05 284.49 7.67 7.67 0.00 2.84 2.79 1.02 50.48 22-05 275.01 -9.48 0.00 9.48 2.64 3.27 0.81 44.69 23-05 279.07 4.06 4.06 0.00 2.74 3.03 0.90 47.47 24-05 277.85 -1.22 0.00 1.22 2.54 2.90 0.88 46.71 25-05 278.85 1.00 1.00 0.00 2.43 2.70 0.90 47.45 29-05 283.76 4.91 4.91 0.00 2.61 2.50 1.04 51.05 30-05 291.72 7.96 7.96 0.00 2.99 2.32 1.29 56.29 31-05 284.73 -6.99 0.00 6.99 2.78 2.66 1.05 51.12 01-06 291.82 7.09 7.09 0.00 3.09 2.47 1.25 55.58 04-06 296.74 4.92 4.92 0.00 3.22 2.29 1.40 58.41 05-06 291.13 -5.61 0.00 5.61 2.99 2.53 1.18 54.17 Step1:ClosingPrice Wewilltaketheclosingpriceofthestockfor30days.Theclosingpriceismentionedincolumn(1).   Step2:ChangesinClosingPrice Wethencomparetheclosingpriceofthecurrentdaywiththepreviousday’sclosingpriceandnotethemdown.Thus,fromthetable,for25-04,wegetthechangeinpriceas(280.69-283.46)=-2.77. Similarly,for26-04,Changeinprice=(Currentclosingprice-Previousclosingprice)=(285.48-280.6)=4.79.Wewillthentabulatetheresultsinthecolumnmentionedas“Change(2)”.Inthismanner,wecalculatedthechangeinprice.   Step3:GainandLoss Wewillnowcreatetwosectionsdependingonthefactthepriceincreasedordecreased,withrespecttothepreviousday’sclosingprice. Ifthepricehasincreased,wenotedownthedifferenceinthe“Gain”columnandifit’saloss,thenwenoteitdowninthe“Loss”column. Forexample,on26-04,thepricehadincreasedby4.79.Thus,thisvaluewouldbenotedinthe“Gain”column. Ifyoulookatthedatafor25-04,therewasadecreaseinthepriceby2.77.Now,whilethevalueiswrittenasnegativeinthe“change”column,wedonotmentionthenegativesigninthe“Loss”column.Andonlywriteitas2.77.Inthismanner,thetableforthecolumns“Gain(3)”and“Loss(4)”isupdated.   Step4:AverageGainandLoss IntheRSIindicator,tosmoothenthepricemovement,wetakeanaverageofthegains(andlosses)foracertainperiod. Whilewecallitanaverage,alittleexplanationwouldbeneeded.Forthefirst14periods,itisasimpleaverageofthevalues. Toexplainit,wewilllookattheaveragegaincolumn. Thus,inthetable,thefirst14valueswouldbefrom(25-04)to(14-05)whichis,(0.00+4.79+8.60+0.00+6.02+1.23+0.00+9.64+8.68+0.00+4.88+0.00+0.00+0.00)/14=3.13. Now,sinceweareplacingmoreemphasisontherecentvalues,forthenextsetofvalues,weusethefollowingformula, [(Previousavg.gain)*13)+currentgain)]/14. Thus,for(15-05),wewillcalculatetheaveragegainas[(3.13*13)+0.00]/14=2.91. Similarly,wewillcalculatetheaverageLosstoo. Basedontheseformulae,thetableisupdatedforthecolumns“AvgGain(5)”and“AvgLoss(6)”.   Step5:CalculateRS Now,tomakematterssimple,weaddacolumncalled“RS”whichissimply,(AvgGain)/(AvgLoss).Thus,for14-05,RS=(AvgGain)/(AvgLoss)=3.13/2.52=1.24. Inthismanner,thetableforthecolumn“RS(7)”isupdated.Inthenextstep,wefinallyworkouttheRSIvalues.   Step6:CalculationofRSI RSI=[100-(100/{1+RS})]. Forexample,for(14-05), RSI=[100-(100/{1+RS})]=[100-(100/{1+1.24})]=55.37. Inthismanner,thetableisupdated. ThisishowwegetthevalueofRSI.TheRSIindicatorgraphisalwayscreatedwithrespecttotheclosingprice.Forexample,ifwetakeintoaccountthevaluesofRSIintheabovetable,thegraphshouldbeasfollows: WhiletheformulaforRSImentionedhereisgenerallyaccepted,wecanhavecertainvariationsontheformulabasedontheweightagegiventotheAveragegainorlossvalues.Itisaknownfactthatasthenumberofdatapointsincrease,theRSIIndicatorgetsbetteratgaugingthemarket.Certainsourcesrecommendatleast250datapointsbeforeyoustartmakingtradingdecisionsonthem. OneofthereasonswhytheRSIindicatorispopularisbecauseitsvalueisalwaysbetween0and100.Thismakesiteasytoreadandformopinionsabouttheasset.Furthermore,itisgenerallyacceptedthatavaluebelow30indicates“oversold”whileavalueover70indicates“overbought”. However,itisnotaseasyasitlooks,andifwetrytoenterandexitthemarketbasedonthisfactoralone,wewouldnotbeabletotradeeffectivelyastherearenumerousoccasionswherethisadvicecanfail.Youcanseeinthegraphbelowthattheclosingpricecontinuedtoriseevenafterenteringtheoverboughtzonefrom19Marchto25April. Withthisinmind,letustrytoseeafewstrategiesbasedontheRSIindicator. RSIStrategies   RSIasatrendindicator RSIworksasareferencewhenyouwanttogaugeifthemarketisgoingthroughabullishorbearishtrend.Whilethegeneralassumptionthatanindicatorabove70indicatesoverboughtandbelow30indicatesoversoldholdstrueformostofthecases,thereareotherswhoinsistthatitcanbeheldtrueforvaluesabove66.6andbelow33.3aswell. IftheRSIclosesabove66.6butgoesbelowthevalue,itshouldnotbeassumedthatthetrendhasreversedandyoushouldshortthestockimmediately.Instead,welookforthegraphandaslongasitstaysabove33.3,wecansaythatthemarketisstillbullishwhenitcomestotheasset. YoucanseeinthegraphbelowthattheRSIindicatorcrossedtheoverboughtzoneinJuly2018andsincethen,thepricecontinuedtoriseindicatingabullrun. Similarly,iftheRSIgoesbelow33.3andrisesupbutdoesn’tcrossthe66.6barriers(or70,asisassumed),wecanconcludethatthemarketisbearish. However,oneshouldnottakethisasasoleindicationtobuy(orsell)theassetinquestion.Wewillgoforwardtothenexttopictounderstandthewholepicture. RSIassupportandresistance AswehaveunderstoodhowtosetuptheRSItrendindicator,wecanseethatasthenumberofperiodsofgainsincreaseswhencomparedtothenumberofperiodsoflosses,theRSIvalueswillkeepincreasing.Thus,itgivesastrongindicationofalonger-termtrendthantheclosingpriceswherethedailypricefluctuationscouldshowusadifferentstory. Justliketheclosingprices,wecanusetheRSIindicatorvaluestodrawatrendlineofthesupportandresistancelevelsandthus,abreakoutfromthistrendcanbeeasilyobservedintheRSIvaluesamarketpositiontaken.YoucanseeinthefollowinggraphhowboththeRSIandclosingpricehaveabreakout. Thedealhereistocorrectlyidentifyifthebreakoutissustainableforalongperiodorafalsesignal.   RSIanddivergence RSIindicatorcanalsobeusedtopredictadivergenceinthetrendbeforethepricetrendactuallyreverses. Divergencecanusuallybespottedwhen,forexample,ifthepricelineismovinghigherbuttheRSIindicatorslumpsduetothefactthattherelativestrengthoftheassetweakenswhencomparedtothepreviousperiods’growth. Forexample,let’ssaythatthepricehasbeenclosinghigherthanthepreviousdaysbutthegainisnotassubstantialascomparedtotheaveragegainoftheperiod.Then,theRSIwillcloselowerthanthepreviousday'svalue.Inthisregard,wecangetasignalthatthemarketwillgetacheckonthepriceinafewdaysandthustradeaccordingly.YoucanseethatinthefollowinggraphwheretheRSIshowsadownwardtrendwhilethepriceskeeprising.Eventually,theclosingpricesdecreasetoo. ThesameistruewhentheclosingpricehasbeenbearishforawhilebuttheRSIstartspostinghighervalues,itmeansthatthepriceswillpickup.   RSIdoublebottomsignalanddoubletopsignal  AswehavediscussedinthesectiononBollingerBands,wecanidentifythedoublebottomanddoubletoppatternusingtheRSIindicatortoo.Thegistofthedoublebottompatternidentificationisasfollows. TheRSIindicatorclosesbelow30beforerisinghigherandabovethe30barriers. Itagainheadssouthbutclosesabove30beforerisingagainsharply. Thisisseenasa“W”formationonthechart.Tradersusuallyusethispatternasaconfirmationthatthemarketisheadedforthebullishdirection.YoucanseeinthefollowinggraphthattheRSIindicatorbreachedthe30barrierson2Janbeforerisingupsharplyandthenclosedbelow,butabovethe30barrierson7Jan.ItthenroseagainandcontinuedtorisethroughoutthemonthofJanuaryandFebruarywhichindicatesabullishrun. Similartothedoublebottom,thepatternformationforthedoubletopisasfollows: TheRSIindicatorbreachesthe70levelsbeforedroppingagainbelowthe70levels. Itagainrisesbutclosesbelow70andthendropssharplyagain. Thisisseenasan“M”formationonthepricechart.Tradersusuallyusethispatternasaconfirmationthatthemarketisheadedforthebearishdirection.Youcanseeinthegraphgivenbelow,theRSIlevelbreaches70onDec'17.Later,itfallsbelowthe70thresholdsandwhileitdoesrisehigher,itdoesnotcrossthe70thresholdsagainandthenstartsdropping,indicatingabearishrunwhichlastsayear. RSIandMACDstrategy Wehavelongunderstoodthatusingasoleindicatorasthebasisforyourtradingdecisionscanbedisastrousifwefailtoreadorthereisafalsesignalgeneratedbytheindicator.Thesmartinvestoruses2ormoreindicatorstoidentifyapositive(ornegative)signalandentersthemarketaccordingly.Withthisfactor,weuseRSIandMACDtoidentifysignalswhichcanbeusedtotradeprofitably.TounderstandMACDandhowtocalculateit,youcanrefertothisarticle. WhydoweuseRSIandMACDindicatorstogether? ThereasonweuseRSIandMACDtogetheristheycomplementeachotherduetotheirinherentnatureofcomparingthepriceactionofanasset. Inthisstrategy,weenterthetradewhenboththeRSIandMACDindicatethattheassetisoversoldandexitwheneitheroftheindicatorsgivesusasignalthatthepricehasenteredtheoverboughtzone. YoucanseeinthegraphabovethattheMACDcrossedbelowthecentrelineindicatingadowntrend,butwewouldwaittillNov2018whentheRSIbreachesthe70barriersbutdropssharplyafterwards.Herewehavetwoindicatorspossiblytellingusthatthemarketisheadedtowardsabearrunandsureenough,wecanseethattheclosingpricekeepsdecliningtilltheendofNovember2018.ThuswecangoshortonthestockinNovemberandsincewesawthattheRSIindicatorgoesbelow30beforerisingagain,wecanexittheposition. DifferencebetweenRSIindicatorandMACDindicator WhilewedidmentionthatRSIindicatorsandMACDindicatorshavecertainsimilarities,theyhaveadifferentapproachtowardsit.WhileRSIindicatorsconsidertheratioofthegainsandlossescomparedtothepreviousday,MACDisessentiallyamovingaverageoftheprice. Thus,weshouldbecarefulandnotexpectthatboththeRSIandMACDwillgivethesamesignalataparticularpointintime. LimitationsofRSI ThefundamentalpropertyofRSIwhichstatesthatalevelabove70isoverboughtcanbeprovedwronginastrongbullmarketwherethecompanyisprogressingrapidlyandpostinggoodreturnstoitsshareholdersInthisscenariotheRSIcanstayabove70foralongtime,whichcanbedisastrousforshortsellers.ItisasimilarcaseforabearmarketwheretheRSIcanstaybelow30andnotriseabovethatlevelforanextendedperiodoftime. TheRSIcangivefalsesignalstoo.Therearetimeswhenadivergenceisindicatedbutthestockcontinuesinitstrend. Thus,itisalwayssaidthatweshouldusetheRSIwithoneormoreindicatorswhichwillgiveusaholisticviewofthemarketandhelpusextractmaximuminformationfromthepriceactionofaparticularasset. Conclusion Insummary,onceweknowhowtoplottheRSIindicator,itisrelativelyeasytoreaditandformanopinionontheassetwiththehelpoftheRSIindicatorgraph.Whileagenerallevelof70indicatesoverboughtand30beingoversoldexistsinthemarket,wehaveseenthatitcanbedetrimentaltorelyonthisbitofinformationentirely.HencewetrytousedifferentstrategiesonthebasisofRSIindicatorstogiveusthenecessaryconfidencetotimethemarketprofitably.Wealsosawthatitisalwaysbettertouseoneormoreindicatortohelpusinmakingmoreeducatedguessesinthemarket. The starterpack ofAlgorithmicTradingStrategieswillhelpyoucreatequantitativetradingstrategiesusingtechnicalindicatorswhichcanadapttolivemarketconditions. SuggestedReads: BollingerBands UsingMovingAverageCrossoverToTradeNiftyOptions   Disclaimer:Allinvestmentsandtradinginthestockmarketinvolverisk.Anydecisionstoplacetradesinthefinancialmarkets,includingtradinginstockoroptionsorotherfinancialinstrumentsisapersonaldecisionthatshouldonlybemadeafterthoroughresearch,includingapersonalriskandfinancialassessmentandtheengagementofprofessionalassistancetotheextentyoubelievenecessary.Thetradingstrategiesorrelatedinformationmentionedinthisarticleisforinformationalpurposesonly. ShareArticle: Apr11,2019 HowToUseBollingerBands Jun18,2019 HeadAndShouldersPattern CareerGrowth Industry Jobs&Skills TradingDeskSetup SuccessStories EPATTradingProjects Tutorials AutomatedTrading Excel&RForTrading Forex&CryptoTrading MachineLearning MathsandEconometrics MeanReversion &StatisticalArbitrage MomentumTrading MoreTradingStrategies OptionsTrading Portfolio&Risk Management PythonForTrading SentimentTrading TechnicalIndicators Ourcookiepolicy Weusecookies(necessaryforwebsitefunctioning)foranalytics,togiveyouthe bestuserexperience,andtoshowyoucontenttailoredtoyourinterestsonoursiteandthird-partysites.By closingthisbanner,scrollingthispage,clickingalinkorcontinuingtouseoursite,youconsenttoouruse ofcookies.Readmore Accept



請為這篇文章評分?