Module 5   Options Theory for Professional TradingChapter 16

Volatility Calculation (Historical)

View chapters →


16.1 – Calculating Volatility on Excel

In the previous chapter, we introduced the concept of standard deviation and how it can be used to evaluate ‘Risk or Volatility’ of a stock. Before we move any further on this topic I would like to discuss how one can calculate volatility. Volatility data is not easily available, hence its always good to know how to calculate the same yourself.

Of course in the previous chapter we looked into this calculation (recall the Billy & Mike example), we outlined the steps as follows –

  1. Calculate the average
  2. Calculate the deviation – Subtract the average from the actual observation
  3. Square and add up all deviations – this is called variance
  4. Calculate the square root of variance – this is called standard deviation

The purpose of doing this in the previous chapter was to show you the mechanics behind the standard deviation calculation. In my opinion it is important to know what really goes beyond a formula, it only enhances your insights. In this chapter however, we will figure out an easier way to calculate standard deviation or the volatility of a given stock using MS Excel. MS Excel uses the exact same steps we outlined above, just that it happens at a click of a button.

I’ll give you the border steps involved first and then elaborate on each step –

  1. Download the historical data of closing prices
  2. Calculate the daily returns
  3. Use the STDEV function

So let us get to work straight away.

Step 1 – Download the historical closing prices

You can do this from any data source that you have. Some of the free and reliable data sources are NSE India website and Yahoo Finance.

I will take the data from NSE India for now. At this point I must tell you that NSE’s website is quite resourceful, and in terms of information provided, I guess NSE’s website is one of the best stock exchange websites in the world.

Anyway, in this chapter let us calculate Wipro’s volatility. To download the historical closing prices, visit – and click on historical data and select the search option.

Here is a snapshot where I have highlighted the search option –

Image 1_Search

Once you hit search, a set of fields open up, filling them up is quite self explanatory – just fill in the required details and hit ‘Get Data’. Do make sure you get the data for the last 1 year. The dates that I have selected here is from 22nd July 2014 to 21st July 2015.

Once you hit ‘get data’, NSE’s website will query your request and fetch you the required data. At this point you should see the following screen –

Image 2_Download CSV

Once you get this, click on ‘Download file in CSV format’ (highlighted in the green box), and that’s it.

You now have the required data on Excel. Of course along with the closing prices, you have tons of other information as well. I usually like to delete all the other unwanted data and stick to just the date and closing price. This makes the sheet look clutter free and crisp.

Here is a snapshot of how my excel sheet looks at this stage –

Image 3_Excel

Do note, I have deleted all the unnecessary information. I have retained just the date and closing prices.

Step 2 – Calculate Daily Returns

We know that the daily returns can be calculated as –

Return = (Ending Price / Beginning Price) – 1

However for all practical purposes and ease of calculation, this equation can be approximated to:

Return = LN (Ending Price / Beginning Price), where LN denotes Logarithm to Base ‘e’, note this is also called ‘Log Returns’.

Here is a snap shot showing you how I’ve calculated the daily log returns of WIPRO –

Image 4_LN returns

I have used the Excel function ‘LN’ to calculate the long returns.

Step 3 – Use the STDEV Function

Once the daily returns are calculated, you can use an excel function called ‘STDEV’ to calculate the standard deviation of daily returns, which if you realize is the daily Volatility of WIPRO.

Note – In order to use the STDEV function all you need to do is this –

  1. Take the cursor an empty cell
  2. Press ‘=’
  3. Follow the = sign by the function syntax i.e STDEV and open a bracket, hence the empty cell would look like =STEDEV(
  4. After the open bracket, select all the daily return data points and close the bracket
  5. Press enter

Here is the snapshot which shows the same –

Image 5_STDEV

Once this is done, Excel will instantly calculate the daily standard deviation aka volatility of WIPRO for you. I get the answer as 0.0147 which when converted to a percentage reads as 1.47%.

This means the daily volatility of WIPRO is 1.47% !

The value we have calculated is WIPRO’s daily volatility, but what about its annual volatility?

Now here is a very important convention you will have to remember – in order to convert the daily volatility to annual volatility just multiply the daily volatility number with the square root of time.

Likewise to convert the annual volatility to daily volatility, divide the annual volatility by square root of time.

So in this case we have calculated the daily volatility, and we now need WIPRO’s annual volatility. We will calculate the same here –

  • Daily Volatility = 1.47%
  • Time = 252
  • Annual Volatility = 1.47% * SQRT (252)
  • = 23.33%

In fact I have calculated the same on excel, have a look at the image below –

So with this, we know WIPRO’s daily volatility is 1.47% and its annual volatility is about 23%.

Lets double-check these numbers with what the NSE has published on their website. NSE publishes these numbers only for F&O stocks and not other stocks. Here is the snapshot of the same –

Image 6_NSE

Our calculation is pretty much close to what NSE has calculated – as per NSE’s calculation Wipro’s daily volatility is about 1.34% and Annualized Volatility is about 25.5%.

So why is there a slight difference between our calculation and NSE’s? – One possible reason could be that we are using spot price while NSE is using Futures price. However, I really don’t want to get into investigating why this slight difference exists. The agenda here is to know how to calculate the volatility of the security given its daily returns.

Before we wrap up this chapter, let us just do one more calculation. Assume we directly get the annual volatility of WIPRO as 25.5%, how do we figure out its daily volatility?

Like I mentioned earlier, to convert annual volatility to daily volatility you simply have to divide the annual volatility by the square root of time, hence in this particular case –

= 25.5% / SQRT (252)

= 1.60%

So far we have understood what volatility is and how to calculate the same. In the next chapter, we will understand the practical application of volatility.

Do remember we are still in the process of understanding volatility; however the final objective is to understand the options greek Vega and that really means. So please do not lose sight of our end objective.

Please click here to download the excel sheet.

Key takeaways from this chapter

  1. Standard Deviation represents volatility, which in turn represents risk
  2. We can use NSE website to get the daily closing prices of securities
  3. Daily return can be calculated as log returns
  4. Log function in excel is LN
  5. Daily return formula = LN (Today’s Value / Yesterday’s Value) expressed as a percentage
  6. Excel function to calculate volatility is STDEV
  7. Standard Deviation of daily return is equivalent of daily volatility
  8. To convert daily volatility to annual volatility multiply the daily volatility by the square root of time
  9. Likewise to convert annual volatility to daily volatility, divide the annual volatility by the square root of time


  1. raj says:

    Hi karthik, appreciate the excel calculations. makes it very simple for all of us. as far as options concerned , for e.g a put . the stock could fall to a particular price at various times and the option premium could be different at those times. i bought a put of lupin, and at one time the stock was at 1700 and the put was trading at 5. the stock went up to 1710 and when it re tested 1700 again the put was trading at 3 this time. is there a way to determine at what premium the option could trade at same stock price points at different times of the day. will you be touching upon this? thanks a ton.

  2. Wannbetrader says:

    Fabulous :-)… Wish I was so eager to learn during my school days ,lol.

  3. Rajdeep says:

    Hi Karthik,
    I would like to congratulate you on your stellar effort in making such a complicated topic so easy to digest. If i ever succeed in trading it will only be because of you, varsity and zerodha, i say it from my heart.
    I am absolutely new to trading, i am having a confusion regarding options. What i understand is the option greeks are responsible for the change in the option prices, but there is also a separate demand-supply of each option which is created by the writers and the buyers of that particular option, so what moves the option premiums the demand supply interaction like in spot market/futures or the greeks alone(the individual options demad suppy has no role to play in setting the price) or both

    A 2nd question, from the current nifty option chain i see that the 8400 slightly OTM puts price have appreciated but the slightly ITM 8400 calls have fallen, does it mean the market is getting more comfortable with the idea of nifty falling below 8400 in the next 3 days, is that a case for buying slightly OTM puts, i dont have the confidence/conviction to trade, i am trying to confirm my understanding by thinking in terms of a trade. Cannot thank you enough for what you have done for me.

    • Karthik Rangappa says:

      Happy to read this Rajdeep…btw, if you succeed in trading (I hope you do), then its because of your heard work and nothing else. Coming to your query –

      Option premium are a function of many factors, the essence of which are captured by the Greeks. For example the demand supply situation causes directional movement and thats captured by Delta. Effect of time is captured by Theta, volatility by vega etc. So Greeks capture all the necessary price variable

      Regarding the 2nd question – Puts have appreciated due to two factors – Markets and fallen and volatility also has increased. You will understand and appreciate the effects of volatility over the next few chapter. Please stay tuned.

  4. Rajdeep says:

    Infact as i was thinking about it, i have this question for futures too, derivatives as per definition move as per the movement of the underlying, but the derivative itself is also being traded, so what determines the price of the derivative, the derivatives supply demand dynamics or the movement of the derivatives underlying or both? e.g. nifty futures is a heavily traded derivative but is the spot market single handedly determining its price ?

    • Karthik Rangappa says:

      A derivative derives its value from its respective underlying. Its unusual for the derivative to influence the price of the spot.

  5. Pankit Shah says:

    Hi Nitinji,
    I have a query….right now the market is trading sideways,1 day it increases & few days it decreases….so my query is what option strategies should i employ for trading nifty options in such a volatile market…its very difficult to make money in such a market.

    • Karthik Rangappa says:

      Any strategy that involves a credit and benefiting from time decay would be a good I suppose. Example – short strangle, straddle etc.

  6. Wannbetrader says:

    I know there is chapter coming on option strategies, but what I read so far had following thought, can you verify if it make sense?

    Using the daily volatility we can predict how much can given stock move in next few days, so using this info couple of days before expiry can give us high probability trades for example, Syndicate Bank has volatility of 2.5% with CMP of 99.7, if it continues downward move its closing price on Thursday (expiry) should be minimum 92.xx, which means PUT option of SP 90 will be OTM and end up expiring worthless that means if we short it today at CMP of .40, we have high chances of earning .40 * 2000 800 RS in 4 days. I was tempted to say we have sure shot chance , but then nothing is sure in Market 🙂

    Makes sense?

  7. NARSIMHA says:

    sir,ofcourse its good but it will be applicable in reality,ithink the simpler ur the better,correct me if iam wrong

  8. sarath lal says:

    hi kartik,
    i have a doubt what is liquidity?

  9. Vasanth says:

    Is there any resource readily available to project the Greeks value during market hours depending upon the movement? Calculating Greeks during market hours is difficult in intraday trading…

    • Karthik Rangappa says:

      Not that i know of…but my experience tells me that over a period of time you will develop a sense for this and kind of start approximating the values in your mind 🙂

  10. Shankar says:

    Hi Karthik

    Using the daily/annual volatility, can we also calculate the range of the stock/index for the next day?


  11. Krish says:

    1. How to determine whether volatility is high or low for a particular stock option? For certain stocks the number can be interpreted as high whereas the same number can represent low for others. So what is the indicator based on which we can say it’s high or low for a particular stock? Is it by comparing the annualised historical volatility number with current IV number?

    2. What is the expected time for an option volatility to raise before an event ? is it one day or five days or more than that?

    • Karthik Rangappa says:

      Krish – super valid questions.

      1) Yup – you are right here. To evaluate if today’s volatility is high or not wrt to historical vol…one of the methods is to compare today’s implied vol with historical vol. More on this topic in the coming chapters.

      2) Cant put a number for this – but usually about 1 trading week before the event vol starts to increase. Disclaimer – This is purely from my personal observation, could be wrong here.

  12. sarath says:


    how the volatility effect the option premium like delta ,theta .

    • Karthik Rangappa says:

      We are getting there sarath 🙂 The idea is to understand volatility completely before understanding its effect on Options premium.

  13. ShreyaDR says:

    also wanted to ask, if annual volatility can be calculated with the help of a formula from a daily volatility by taking 365 days. how to calculate monthly volatility? by taking no. of days in a month i.e 30 or 31? or 20/22 i.e. actual no. of trading sessions?

    • Karthik Rangappa says:

      Since we are taking the full calender of 365 days, it makes sense to take the actual number of days in the month i.e 30 or 31.

    • Karthik Rangappa says:

      Since we are taking the full calendar days i.e 365, it makes sense to take the actual number of days in the month i.e 30 or 31.

  14. vasanth says:

    Today nifty index suddenly showed a huge spike at 11Hrs which may be due to the no change in rate cut/behaved due to some other issues. How the programmed index which is running through the market partcipants immediately behaving according to the current scenarios? Is there any manual feed/input to the programmed exchange? If yes, then insiders are the players whose odds are high compare to the normal traders.. can you clarify.

  15. Abhijit Haware says:

    Hello Mr Karthik,
    Eagerly waiting for next chapters….kindly update the same…

    • Karthik Rangappa says:

      In a day or 2 🙂

      • Abhijit Haware says:

        Thanks for update…
        I know that you would update chapters in strategies in coming days but I want to know are there any strategies for intraday option trading? and what are those?

        • Karthik Rangappa says:

          Abhijit – this is a hard query for me :). At the moment I wont be able to comment on this, so please do bear with me.

  16. Shibashis says:

    Hi Karthik,
    One question regarding daily return calculation.
    By using ((570.9-558.75)/570.9)*100 this formula daily return is :2.12%. But we are getting 2.15% using log base e.please tell me, Why you use log base e over linear return or even log base 10.
    Thanks in advance.

  17. raj says:

    Karthik, while calculating daily return for hindustan petroleum using =LN() , the same is displayed as 0.061547 and, not in percentage points. how do i convert the same into %age? secondly, do we have to individually calculate for all the dates i.e the whole year one at a time using the above formula? or is there a formula to do the same in one go for all 365 days? calculating daily returns for all the
    respective 365 days individually seems to be a humongous task. do clarify. thanks.

    • Karthik Rangappa says:

      Raj – keep the cursor on the cell which contains ‘0.061547’ and then select the ‘%’ symbol that you can see in the Excel window. This button is placed right below the word ‘General’ which is somewhere in the top middle. Once you do this the figure should change to 6.1547%. Also you need not have to do this individually for all 365 day, just drag and drop the formula and it will automatically get calculated for all days.

  18. raj says:

    thanks karthik, how do i drop and drag the formula? i am not proficient with the usage of excel.

  19. Amitvikram says:

    How can i get the NIFTY data the way you got it for WIPRO, am typing NIFTY, but no records are shown!!

  20. arun says:

    How often do you calculate and update daily returns for use in trading? As these values are used for calculations in chapter after this, do we need to calculate it with new data every day

  21. raj says:

    karthik, i just calculated the daily volatility of glenmark. i found that there is a difference of 1 % between my calculation and that published on NSE…could this be because i extracted data for the last 6 months(closing price) and the NSE probably does it on a 1 year data? i used the =STDEV() for the same. thanks.

  22. Naitik says:


    I have one doubt.

    How do we find all the above mentioned calculations for a Stock which has been Split/Bonus within past year?

    is there any suitable change for the excel sheet calculations ?

    For Example : Infy has been changed from 4000 to 2000 to 1000 in just 1 last year

  23. AJEESH says:

    this calculation possible in amibroker

  24. jaganathan says:

    Thank you so much for the lesson.Really very simple to learn.Keep up the good work.

  25. KGGUPTA says:

    Can we get data on metals,crudeoil like wipro.If yes what is the source. Can you explain this data so that we can trade in metals and crude oil.
    i like to trade in MCX.

  26. KGGUPTA says:

    I downloaded the price of asianpaints for a year from 17/10/14 to 16/10 /15. Total days involved were only 248 and not 365.May be because of holidays. Now to find out the mean are we going to divide the total value by 248 or 365? I found for finding annual deviation we are multiplying daily returns with 365. And for finding daily returns we divide annual deviation by 365. I do not understand the principle. Please elaborate the fact.

    • Karthik Rangappa says:

      Yes, although there are only 252 trading days we end up taking 365 days. This is because of something called as the ‘Day count convention’. NSE uses a particular day count convention called Actual by Actual, which requires them to take 365 days in the denominator, hence we use the same.

  27. KGGUPTA says:

    Great. i was able to calculate STDEV or daily volatility and then annual volatility by your method.Here i multiplied the daily volatilty with 365 when the data was for 248 days.

  28. KGGUPTA says:

    I down loaded wipro from 22/07/14 to 21/07/15 and found out the daily return for each column and then added. The total was 0.01745. Now how to find the av. daily return. Is it to divide the total with 242. or some other method is to be used .
    You have solved nifty for 1 year or so on. I want to solve it of my own. CMP shown is 8337. May i know the data from which dates is employed.I shall download it my self and calculate like you.
    Please do not mind the trouble i am putting you in.This will improve my solving capacity.

    • Karthik Rangappa says:

      Please select all the values in the daily return column and use the =AVERAGE function in excel. Also, just follow the instruction the excel, it should help you through.

  29. kggupta says:

    You have already solved the nifty range from upper to lower. I am interested to down load the data and work to solve it. So kindly let me know the dates from which date to what date the data has been used. I Shall be grateful to you for your this act of kindness.

  30. Sandeepreally helpful in trading. says:

    We can use VIX,right.
    Does Gamma really helpful in trading.

  31. aehsan4004 says:

    1) instead of calculatin volatility on our own using excel …. can we simply reply & use the NSE READINGS ?
    2) CAN SIMILAR VOLATILITY calculations be done for currency & commodity as well ?
    3) for commodity we do not have options availability ….. can volatility be of any use for simple futures trading ? if yes,how ?

    • Karthik Rangappa says:

      1) You can. Worst case you can even look at ATR (for intraday)
      2) Yes
      3) You can use it to place stop loss. Check the chapter on volatility applications.

  32. aehsan4004 says:

    sir , can you give direct link where this daily and yearly volatility is shown ? also can you show the same data for currency ?
    i tried to find on NSE but was not able to get it .

    thank you

    • Karthik Rangappa says:

      Unfortunately, this is the only spot (as far as I know) on NSE where this information is present. I’m not sure about commodities. Sorry about that.

  33. tramadevi says:

    Sir, What is ATR and how to look


    • Karthik Rangappa says:

      ATR is Average true range…its an indicator. Its a method identify the volatility of a stock or index. Standard technical analysis software packages have ATR indicators.

  34. Sooraj J Mishra says:

    Hi Karthik Sir,
    I am trying to load data of Nifty for volatility calculation. but It says no record found…..Why so?? Data for other stocks are being loaded by not for Nifty. please help me…

  35. tramadevi says:

    Sir, The values shown for Daily and Annual volatility in NSE site are with 1 yr data or some other. kindly clarify. Thanks

  36. Mr. T Barua says:

    Why annualised volatility of NIFTY changes everyday ? According to the excel provided by you it remains almost constant. On 18/11/2015 annualised volatility of nifty was 15.49% and on 19/11/2015 it is 16.49%. According to the excel provided by you guys it comes to around 20%. Same is the case with bank nifty and other instruments.
    Thank you.
    T Barua

    • Karthik Rangappa says:

      Volatility is a function of price. If the price moves drastically then volatility also changes. This must have been the case here.

  37. tramadevi says:

    Sir, Iam getting max historical data in NSE for 2 yrs. Where to look for more than 2yrs .


  38. aehsan4004 says:

    i have spent 3 days on NSE website …… didn’t found the page from where this screenshot is taken .

  39. tilak says:

    Karthik, help me to understand how do decide entry and exit points delivery with target of 2-5%.

  40. SARATH says:

    i calculated nifty daily volatility as per my calculation daily volatility is 0.76% and in nse website is 0.81% i think calculation is fine right? and i have i a doubt as per your excel sheet i download nifty 30 days data and calculate and i got above volatility (.76) and also get 14.60% anual volatility , and i edit equation to F5*SQRT(30)for getting one month volitily and i got 4.19% am i right? please guid me !!

  41. Vikas Bohra says:

    Hi Karthik First of all i will like to thank you for explaining beautifully all the concepts be it technical, fundamental or Volatility Related.
    i have been reading all the concepts from past 1 month and now i will like to work on Delta for Volatility based trading.
    although i am very thorough with the practicals but i wanted my theory to be clear as well.
    i have a small doubt related to calculation of Daily And Annual Volatility. the Example which you have shown in – Wipro Date ranging from 22nd July 2014 – 21st July 2015.
    Now when i repeat it on Wipro It gives the exact same answer.
    but when i tried it on all other current stocks like axis bank and be it nifty and compare it with Nse website there is a vast difference. can you help me with it.
    i am attaching the snapshots below.
    please help me
    why is there a huge difference between my calculation based on the same formulas which you have provided in this module and the one provided on the nse website.
    please reply asap

    • Viikas Bohra says:

      PS – The The Range of Data of Axis Bank is exactly last 365 days.

    • Karthik Rangappa says:

      Vikas – I suppose you are using the spot data, can you try this with futures data?

      • Vikas Bohra says:

        I tried it with futures data as well but the difference is huge. Have Nse changed their calculation methods or am I making a silly mistake. I don’t know but I proof checked it several times. It’s the same 40 % for axis bank where as Nse website states it around 20%
        Please throw some light on the issue Sir

  42. Vikas Bohra says:

    I have checked with the Simple returns formula as well for Axis Bank,
    I am getting a Daily Volatility of around 2.14% and Annualized Volatility of Around 40% which is far more than mentioned on NSe Website. i.e. 28%
    Can you Calculate once for a better understanding .
    Date = Axis Bank for past 365 days

  43. SUBHANKAR says:

    How can i get the currency data the way you got it for WIPRO?

  44. SUBHANKAR says:

    How much sample data required for calculation Standard deviation and average?

  45. subhankar says:


  46. Dev says:

    Hi Karthik,

    In 20.2 VOLATILITY CONE, can you please explain how was the annualized realized volatility calculated. You have explained how to calculate Volatility using historical data ( I believe the volatility calculated above in the earlier chapters was Historical volatility).
    How did you calculated the realized volatility shown in the table Expiry date against annualized realized volatility.
    Is there any other data to be used to calculate realized volatility?


    • Karthik Rangappa says:

      Devandra, I’ve been wanting to put up the excel for a long time. This piece has been authored by someone else and I’ve been waiting for the excel so that I could upload the same.

      • Dev says:

        I searched on the internet for calculating realized volatility but couldn’t find an easy way to get through…I could only find methods to calculate Historical Volatility, but not as easy and comprehensive as explained in your module. really appreciate your efforts…
        Is it possible for you to email me websites or source where I can find one.


        • Karthik Rangappa says:

          Realized volatility for today, is historical volatility for t’row 🙂

          • Dev says:

            Thanks…Just finished reading module for Options…worth reading and so much to take in and analyze. Thanks again for the simplified explanation.
            When can we have the excel sheet on realized Volatility calculation(the one you have been waiting for authorization)..please get it ASAP.

          • Karthik Rangappa says:

            Thanks Dev, I’ve been chasing the guy as well, but cant really push him much as he is getting married next week 🙂

          • Dev says:

            I have tried a lot but i could not get the calculation right for the volatility cone in the chapter 20 module 5-2. we chatted earlier aswell. i checked the website and found that you have uploaded the volatility cone excel sheet in april 2016, but couldn’t find the source. can you help me with the link. i have been persistently trying to match the calculation with the no’s in the chapter but i am not able to get it right. Can you please help me with the link.



          • Karthik Rangappa says:

            You can download the excel and check out the calculation, this is there are the end of the chapter.

          • Dev says:

            Hi Karthik.

            Thanks a ton…at last i did find it…went through the calculations…now i got to dig the gem…lol
            thanks again.

          • Karthik Rangappa says:

            Good luck, Dev 🙂

  47. rohan says:

    when I am calculating return by formula LN(today’s closing price/yesterdays closing price) it is coming in .00077 format and not in percentage % format.

    what to do to get these values in % format?

  48. rohan says:

    can you please share the path to check volatility published by nse site

  49. varun says:

    How many types of volatility are there? what is implied volatility, India vix, volatilty index

  50. Saeed says:

    Can we get ‘daily average return’ data from the nse (or any other) website like the daily volatility and the annual volatility.

  51. Arpan says:

    Where can we get scriptwise Implied Volatility data ?

  52. Sainudheen says:

    Excellent Sir,
    Sir , how we get a daily and annul Volatility details from NSE, and Sir can i use daily volatility data for intraday trading using uptrend SD and Downtrend Sd and Variance.

  53. Sainudheen says:

    Thank you sir

  54. SONJOE JOSEPH says:

    Hello Sir,

    What’s the formula for calculating the implied volatility of particular asset say nifty on a live basis. In the Nse site when they use to give the implied volatility. I have just wondered how they arrive at the calculation. Just eager to know.


    Sonjoe Joseph

    • Karthik Rangappa says:

      Calculating the implied volatility is a fairly complex task. I’d suggest you take ViX values as an alternate to Nifty’s implied volatility.

  55. Amit D says:

    Hi Karthik,
    Thanks for the learning. I am a bit confused.
    From the above can we say that SD and volatility are the same ?

  56. RTKaushik says:

    The difference between your calculation and NSE could be because NSE seems to be a Weighted one.
    It uses 0.94 for the “Volatility till yesterday” and gives 0.06 for “Today’s Volatility”.
    If you download the Daily Volatility, this formula is mentioned in the column given below

    Date, Symbol Underlying Close Price (A), Underlying Previous Day Close Price (B), Underlying Log Returns (C) = LN(A/B), Previous Day Underlying Volatility (D), Current Day Underlying Daily Volatility (E) = Sqrt(0.94*D*D + 0.06*C*C), Underlying Annualised Volatility (F) = E*Sqrt(365)

  57. Mk says:

    can you advice historical volatility for check options greeks, or you can provide any options greeks calculator for india stock market.
    NIFTY or other options contracts.

  58. M K says:

    noted the online calculator provided, the data is coming far different. though it’s helpful

    can you help to provide anything in excel worksheet which can backtest our results and payoff graphs on daily basis for working.


    My age is 70 years. I have basically no knowledge of Excel. I am able to follow you till Step 2. In Step 3 in point 4 you said–After the open bracket select all the daily return data points and close the bracket. In the bracket you have put C3:C245. Where do you get C245 from?
    I want to get a firm grip of Options before I venture into trading.


    Thanks a lot for the prompt reply and inspirational interview of Joby. I have a few more lessons to go before I start trading. But trading
    definitely I will do.

  61. c.vijayasarathy says:

    Thanks for explaining the concept with simple steps and in a easy language!

  62. Shashank T Pujar says:

    Sir small correction:
    “Square and add up all deviations – this is called variance”- should changed to “Square and add up all deviations and divide the sum by no of observations – this is called variance”

  63. Abhishek says:

    Hi Karthik,
    I have a query regarding returns calc. What is the difference b/w returns calculated using Log function and Normal formula (End price/ Beg price – 1) ?

    • Karthik Rangappa says:

      Log function brings all the numbers to a single plane (natural log), therefore gives a real sense of how the returns pan out.

  64. Sai Sreedhar says:

    Is it not appropriate to calculate log of net-working days than calendar days? supposing in a year there could be only 260 to 240 trading sessions when the price of share can move up or down.

  65. Sumit says:

    Hi Karthik,
    I am not understing the fact that how will i determine where a particular option Strike is costly or cheap.
    From the historical volatility i can derive the 1 SD which will provide me the range in which the underlying is likely to remain with a probability of 68%.
    But as the implied volatility changes everyday, how can i deduce whether the option is costly or cheap ?
    Also, what is concept of IV rank ?

    • Karthik Rangappa says:

      The valuation of the option is really based on the premiums which in turn is dependent on things like Volatility. So one really needs to compare today’s volatility with the historical volatility to identify the expensiveness of options. Sometimes even due to market inefficiencies the prices can vary drastically from the fair price, making the options cheap or expensive.

  66. sudheer says:

    Does the volatility take into consideration the trading holidays for annualized volatility or is it calculated on the full year i.e 365 days

  67. Rajesh says:

    Hi karthik,
    Can you tell me how to calculate the range of the historical volatility in last one year for index/stock? Actually I need the HV range over last one year period.

    • Karthik Rangappa says:

      You need to calculate the daily volatility and then identify the max and min volatility to get a range. You should be able to do this on excel.

  68. Rajesh says:

    But sometimes the daily gain is negative. Then how to calculate? Is the data readily available on any site?

  69. Manoj says:

    Can we use this daily volitality formula in intraday trading/BTST to determine what price level it can go next day considering the present days trend

    • Karthik Rangappa says:

      Yes, I do know people who use intraday volatility to set up trades. But really not sure about the success rate here.

  70. sudheer says:

    Hi karthik,
    I have bought a 1040 CE option @9.25 6 days before the Infosys Q3 results for FY16-17 year and the spot was trading at 965 on the day of option purchase.In the run up to the results day,the spot slowly moved to 1000(the day before the Q3 results) and premium went to 16.25(because of the delta?).However on the results day the stock gapped up @ 1030 went to a high of 1040 and finally closed @975 and the premium came down to 5.So i have few queries over this trade.
    1.Is it because of so much of volatility on the results day that the premiun came down by 11 points?
    2.Even though the volatility cooled off and spot came to 975 ,the premium was trading @ 5 much lesser than the price(9) when spot was trading @ 965.Why is it so?
    3.Also what could have been done better in this trade.I later came to know naked trades are dangerous.I made this trade to just guage my understanding of options.

    Thanks in advance for you help

  71. trader2017 says:

    is there any source from where we can get the implied volatility of all F&O stocks of Nifty together and where they are also arranged as per their rank? eg- from 1st rank (highest IV) to last rank (lowest IV)?

  72. Sanjay limbu chongbang says:

    Sir can i know the intuition behind converting daily volatility to annual volatility?
    I.e why are we doing SQRT 365 days ? Can’t we simply do the power to 365 days?
    Looking forward for ur reply

  73. Rathinam says:

    Hi Karthik,

    I computed the volatility for Wipro and SBI as on 21st March, 2017 with the NSE data as explained in the lesson. For Wipro, the results were matching with NSE data (1.19 % vs 1.16 %). But for SBI, the calculated volatility was double (1.94 %) vs the quoted (1.10%). For Cipla, the calculated daily volatility was 1.45 % whereas the quoted value was 0.98 %. What can be the reason for this difference? I enjoy your lectures. Thank you!

    • Karthik Rangappa says:

      Ratinam, I’ve noticed the difference as well. One possible reason could be the day count convention…i.e the number of days in a year you maybe considering 365 while NSE maybe taking 250 or 252 days.

  74. Tirth Nakani says:

    Hi Karthik,

    I think this might be an out of the topic question, but wanted to understand what all technical/fundamentals we need to check in a company’s stock if we are planning to pick that up for Options trading ?

    Also, how do we pick up a particular stock for intraday options trading ? Your insights on this please.


    • Karthik Rangappa says:

      Tirth, frankly you can ignore the fundamentals when you are doing a short term trade. However, remember, whenever there is any strong fundamental news around a stock be doubly sure about the trade.

      From a TA perspective, it really depends on what you are following. I personally prefer MA and candle patterns.

  75. Sai Sreedhar says:

    Is there any place (on NSE or elsewhere) where we can get historical IV (min & max) to check whether the current option is trading at above or below the mean of IV?

  76. madhusudan says:

    Shouldn’t we be dividing by no of trading days instead of constant 365???

    • Karthik Rangappa says:

      For markets it is usually the total number of trading days which excludes weekends and public holidays. This comes to about 252 days.

  77. Ankit says:

    Sir if this simple calculation for volatility works better than what is the need of that fancy IV numbers published in NSE option chain

  78. Ankit says:

    How to get historical data for currency too
    Tried to get but failed….

  79. Rajib says:

    Hello Karthik,
    How is it possible to have historical IV for stocks (in a index form)…thanks in advance

  80. Rajib says:

    In some US market intermediaries provide that data with their software but in India we don’t have it. I know it’s a management decision but if you guys come up with this feature it will be really awesome for option traders ?. Just a thought

  81. Ankit says:

    Hello karthik sir,
    I had calculated volatility for many times but a question is raising in my mind that if daily volatility information already available on nse website then why we have to calculate this everytime ( pls… don’t assume me lazy) infect i like to do calculation every time as it improves me
    By the way can we also use NSE’s data to set up a trade…..offcourse what you will order me to do i will do the same your advice matter me because i tried a lot lot lot to understand option before ariving at varsity at the end varsity gave me the brake..
    & you and your guys the reason behind thanks a lot….

  82. shabaz says:

    First of all,
    thanks sir for these wonderful lessons but i have two queries that.
    1. Should we also consider Rakesh Jhunjhunwala’s money or investment as smart money?
    2. can we calculate volatility for nifty for the month through india vix as we know that if we want to calculate the next month volatility through india vix say a month then the formula is (Vix / sqrt (T))%.
    If we want to know that what is the monthly volatilityof nifty based on india vix (current-11.53),
    we should divide 11.53 to square root of 12 (t-12, 12 30 days in one year) So the expected volatility based through vix for the month would be 11.53/3.464 =3.32%.
    This expectation of monthly range of nifty can be used by the people who use options especially option writers.
    Example, shorting option above or below the expected monthly range of nifty.
    Sir, my question is can i use this method for the calculation of expected range
    of nifty?

    • Karthik Rangappa says:

      1) Yes, simply because he trades with a much larger capital base.
      2) Sort of, but the best way to forecast Vol is by a volatility model, like GARCH. Unfortunately, I’m not too sure about the math behind that

      Having said, you can still use the method you have mentioned for a quick and dirty calculation.

  83. KUMAR MAYANK says:

    When i calculate historical volatility using B3/B2-1, the result differs a bit from what i calculate using logarithmic returns. According to you which is better?

  84. Abhilash says:

    Hi Karthik,
    Instead of Manual Daily volatility calculation, better we can refer NSE itself ( Derivative ) …

  85. Chetan says:

    Hi Karthik,

    Learning a lot for Varsity., Lot of things are getting clear and helping me to trade well. Between i wanted to share a technique which will reduce time spent of downloading data and doing various calculations.

    We can actually automate this Volatility calculation using the Google Sheets ( aka Google Excel) , Creating a sheet and using Googlefinance formulas (

    Ex: I Can create a new Google excel sheet and in cell A1 use the formula =Googlefinance(“NIFTY”,”PRICE”,TODAY()-300,TODAY())
    The above formulas gives data for last 300 trading days and we can then use other formulas linking to this data, which gets updated every day.

    • Karthik Rangappa says:

      Hey Chetan, thanks for sharing this information. I wasn’t aware of this at all, owe you one now 🙂

  86. Varun says:

    Hi Karthik,
    I downloaded Maruti data for past one year from NSE site and have tried to calculate Daily Volatility which comes to 1.38 but on NSE it is coming as 0.88. Data taken is from 2nd of Aug 2016 to 1st of Aug 2017.
    Any specific reason for it.

  87. punterdgr8 says:

    sir,why does zerodha only allow stock options to sell and not buy;any specific reason?

  88. Shreevardhan says:

    Dear sir,
    where do we get the data of average volatility of stocks & index to compare whether current volatility is high or low?

  89. girish says:

    Karthik Rangappa many many thanks for explaining the volatility and greeks n find it doubt- for calculating weekly/ monthly volatility , one should multiply the daily volatility by sqrt of 7/30. is it that much only or we should take into account anything else? also if we use weekly/monthly close values then the volatility obtained using the abovementioned procedure is weekly/ monthly volatility and no further corrections are required? please answer

    • Karthik Rangappa says:

      To convert daily volatility to yearly, simply multiply by Sqrt of 365….and to convert to monthly, multiply it by sqrt of 30. Basically, you have to multiply by square root of time.

  90. NAJEEB says:

    Hi Kartik,
    Thanks for the plethora of information you disseminate for free.To my knowledge Nse publishes the previous day daily DV and current day DV and AV in (view all end of the day reports) in market reports for around 1620 stocks.I find these SD calculations based on a closing price basis.Where can i get an intraday volatality measure say like for a tick and for time frames during a day(I minute ,5 minute, 15 ,minute likewise)?

    • Karthik Rangappa says:

      Intraday vol is not available, Najeeb. YOu will have to take the daily vol and make estimates.

      • NAJEEB T P says:

        Regarding annual volatility calculation as the sum count(number of observations) comes to 245 wont it be an error if gone for 365., a situation of 4.98 days of volatality and 2.02 days of zero volatality.Had it been annual return calculation 365 seems ok.Pls guide.

        • Karthik Rangappa says:

          Can you please rephrase this? I’m a little confused.

          • NAJEEB says:

            Standard deviation is seen taken based on the closing price of the traded day.This year the total number of trading days is 245 after shaving off weekend days and trading holidays.Leap year have 364 days.So normally we have 5 days volatility and 2 days of 0 volatality.Holidays need be considered too.Hence I wrote 2.02 days of non volatility .If the observation is the annual traded days is it not logical that annual volatility ought to be on the number of trading days too .Nse takes 365 days where may US traders take it as traded days.Which is more accurate ?

          • Karthik Rangappa says:

            Got it.

            I personally prefer 252 days, but I guess many prefer 365 considering NSE uses the 365/365 day count convention.

  91. NAJEEB says:

    Kathik, One doubt ,What will be the percentage decay of the option on a daily basis daily supposing the underlying stays at at the money(theoretical) till the life of the option .Also is there any relation in percentage between daily volatility and theta decay percentage when underlying at the money? Please guide.

    • Karthik Rangappa says:

      If all else equal, the loss in option premium owing to time decay is equivalent to the theta of the option.

      If the volatility increases, then the premiums also tend to increase. This is especially true when there us fewer days to expiry.

  92. NAJEEB T P says:

    Any foreseeable impact of delta decay(charm) vega decay(veta) gamma decay(color) on theta especially in leaps.Apart from gamma do any of the second degree and third degree derivatives has any impact that we need to analyse any of these?

    • Karthik Rangappa says:

      The 3rd order matters if you have super large account size, where a small impact can cause a large Rupee value damage. For a typical retain book, it does not have any impact (at least as far as I understand).

  93. Ash says:

    Karthik –

    1. Are Market holidays like Saturday and Sunday also considered (for time value) while calculating the Theta value? Then as your said Friday makes more sense.
    2. While selling options, Is it that by the last Thursday of the month, the strike price shouldn’t hit the exact target number or is it like
    even if it is near the target we lose?


    • Karthik Rangappa says:

      1) Yes, it does
      2) Yes, last Thursday is when the expiry happens, so the spot should be higher than strike (for calls) and lower than strike (for puts) for the option to be profitable, anything else you lose money as an option buyer.

      • Ash says:

        I was talking about option seller not buyer, like under what scenario at expiry will he be able to pocket the premium?

        If I sell the 10000 nifty index call and upon expiry the market is at 9999, can I retain the premium and be profitable? Even though the difference is just 1 point.

        • Karthik Rangappa says:

          Yes, as long the spot price is less than the strike (in case of calls) and more than the strike (in case of puts) the option seller can retain the entire premium.

  94. Nerav Parekh says:

    Hi Karthik,

    I am sure that there is a special place in heaven for guys like you !!!
    Have been reading the Varsity Modules for some time now. They are great.

    I have a few queries & would be delighted to have your feedback (whenever you get the time).

    Query A
    I downloaded the historical data for ONGC, Reliance, Bharat Electronics & Wipro. The daily volatility & the annualised volatility dont match at all.
    I am using the same LN(b3/b2) / STDEV function & am getting results that are more than 3 times the actual daily / annual volatility posted on the NSE website.

    What do you think is the issue ?

    Query B
    Can you suggest a few books to read only by Indian authors & mainly relating to the Derivative Segment.


    • Karthik Rangappa says:

      Thanks for the kind words, Nerav 🙂

      Query A –

      You need to convert daily to annualised volatility. Cannot really compare daily to annual without this conversion.

      Query B –

      Frankly, I’m a little out of touch on the latest books related to derivatives. That leads me to an interesting question – what do you think is missing in Varsity that can be plugged to make you more confident about markets? I’m asking this because Varsity, at least according to us, has most of the things you need to get started on derivatives 🙂

  95. Mihirsinh Parmar says:

    Hi Karthik,

    Content is very well developed. Thanks for this.

    I tried calculating annualized volatility for five different scrips but except HDFC bank no scrip is giving perfect or near to the actual number. I had compared with NSE website.

    I had followed following steps.

    1) Download last one year closing price from NSE
    2) Calculate daily returns
    3) Calculate SD
    4) calculate annualised SD by multiplying with SQRT(365).

    I am not able to calculate the correct Volatility. Can you please help. I am existing zerodha client.

  96. Mihirsinh parmar says:

    If you want I can send the excels on which I have done working ..

  97. NAJEEB T P says:

    Hello Kartik,
    Inputting the data into Zeroda BS option pricing formula with Nifty yesterday underlying close at 10210.85 for a strike of 10300 call with expiry as 26/10/2017, 15 30 hrs ,current day AV as 12.26 and RBI 91day treasury bill yield as 6.07 outputs to 38.58 as the call option price.But if the same is input to as 24/10/2017 as expiry dates shaving of the 2 day trading holiday ,option call price reflects to 27.81(settlement price is 28.45). Diwali one trading hour would compensate to that.So my question is , Is not imputing calendar days give distorted results in option pricing.
    It would be appreciated if in the expiry column the default time is set as 15.30 hrs instead of 23.59 hrs. On a detailed analysis coupling economic analysis data.fundamental analysis data,technical analysis data,quantitative analysis data and scientific analysis data(price equating to an object and applying the principles of newtonian motion , chaotic motion and butterfly effects) the calculation done taking calendar seconds an year seems to be wrong in the underlying and its subsequent expression in derivatives which even Nse calculates and it ought to on market activity timelengths and not on continuous timelengths.

  98. venu says:

    In next Chapter

    one of example you have mentioned
    Daily Average Return = 0.04%
    Annualized Return = 14.8%
    How did manage to Get Daily Average return or Annualized return

    what is formula to get et Daily Average return or Annualized return ???

    Please advice

  99. Pankaj Singh says:

    Hi Karthik

    How to calculate historical volatility for the purpose of estimating IV ranking? More specifically, is that calculated from SD of underlying or using historical IV data?


  100. Shankar says:

    What should I do when annualized daily return is more than annualized volatility?

    • Karthik Rangappa says:

      Not sure how this is possible because the annualised volatility is a multiple of daily volatility and time. So annual volatility is always higher than the daily volatility.

      • Shankar says:

        Thanks Karthik.
        In Excel,
        Annualized Daily Return (365 trading sessions) = Average Daily Return * 365 = 0.07%*365 = 24.52%
        Annualized Volatility = Daily Volatility * 365 = 0.67%*sqrt(365) = 12.79%
        Range with 1SD is more than cmp on both cases for next year (37.31% and 11.72%)
        Does this mean stock is on a bull run or Am I doing something wrong here?

  101. Harsha says:

    Karthik – Let me start off saying it has been a great pleasure going through your blogs. Hats off to you for making this easy for newbies like me!

    Now, my question: Based on the steps you have given to calculate daily and annual volatility, I did the same exercise (on Jan 4th 2018) for Bank Nifty by first downloading the historical closing prices from NSE (period Jan 1 2017 till Dec 31 2017), getting daily returns, then getting the average and STDEV. I got daily avg as 0.14% & hence annual avg as 51.95%. Daily volatility calc came upto 0.77% and annual volatility as 14.7%. NSE showed daily volatility as 0.64 & annual volatility as 12%. I think I am slightly off but is my calc correct so far? I ask this because I got stumped when I continued:

    With annual avg as 51.95% & annual volatility as 14.7%, I am now getting upper limit of 66.65% and lower limit of 37.25% which doesn’t seem correct because I believe the lower limit should be a negative number which is only possible if annual volatility is lesser than annual average but it is not in my case. Hence the lower limit is now higher than CMP! What am I doing wrong?

    • Karthik Rangappa says:

      Harsha, you get a +ve lower range when the stock or the index has trended positively for the look back period you have considered. Likewise, you will get -ve values when the asset has drifted downwards. A mix of both +ve and -ve when the asset has been sideways (with probably a slight directional bias).

  102. Amit says:

    Difference in volatility due to taking day is 365 .Actual working is less 261

  103. Ankit saini says:

    Hello sir,
    Is implied volatility on NSE option chain is anualised
    Let’s say I am going to open an call position on the basis of volatility I expect the volatility will increase till coming budget
    So my market view for 7 to 8 days from now
    When I compare this volatility with historical volatility I got confused
    Is there any way or any tool to decide what should be implied volatility for next couple of days
    Or or should I need just avoid volatility and buy an ITM option and play Just intrinsic value…..
    In other case I am looking for a long strangle on Nifty 50
    When I compare the Nifty 50 index performance near or on the day of budget I found that generally nifty to take an upward Trend firms slightly bullish on Nifty from now and expect and level of 11100 before middle March
    I’m not guessing this I did some math on Nifty historical performance near budget
    No just volatility confuses me.
    Sir you did very good work in your city on volatility but I found something that it is not sufficient to understand volatility for practical purposes.
    I personally found we need something more to understand volatility practically
    So I request you sir, you personally put some lectures or video on YouTube or something like this
    This will be a great help for us
    I found just reading of volatility not enough to play or use volatility
    Thank you sir

    • Karthik Rangappa says:

      We will soon make few announcements on Option tools. I’d suggest you stay tuned on that. Meanwhile, if you expect the volatility to increase, then yes, buying an option makes sense. I’d prefer to trade ATM/Slightly ITM option considering the time to expiry is quite short.
      I will try and create a volatility mini-course on youtube.

  104. chinmay says:

    whe i downloded the csv file from NSE website for calucating volatility i noticed something. please check the historical data of kotak bank for last 365 days. 8th march 2017 data is given 2 times. and see the closing price 490 & 817. what is this? is this an error? if it is then such errors may lead to huge differences if unnoticed. whats the solution?

  105. santosh patidar says:

    People are telling good things about you, many are giving blessings also, how do you digest so many +ve words ? Because some people can’t handle success.
    Please answer below questions as well
    1.) In comments you have written about ATR also, how close ATR is in comparison to volatility ?
    2.) How closely BETA of a stock and volatility ? Since if market moves some % then stocks movement is based on BETA.

    • Karthik Rangappa says:

      Santosh, if there is one thing that market teaches is to stay grounded! One should never take such things for granted 🙂

      1) ATR is a good proxy for volatility – you can use it as good as Vol
      2) Beta measures the sensitivity of the stock wrt to an index, vol, on the other hand, gives you a sense of how volatility the stock is to the overall market.

  106. kmayank says:

    Hello sir
    I calculated the stdev for Mothersumi stock and it was 2.59% but on nse website it was 1.56%. I checked the minimum return from my excel sheet and it was -33.35% on July,5′ 17. But when i saw the chart it was smooth. Then i realised it might be a case of stock split, and it was.
    My question is: Does the stock split affect the standard deviation of its daily returns? If it does then how could we calculate the correct standard deviation?
    Thank you 🙂

  107. kmayank says:

    Hello sir
    Could you provide me the link to download split adjusted historical stock prices? I googled but didn’t get any save this

  108. Ankit says:

    Hello sir,
    I have a question when we calculates historical volatility, i guess this is the volatility of nifty50 underlying or nifty 50 futures right sir,
    i calculated same for last last year it worked out almost 9.25%. but how to Relate this volatility to particular option strike i mean we have lots of strikes available from DEEP ITM to DEEP OTM. in which some strikes has 12%VOL. 15%,40%55% or may have 75% volatility. let say i took a naked call buy Strike10700 @112/- with IV @19%. then will i say like”The historical volatility of Nifty 50 is @9.25% but this particular strike has volatility @19% so it is expensive Right Sir but i did not understood point here. How can i relate nifty option volatility to nifty underlying
    in my sense we can take a good trade in nifty future by assessing nifty underlying volatility but not in option.
    is somebody asking me to BUY 10700 strike @112/- because volatility looking low as compare to other strikes which has high volatilities like 25%,32%21% or like that Then i will reply him NO Dudei can not take this trade because i dont have historical data of this particular strike to calculate its Historical volatility i only have volatility smile and cone option to decide but thats not appropriate to me
    OOOhhh. i dont know i have able to tell you what i am talking here, i really missing some features such as audio massages, video post, snapshot posting here. i tried google drive link posting but it was saying your comment is awaiting for moderation and yet not answered. Sir please please please provide some mutual interacting platform where peoples in need can directly approach you by audio video massaging or youtube live facebook live, because only reading and writing is not sufficient. if you say i can pay you for that
    Thank you sir…..

    • Karthik Rangappa says:

      That would be on Nifty 50, Index (underlying) and not on Nifty Futures. Although, you can calculate the same for Nifty futures.

      Considering the underlying’s volatility to an option’s strike volatility is only a crude approximation, Ankit. However, you can look at the strike’s implied volatility and get a better sense of how the volatility is playing out. If the implied volatility is over 25% then yes, consider that as high. Or if the IV is around 8-12%, I’d consider this as low.

      I’m very active on Varsity, so please do drop your queries and I will try and respond back as soon as I can.

      Good luck and happy trading.

  109. manas says:

    how to use daily volatility for intra day trading?

  110. vishal wadekar says:

    hii karthik,
    can i perform the same calculations for base metals & bullions???? does it make sense??

  111. Prateek kumar jaiswal says:

    Hi Karthik,
    For calculating yearly volatility you have taken 365 but in actual there would be close 250 working days so not sure which one to take 365 or 250. Please throw your thoughts if 365 should be taken and why?


    Can we calculate intra-day volatility ? Please revert.

  113. Shyam says:

    i calculated the daily and annual volatility based on above calculations for nifty and banknifty.

    Daily Volatility 0.65%
    Annual Volatility 12.37%

    bank Nifty
    Daily Volatility 0.85%
    Annual Volatility 16.17%

    Please advice if the above calcualtion is ok

    When traders talk about high volatility and low volatilty what is the percentage that you would say is high and low.

    Can we refer india VIX for nifty and bank nifty?

    What is the ideal volatility % for Nifty and bank nifty?

    • Karthik Rangappa says:

      Annual Volatility = Daily Vol * Sqrt (365)
      = 0.65% * Sqrt (365)
      = 12.41%

      You can refer to India ViX to get a perspective on how high/low the volatility really is. Also, there is nothing like ideal volatility 🙂

      • SHyam says:


        Please see below link

        As per my understanding one needs to buy call when volatility is low and sell when volatility is high

        Today i bought a 10700 call when india vix was low. Surprisingly the market fell down in the morning and india vix was rising. To minimize the loss i hedged it with a put and scraped out with minute profit though this is a loss as i havent considered the brokerage charges and the end number of transaction costs. Kartik please tell me where do you think I went wrong?
        This is really frustrating. Market is indeed a brutal place .It doesn’t give a 2nd chance.

        1.Why is india vix volatility is falling when market is rising?
        2.Which volatility should I refer ? India Vix or implied volatility?

        When I saw the charts later I rued my decision of closing both the positions. If I could have held out on my call positions i could have made a decent profit. Panic got the better of me today. In last 10days I have missed such trades since last 10 days.

        • Karthik Rangappa says:

          1) Shyam, in general, ViX increases when markets fall and ViX cools off when the markets increases
          2) If you are trading Nifty, then I think India ViX should be good.

          Holding to winning position requires a great deal of mental makeup, not really an easy 🙂 Hopefully, with time your trades will also evolve. Good luck.

          • SHyam says:

            Ohh I didnt know about this.

            When traders talk about shorting when volatility is high which volatility are they referring to?
            Also should we refer VIX for bank nifty also?

            ALso i was checking the implied volatility for nifty 10700/750/800 CE yesterday. They were in range of 7.5-8% . and VIX was 11% .
            Now how do I interpret this.
            Sorry for bugging you with all these queries. Its just that last 10 days have been really frustrating

          • Karthik Rangappa says:

            They are referring to IVs. ViX for Bank nifty may not be the best match, but nevertheless, you can. The comparison tells you that the IV for these options are lower.
            Good luck, Shyam. Take your time to learn, the market always has 100s of opportunities.

          • SHyam says:

            So in short I need to buy when vix is falling and sell when vix is rising?

          • Karthik Rangappa says:

            Yes, pretty much so assuming you are tracking other variables as well 🙂

  114. Mehul Karia says:

    Hello sir,
    Could you please tell me from where we can get Historical Implied Volatility Data for stocks and Indices?

    • Karthik Rangappa says:

      You will have to extrapolate this, Mehul. Quite a cumbersome process. Do check out for historical IVs.

  115. Adelaida Whitty says:

    What’s up to every one, the contents present at this site are really remarkable
    for people experience, well, keep up the good work fellows.

  116. Amit says:

    Hi Karthik,
    Thanks for your sharing your in depth details in options. I would like to know where we can get the companies financial/latest update (specific date information) before getting air.

  117. Aditya Somkuwar says:

    Hi Karthik,
    I am absolutely loving the way the content has been written. Excellent work done!
    Wish I had come across this earlier.
    Was just playing around with the data of Wipro for the same period as in the example.
    The reason for difference between NSE’s calculation of daily volatility and your calculation could be because it appears NSE took LN(Close Price/Open Price) while calculating daily return whereas you have taken LN(Close Price/Prev. Close Price). By using this formula, I’m getting daily volatility as 1.34%.
    Keep up the good work! And thanks a ton!

    • Karthik Rangappa says:

      Aditya, this could be one of the reasons, thanks for digging up 🙂

      Also, thanks for all the kind words, keep learning 🙂

  118. Kimish says:

    Hi Karthik,
    I did the similar calculation for TCS from 24thAug2017 to 24thAug2018
    And I got the following values which are different from the values on nse website
    Daily volatility=4.67
    Annual volatility =89.33
    Please let me know where am I wrong

    • Karthik Rangappa says:

      Someone commented earlier, I guess the difference is because NSE is using the opening prices for these calculations whereas I’ve used the previous day closing.


    In this chapter you have calculated daily return of wipro using MS excel formula up to that I could understand but how you are calculating “mean” i.e average daily return is not clear to me please help me to understand.

  120. arun says:

    While calculating daily return(using LN) your values are in % but mine are not in %.
    Your calculation-
    23-Jul-14 570.9 2.15%

    I am calculating the same
    23-Jul-14 570.9 0.021511917

    how to get 2.15% in my case?

  121. Edward says:

    Good evening sir
    I followed the same steps as yoy have told to calculate std dev. And for wipro for todays date i got standard dev 0.31 with formula =STDEV(E3:E245)
    so this 0.31 is absolute or in percentage…
    I mean this is 0.31% or do i need to multiply it with 100 now to get std dev %.
    Thank you

    • Edward says:

      Coz 31% daily volatility seems a bit unlikely.
      But i assured you i followed all the steps….
      And with formula =STDEV(E3:E245) AS per my excel sheet gives me 0.31…
      So is this 0.31 already in percentage?

      • Edward says:

        Please tell me if i am wrong
        Your daily rate was in percentage so i changed my formula to =LN(B3/B2)*100
        is this correct approach or this is the main root problem that i am getting my daily standard deviation as 0.31(or this 0.31 value is already in percemtage)
        And thanks for you previous reply in delta 1 chapter….that cleared my query.

      • Karthik Rangappa says:

        31% is very likely for stocks, Edward. The index’s volatility itself can go up to 22-25%, so for individual stocks, this is very common.

    • Karthik Rangappa says:

      It should be expressed in %, so that would b 30.1%.

  122. Ron says:

    Dear Karthik,
    Just wondering if Zerodha Sensibull has any plans to introduce a volatility lab ( something similar to what interactive brokers ) are offer.
    I would request you to watch the video below to give you an idea of what I’m talking about. Obviously you don’t have to watch the entire video, just watch for 1-2 mins and you will know what am I referring about.

    Thank you very much for all you do to make our trading experience better.

    Best regards
    Ron Kalra

  123. Shekar Srinivasan says:

    Hello Kartik,

    Where to find Bank nifty daily volatility. I am getting a daily volatility of 1.90 for the period from the very beginning to 29th Oct. I want to cross verify. Please guide me. Thanks

    • Karthik Rangappa says:

      Check the ‘other information’ section at the bottom of this page -

      • Shekar Srinivasan says:

        Thanks. For trading in Bank Nifty Options, do i have to calculate Volatility based on Bank nifty spot price or Future price. The site which you have referred shows the Volatility of Bank Nifty Future price. To trade in Bank Nifty options we refer to the Bank Nity Spot price. Where do i find Bank nifty Spot price Volatility? Kindly clarify. Thanks

  124. Bimalendu Saha says:

    Dear Karthik Sir,

    How can we get adjusted stock price of stock. As after bonus declare of stock its price gets half (in case of 1:1), but in NSE historical data we can not get the adjusted price and for this I am suffering to calculate volatility in case of Infy (as 1:1 bonus declare by management in Sep 4, 2018).

    • Karthik Rangappa says:

      Bhimalendu, usually NSE has clean data. Anyway, I’d suggest you download the data from Pi.

      • Shrenik says:

        Hi Karthik,

        Could you share the way data cleaning is done. For retail investors/traders like me, who track and trade a set bunch of stocks, that could be very helpful.

        Hope that’s not too much of botheration 🙂


  125. Prafulla says:

    Dear Karthik

    I am thinking seriously about working in HFT and algo trading firms. I want to know some of the advanced mathematical concepts, probability and statistical techniques that are used. Can you tell me a few references where I read these?

    Thank you

  126. Sukhdeep says:

    Dear Karthik,

    I was trying to calculate the average return for few shares like L&T finance holding, Sunpharma, Jetairways and Yesbank. Calculated log return from 22 Dec 2017 to 21 Dec 2018. Now since each of their shares have gone down so their average daily and monthly return is coming out to be negative. Now how should i calculate their returns for the purpose of finding SD 1 and SD 2 in case I want to take a trade on the basis of Volatility. Kindly guide

    • Sukhdeep says:

      Also now IV is not mentioned for different strikes. Where can I track the same?

    • Karthik Rangappa says:

      Calculate the average return
      Calculate the SD of returns
      Build the range by adding and subtracting the avg return from the SD
      If the stock has trended down, there is nothing we can do to alter the equation.

    • Sukhdeep says:

      Dear Karthik,

      I was trying to calculate the average return for few shares like L&T finance holding, Sunpharma, Jetairways and Yesbank. Calculated log return from 22 Dec 2017 to 21 Dec 2018. Now since each of their shares have gone down so their average daily and monthly return is coming out to be negative. Now how should i calculate their returns for the purpose of finding SD 1 and SD 2 in case I want to take a trade on the basis of Volatility. What should I do. Do i need to take the range for longer period if return is coming negative for one year I am calculating.

  127. Vivek says:

    Thank you sir for explaining the topics in a great manner and that too explaining almost every topic on stock market. Sir I wanted help from you on understanding how to calculate 2 standard deviation so that I get 95% probability levels.
    Thanking you in advance for your help.

    • Karthik Rangappa says:

      1) Calculate the average of returns
      2) Calculate the standard deviation of returns – this is 1SD
      3) Add and subtract 2*SD from the average returns, and you will get the 2SD.

  128. dncorp says:

    What if I want to calculate realized volatility for 5 years. Do i do as above, that is, multiply the stdev by sqrt(252) ?

  129. Gautam says:

    Hi,kartik well explained topic..i am not a statistics guy but want a quick help from you have calculated here daily volatility and annualized volatility.How do i calculated 52 week high volatility and 52 week low volatility.I want to calculate iv rank for any stock and formula needs an input like this IV Rank=100 x (the current IV level – the 52 week IV low) / (the 52 week IV high – 52 week IV low) .I can fetch current iv from NSE option chain.please help me in calculating my input 52 week iv low and 52 week iv high..

  130. Gautam says:

    I am curious to calculate my own IVR..Help me out with calculating 52 weeks high iv and 52 weeklow iv

  131. Nitin says:

    sir ,
    If I have to find 7 days volatility of nifty with the help of ATR band , so the atr band settings like period 7 , shift 1 and weekly time frame. correct ?

  132. Anand says:

    We get Daily and Annual Volatality for all stocks directly here:

  133. Manish says:

    Hi karthik,

    Is there any standard formula for calculating volatility.
    For eg: Annual Volatility- Daily Volatility*SQRT(365), similarly if we want to calculate for 7 days, or 30 days etc.


  134. Uday Kumbhar says:

    Why you have don’t calculated exact trading days insted of 365?

  135. Anand says:

    Hello Karthik,

    I have a question on Implied Volatility. It is said that IV of the ITM should be considered by making any decision, right!
    Now, as the index/stock will move up or down, the ITM will change often. Hence will be strike price change and also will the IV, as it to taken based on the ITM, right! So if one wants to compare/study IV movement wrt index/stock, should we change the IV accordingly to the Strike Price?


    • Karthik Rangappa says:

      Anand, you look at the IV of an ATM strike and check the volatility level. Once you do so, the strike may transition from ATM to OTM or ITM, this is ok.

      • Anand says:

        Hello Karthik,

        Thanks for the answer.
        First of all, the question I had asked, was about ITM… which was completely wrong. I was supposed to write it as ATM.
        Still, you answered correctly.

        Now, coming onto the right track… Which ATM Stirke Price should be selected, when say, NIFTY is trading at 10450.00, ignoring the multiples of 500’s. I mean to say that the Calls/Puts, in case of NIFTY, having a strike price as 9500, 10500, 11500.. like on, don’t have volumes. The best ones are in the multiples of 1000’s.

        One more to add… should the IV, Open Interest and other greeks are to be considered for the NEXT month contract? If yes, then when… from the start of the contract or near the ending of the contract?


        • Karthik Rangappa says:

          Anand, ATM strike is the strike which coincides with the market price. So if Nifty is trading at 10450, ATM will be either 10400 or 10500.

  136. Manish Saxena says:

    Hi Karthik
    While converting daily volatility to annual volatility, you considered time as 365 days. Wouldn’t it be proper if we consider 250 daily trading sessions, and hence multiply by SQRT(250)?

  137. Ajay says:

    I tried the formula to calculate volatility with WIPRO and INFOSYS I get totally different values compared tot the NSE values what am I doing wrong here For WIPRO I downloaded the data from 9-Apr-18 to 5-Apr-19 and the values I get are Daily volatility=0.022771937 and annual volatility = 0.435057254 but in NSE site as per today I get these values Daily Volatility=1.56 ,Annualised Volatility=29.74 now for the INFOSYS I get these values of data from 6-Apr-18 to 5-Apr-19 Daily Volatility =0.044771493
    Annual volatility = 0.855358176 but the NSE website gives these values Daily Volatility=1.18 ,Annualised Volatility=22.50

    And What should I do calculate the Daily Average Return should I just take mean of the Daily returns which I calculated in the sheets

    Sorry for the long post 🙂

    • Karthik Rangappa says:

      Ajay, are you converting the daily vol to annual volatility properly? You need to multiply with the square root of 252.

      • Ajay says:

        Karthik in the example spreadsheet that you gave it has the formula of sqrt(365) and now if I use sqrt(252) I get the value around 36.15% the Nse site gives 29.74 % is this variance considerable ? Or is it common to have such difference

        • Karthik Rangappa says:

          I think its ok, you can consider average volatility of around 30-34%. You won’t be off by a large margin here.

  138. Neehar says:

    Hi Karthik, Let me start by appreciating your team’s effort in providing an extremely valuable resource like varsity to all the novice traders like me. This comment is regarding one of your posts on the ‘wall’ of varsity app regarding the relationship between ‘India Vix’ and IV of the options. for the context of other readers, they can read the ‘opinion’ in ‘ The Wall’ of ‘vasrity’ mobile app by the name ‘ Implied volatility and the associated mystery!’. last week, I have observed hat the India vix has touched 20s but the IVs ATM options of April series is around 15. I thought that IV will rise along with the India Vix and I also have a directional view that Nifty will move up in the coming week. since I have a directional view and also on the view of IV but not sure of the timing which it will take place, I bought the ATM options .After bought the CE the IV dropped further to 13 and I had to book a loss. your article has cleared many of my doubts but here is my doubt sir, In my understanding when India Vix is high, Nifty fluctuates violently and accordingly the deltas of the ATM options also should fluctuate violently and so the premiums of the options, resulting in higher IVs of ATM options But that did not happen in this case. According to your article, India Vix is estimated from the option IVs but are’nt option IVs a function of India Vix also resulting in a cyclic relationship? how to analyze the effect of India Vix on the options? Please correct my understanding.

    • Karthik Rangappa says:

      I’m glad to see this, now I know there I at least 1 person looking at the wall apart from me 🙂
      India ViX is derived from the IVs of the ATM calls and put. IVs are independent and is derived from the price, and this gets fed as an input to compute the ViX, so there is no cyclical relationship.

      • Neehar says:

        Thanks for your clarification. ‘The Wall’ indeed is a very good initiative. My first task everyday morning is to check it . Keep up the good work. I am waiting for all the modules to be updated in the mobile app. Also it would be helpful if the comments are also enabled. Since I could not ask the doubt there, I thought this is the most apt chapter and posted my doubt here.

        • Karthik Rangappa says:

          Neehar, I’m glad you liked it. I hope we will have a notification for the Wall soon 🙂

          We are also updating all the modules soon. Working on it. Unfortunately, we can’t have comments on the app, it will be a huge challenge to manage. But we are exploring alternatives.

  139. LOKESH says:

    sir, while downloading security wise data(equities) from nse site, when we put “ALL”, DATA OF SEGMENTS LIKE EQ, E1, BE is also downloading. so even if we downloading for 365 days, it is showing data for more than 400 days. my doubt is, to draw volatility should i exclude all other data and take only equity?? (for this i select only EQ and press get data). or should i definitely need all segments data and compulsorily check “ALL” and then press get data? please clarify sir.

    • Karthik Rangappa says:

      No, you need to download only EQ segment. The rest is not really needed.

      • lokesh says:

        thanks for the quick reply sir.
        am really thankful to you sir for providing zerodha varsity.
        i read all chapters 1 yr back when i just started trading.
        and i come here to refer some topics when i need some clarification.
        everytime i revisit , though i re read same topic, i get to learn a new thing.
        i think gaining real time experience and brushing basics again and again really helps a lot (as we tend to overlook some basic things in the speed of the market).

        your work, the way you put the content really amazes me becauses u stressed areas where ppl go wrong or what ppl really need.

        • Karthik Rangappa says:

          Thanks for the kind words, Lokesh. Yes, re reading the same thing after you’ve gained some experience is an amazing way to unlearn and learn again. Good luck to you, Lokesh!

  140. VISHANT says:

    in this module we learn how to calacute any particuler stock volatility , but how to find most volatile stock on NSE&BSE have more then 5000 stock listed. i hope you understand my qustion /

    • Karthik Rangappa says:

      Vishant, the only way to do this is to find the volatility of each stock and make the assessment. It is best if you can program this and track the volatility.

      • VISHANT says:

        ok. by the way we can downlode data of high beta stock on NSE stie right ?
        and thanks for this type of study matirial its easy and very usefull.

        • Karthik Rangappa says:

          I’m not sure if NSE gives you this list, you may have to calculate this based on the historical data.

  141. sahil swaroop says:

    sir, I couldn’t get the intuition behind multiplying SQRT(365) to convert the daily volatility into annualized and dividing SQRT of 365 with the annualized volatility to get daily volatility can u pls throw some light how are they working

    • Karthik Rangappa says:

      Volatility and time have that inverse relationship, Sahil. It has a complex mathematical explanation, let me check for a link which explains this.

  142. Infamous says:

    A chapter for delta hedging.?

  143. Ram says:

    Hey Karthik,
    While calculating the daily returns in Excel did you manually type all the formulas like LN(B3:B2) and LN(B4:B5)?

  144. Ram says:

    Isn’t there any method to use a common formula for all the data?

  145. lalit says:

    * * * *

    Daily Volatility = 1.47%
    Time = 365
    Annual Volatility = 1.47% * SQRT (242) [ TIME = total trade days – 1st day ]
    = 22.40 % is right or wrong ?

  146. Lalit says:

    Time = 365
    Annual Volatility = Daily Volatility% * SQRT ( ? )

    ** ? = Time OR Todal Trade days which i choose ? **

  147. Harsh Singh says:

    Good evening Karthikji,

    Although I’ve read most of your modules long back around 2 yrs ago but I kept on visiting & revising varsity esp options, technical & fundamental analysis so have to ask questions accordingly in comment sections each time doubt arises…
    Although u’d made volatility understanding as simpler with your fabulous writing as walk in a park 🙂

    In this particular Chp I understood fully the ground work for historical data works & I do it on excel too. My questions is
    1)Since the Chp heading is calculations for ‘Historical Volatility’. But at the end of chp there’s annualised volatility estimation or daily volatility but historical volatility is not visible anywhere ??
    Is annualised volatility & historical volatility can be treated roughly equal as an average over long time ???
    2) where to find out historical volatility reliably ? ?

    • Karthik Rangappa says:

      I’m glad you continue to like reading Varsity 🙂

      1) Historical volatility is the base for calculating the annualized volatility. The bulk of the chapter is focused on calculating historical volatility.
      2) Historical volatility cannot go wrong as it is a 2 step calculation. I’d suggest you do this as described in the chapter

  148. Harsh Singh says:

    Good morning Karthikji

    With ref to above mentioned questions rply…
    Yes definitely reading & understanding isn’t one time affair or thing. One need to polish himself/herself in visiting basic to advance time & again. So keep on reading & enhancing myself with writing imp notes too. We’re enough fortunate that u’d authored & mentored us 🙂

    》Yeah regarding one of last doubt here, I mean can we compare annualised volatility & current IV for rough comparison. For eg. Nifty annualised volatility is 16 & current IV of say Nifty 11650CE strike is 8. So can we design spread trade with this rough comparison in stocks/index. Although I’d huge respect for above annualised volatility calculations work that I still do but I’m saying out of my idea if this rough analysis between annualised & current IV works too ??
    Pls correct me with ur opinion
    Thank you 😊

    • Karthik Rangappa says:

      Yes, you can compare the annualized volatility with current IV, but make sure you are comparing it with ATM strikes (which has maximum liquidity), and not OTM or ITM strike.

  149. Harsh Singh says:

    Good morning Karthikji
    Ah sure here I got it regarding clarity on annualised volatility.
    1)But only one doubt is in volatility smile concept sections u’d mentioned that “Volatility is least at ATM strikes & increases as further we go away to ITM & OTM side” So naturally ATM volatility will be at support or at lower side compared to annualised one ? Kindly correct me here in this situation
    2)Whether we must compare monthly or weekly options ATM with annualised volatility?
    Need ur opinion 🙂

    Your courtesy, thanking you so much 🙂

    • Karthik Rangappa says:

      1) No, it is difficult to correlate this. Cannot really say that the ITM/OTMs would act as support as the volatility is different at these strikes
      2) You can always convert volatility in the time frame you like by either multiplying it with Sqrt of time or dividing it (based on your requirement)

  150. Harsh Singh says:

    Very much grateful for your kind reply Karthikji. I got it. It’s my silly mistakes to have not identified that i must be multiplying or divide with Sq root of time in any no. of days we desired that we learned in this chp.
    But anyway this is what opinion of wisdom is all about!!

    Thank u again & have a great evening 🙂

  151. Baskaran Dhanalakshmi says:

    I am trading in Bank option for past 2 months. I am beginner in trading. I have lost big money in some trading. I am trading with out SL & Target. Is it possible put SL & Target in Bank option trading. If it is possible please send link to the above mail.

  152. Mayank Jain says:

    just like u explained the way to calculate annualized volatility, out of daily data. in similar way, how can i calculate annualized volatility out of intraday data?
    for say, at 10:30 AM, i want to see the annualized volatility (of underlying) of nifty, based on 60 ticks of data (60 minute).

    • Karthik Rangappa says:

      Intraday volatility is a little difficult to extrapolate. Even if you do, wont be too accurate. I’d suggest you dont do this.

  153. vidit d says:

    If annualized volatility is provided on NSE site,do i need to calculate on excel too?

  154. HEMENDRA says:

    Why you take 365 as no of days to calculate annual volatility/standard deviation because there is roughly 242 days in a year when stock market is open as we can see in excel sheet where you calculate volatility.

  155. NILESH says:


  156. ajit mohanty says:

    if i buy an usdinr option at price 0.0025 and the next day it shows the ltp at 0.0000 (-100%) then what happens to the contract do it get square off before expiry?

  157. Subhra Halder says:

    Dear Sir, I calculated the same using your excel sheet for WIPRO (tenure 26/9/18 to 25/9/19) daily volatility is coming around 2.3% and annual volatility is approx 44 %. Then I checked the data on NSE site which is showing Daily Volatility 1.36% & Annualised Volatility 26.03%. Why this result is not matching??

  158. Ankit Dubey says:

    Dear kartik,
    it was a beautiful journey with the modules and the kind of thorough knowledge of greeks and their impact on really changed my way of trading options..but i have some doubt on calculation of volatility with the formulas u have given in the module..when i apply the same formula on wipro as u ahve mentioned in module it gives exact figure..but when i apply same formula on other stocks there is a huge differnece between my calculations and the one provided on nse website..plese help me with that.

    • Karthik Rangappa says:

      Hmm, I guess the problem could be with the data points. Are you sure you are looking at clean data? Cleaned for bonus and splits?

  159. Ankit Dubey says:

    yes…i am using data as mentioned on nse website.

  160. Vishal says:

    Karthik thank you for all your efforts in making difficult things so easy to understand. I have few questions and please excuse me if i ask some stupid ones. Thank you in advance.

    1. The Implied Volatility that NSE India website provides in its Option Chain is that IV in percentages?

    2. Kindly help me in calculating IV with a demo example?

    • Karthik Rangappa says:

      1) Yes, its in %
      2) Estimating IV is a complex task 🙂 However, historical volatility is fairly easy as explained in this chapter.

  161. Prateek says:


    I want to create a positive and negative range using the volatility of any given stock, would you be kind enough to help me out.

    Doubts –
    1. Can I use the LTP or closing price of previous day or should I use average price (traded value/trade qty?)
    2. How to calculate the upper (positive) range and negative (downside) range

    I have already explored the volatility report and figured out the daily volatility figures that’s available there, however not sure about how to use them all together to have my top and bottom ranges that stock will normally range in 68% of times.

    • Karthik Rangappa says:

      1) I’d suggest you use the close prices
      2) You can use the the same volatility function and the standard deviation approch, Prateek

  162. Harsh says:

    Nice Explanation. Thank you.

    Could you please let me know from where and how we get the 52wk High and 52wk Low of Historical volatility ?

  163. Rahul Mishra says:


    In this chapter, you have demonstrated the calculation of volatility using past one year data. I have some queries:
    1) What will be the effect if we calculate volatility using lesser data (say 15 days, 30 days, 60 days, etc.) ? Will it be reliable ?
    2) What will be the effect if we calculate volatility using larger data (say 3 years, 5 years, 10 years, etc.) ? Will it be reliable ?

    Rahul Mishra

    • Karthik Rangappa says:

      1) Nothing wrong, especially if you have a short term trading horizon (1 or 2 days)
      2) I’m not sure about the effectiveness of this. Intuitively, this may not make sense as most of these strategies are designed for short term trading.

  164. Arun Kumar says:


    From the historical data for Wipro in above sheet, the close price is almost above 500. But, when I had back check using Zerodha graphs, the equity price of Wipro never went above 500. instead it is trading between 200 350. May I know why there is a difference? While downloading historical data, which series should I consider (like EQ or All)?


  165. Paramjit Singh says:

    To calculate annual volatility from daily volatility you have used time as 252 days; whereas in the excel sheet (the one we can download from the link given by you) you have used it as 365. Which one is correct? Similarly for weekly volatility, should we use time as 5 days or 7 days?

  166. Sachin says:

    Hi Karthik,

    You are doing great job of not only educating, but also answering queries patiently. Hats off to you.

    Just sharing my observation. Calculated volatility of Nifty future (based on future price and not spot price) as per method mentioned in this write up. Getting volatility as 1.27%, while NSE is showing 3.34%. No where close.

    In the Comments section of this page, I’ve seen many other users experienced such mis-matches for whichever equity/instrument they cross-checked. I tried the method of NSE’s volatility calculation (it is mentioned in the daily volatility download report from NSE site), but using that also I’m not able to come close to 3.34% volatility.

    In case you know reason behind this difference, please share.


    • Karthik Rangappa says:

      Sachin, I’d suggest you calculate the Volatility for both Fut and the spot, across both 252 and 365 days. Also ensure the time series matches, ensure your data is also clean. Volatility is a simple formula, it should not show up so much difference 🙂

  167. Sachin says:

    Thanks (as usual) for your valuable time and response. I think I’d tried both 252 and 365 numbers, no luck. Spot wasnt used for calculation, let me check out with it. Regards!

  168. sbghosh says:

    In Zerodha trading platform when one selects STD DEV as one of the oscillators, the accompanying parameters by default are period (14), standard deviation (2) and moving average (simple)……. completely confused, how these parameters come into picture, what role they have, as std dev calculatin shown here (in zerodha varsity and same with standard test books also) such parameters have nothing to do with std dev calculations….. please tell me what am i missing.

    • Karthik Rangappa says:

      YOu must be talking about the Bollinger band or something similar. These are the core parameters which make up the STDEV indicator.

  169. sbghosh says:

    Please explain in details. I am not talking about Bollinger band. Go to zerodha platform select any stock or any index and from”studies” pull down menu select STD DEV. Now see the parameters…… as such they dont have any role in regular STD DEV calculation. Even before coming to Zerodha/trading/share market I had some formal training in statistics…… I can not figure out the role of those parameters here……surely something is there which I am missing… explain precisely what (14,2,MA) means. By the way thanks for noticing my question.

    • Karthik Rangappa says:

      14 = Period over which the STDEV is calculated. You can change this to whichever period you want
      2 = The number of STDEV, you can change this to 1 or 3
      SMA = For simple moving avg. YOu can change this to EMA as well.

  170. Avinash says:

    Firstly, big thanks for the great modules you have created for beginners.
    I have quite a basic query. In the example, i assume that you have used data of 11 trading days to calculate daily volatility. As annual volatility is calculated by multiplying daily volatility by square root of 252, how does one calculate 10 day historical volatility? Is it by multiplying daily volatility by square root of 10.

    • Karthik Rangappa says:

      Yes, thats right, multiply the daily vol by sqrt of time. Time can be 10 days or 252 for annualised value.

  171. Arjun says:

    Hello Karthik,

    Can you please help me with the following doubts:

    A. On NSE’s website, annualised volatility is calculated as daily volatility*sqrt(365). Shouldn’t it be AV= DV*sqrt(252) ( Assuming there are 252 trading sessions in a year)
    B. As per NSE’s website, Infy AV as on 02.04.2020 is 97.21. Does it mean that there is 68% probability that infosys price may move from current spot +- 97.21% in a one year time frame?
    C. IV is always overestimated and options premium accounts for the same. Is there a source that can give an estimate of about how much is it overestimated by making a comparison with HV?
    D. Is IV mentioned in option chains on Zerodha Kite daily volatility? Also, does IV changes with option expiry for the same contract? For ex 8500 Nifty CE with current month and mid month expiry?

    Thank you.

    • Karthik Rangappa says:

      A. Ideally yes, but some stick to 365. Depends on the time convention
      B. Yup. Its not a % though
      C. You can try Sensibull
      D. Yes, IVs do change

  172. sbghosh says:

    Please explain in details. I am not talking about Bollinger band. Go to zerodha platform, select any stock or any index and from”studies” pull down menu select STD DEV. Now see the parameters…… as such they don’t have any role in regular STD DEV calculation. Even before coming to Zerodha/trading/share market I had some formal training in statistics…… I can not figure out the role of those parameters here……surely something is there which I am missing… please explain precisely what (14,2,MA) means. By the way thanks for noticing my question.

    • Karthik Rangappa says:

      It is the same – A 14-day standard deviation, calculated on the closing price, gives you the value of 2SD. This is plotted as a simple moving average. Also, if this is not clear, I’d suggest you speak to chartIQ directly to get clarity on this.

  173. sbghosh says:

    Thanks a lot for your response. But as you know, every answer creates a new question :). Let me put things in perspective. As explained in the study material/notes above, you first calculate ln(previous day’s return/today’s return) and on a rolling 14 days’ window you calculate the standard deviation. So today’s standard deviation value has been obtained from natural logarithm of return ratios of last 4 days. Correct? NOw what is the role of moving average? Which parameter is actually taken on a moving average basis? YOu have clarified most of my doubt, please clarify this one.

    • Karthik Rangappa says:

      Ok, I get it. I guess it’s calculating the SD of the 14-day simple moving average. I’d suggest you write to chartIQ directly for this 🙂

  174. sbghosh says:

    Thanks a lot once again Mr. Karthik. I am kind of new to this zerodha system….how do I write to ChartIQ? any mailid? And by the way on a more theoretical level, SD is being calculated here to find out the volatility of the stock. Moving average is a concept in data analysis, used to smoothen the data. Now, if at all I am taking moving average of SD data don’t you think it is counter intuitive? I am trying to smoothen a parameter which is otherwise supposed to give me the “jerkiness” or volatility!!!! Anyway as suggested by you, I will write to ChartIQ if I know the mailid. It was pleasure discussing the concept with you.

  175. chetan gavale says:

    hello sir, i am unable to find historical data of nifty .i followed the link and after entered symbol name nifty but its showing NO RECORDS,

  176. RAHUL says:

    sir. thank you for the knowledge that you shared with us but according to your formula I tried to figure out the volatility of Reliance industries but the difference between the two(daily as well as annual volitily) that is which is calculated by me and that published by the NSE website has a lot of difference. So as asked by lot of people what could be the main problem in my calculations whether m I taking the wrong closing prices or it can be some other problem.

    • Karthik Rangappa says:

      I’m really not sure why the difference exists, Rahul. I’ve pointed out a few possibilities in earlier comments, maybe you can check and verify.

  177. Amit says:

    Hi Karthik ,

    Can we use the same calculation to calculate the volatility for 15 minutes or 1 hour.

  178. abhi says:

    @karthikrangappa i have calculated daily volatility and annual volatility of wipro, sail, and idea but when i cross-checked the answer on nse website it shows no similarity .
    I tried multiple times checking whether I did it wrong but the answer i got is totally has no close to the volatility available on nse website. which one should I consider?

  179. Parag says:

    I calculated daily and annualized volatility of L&T for last 1 year as per the above calculations and it came as 2.44% and 37.95%.
    But on NSE website the respective figures are 5% and 95.61%. It is nowhere near to my calculations.
    Can you please explain what can be the reason.

    • Karthik Rangappa says:

      I really don’t know how NSE is calculating Volatility. Maybe you should check with them for an explanation 🙂

  180. Harsha says:

    Hello Karthik,

    I’ve downloaded 1 year data from NSE today i.e., on 17-04-2020.
    I’ve calculated Average, Standard deviation and Estimated range for AXISBANK as you’ve calculated in this module.

    Daily AVG = -0.25% ; Daily SD = 3%
    Yearly AVG = -64.22%; Yearly SD = 54%

    With the above values, the 1 year range would be

    Upper Range = -10.32%
    lower Range = -118.11%

    I know that these numbers doesn’t make any sense as they both turned out to be negative.

    My doubt is :
    1. Do I need to remove negative sign in the average?
    2. Or is there any other way to do these kind of calculations as the stock is beaten down to hell from 800 to 300 levels giving completely negative numbers during the calculation?

    • Karthik Rangappa says:

      Harsha, I’d suggest you calculate the stock returns on log basis, which log (today’s close/y’day close)….and not the regular % basis. Here are the brief steps to follow –

      1) Calculate the daily returns using a log basis
      2) Use the daily return to calculate the daily avg and daily SD
      3) Convert the daily values into yearly numbers
      4) Calculate the range % using these yearly numbers
      5) Convert the range % back to regular scale (remember you are dealing with log scale)
      6) To convert the long % value to regular scale, multiply the range value with exponential

  181. Harsha says:

    But, In the WIPRO example you have used LN(Today’s close/Yesterday’s close).

    Now, we are using LOG(Today’s close/Yesterday’s close)?

    May I know why?

    • Karthik Rangappa says:

      On a short term basis, there is not much difference between regular returns and log returns. The difference occurs when you extrapolate for long term basis, this gets further magnified when the returns are -ve. Hence.

  182. Harsha says:

    So, for a Stock which has negative returns LOG is best!

    Anyhow, I’ll try both of them(LOG & LN) and see which one is more accurate for both short and long terms.

    Thank you!

  183. Akash says:

    In the MS Excel sheet you have provided in the last line of this chapter, there you have used 365 days to compute the annual volatility (which comes out 28.04%) but in example give above, it is 252 days. I think it should be the number of actual trading days i.e. 252 days.


  184. Praveen says:

    Hi Kartheek,

    As per the NSE website the volatility calculation is Happening like this.
    1. Log returns they calculating as LN(Today close/Previous close) or LN ( beginning price/ending price)
    2. Daily Volatility calculating as Daily Volatility = Sqrt(0.94*D*D + 0.06*C*C)
    Note: D = Previous Day Underlying Volatility and C=Underlying Log Returns i.e. LN(Today close/Previous close)
    3. For annual volatility they considering 365 days instead of 252 days.

    May be we need to update our tutorial or can u provide some more insights on above 3 points?

  185. Abini Abraham says:

    Hi Karthik,
    I am doing my project in Risk-Return Analysis of Futures and Options. So if I am using this formula that you provided it would be only accepted if I would be able to provide the source of this formula. Is there any books or journals from where you got this formula so that I could keep it as the reference?

  186. Abini says:

    If its not possible to reveal that pdf here please let me know through my mail id.

  187. praveen says:

    Hi Kartheek,

    Here is the link –
    from above link we can download daily volatility.csv.. Please download the same we can see how NSE calculating the Volatility

  188. sidd says:

    thanx sir for this valuable knowlege sir but in 2015 wipro were trading at 250-300 in june how come there is a diffrence in future price
    i m new to share market

  189. Naman says:

    Hi Karthik.
    (a). For calculating daily return, you used Return = LN (Ending Price / Beginning Price), instead of Return = (Ending Price / Beginning Price) – 1 (which is equally convenient for MS Excel perspective). Both these formulas will give some minute difference in values. I just wanted to ask if this simplification carries an underlying practical purpose, or is it just for the sake of simplicity.

    (b). At the beginning of the chapter, you laid out steps for calculating the standard deviation. There is a small typo here. In these steps, you forgot to divide the sum of squared deviations with the number of observations.

    • Karthik Rangappa says:

      1) This depends on the time frame you are looking at. For short term (like 6 months or so), you can use the simple arithmetic value, for more than that, use the log function.
      2) Ah, isit? Let me check this.However, if you are using excel, you can use the =STDEV() function directly.

  190. Pranay says:

    Hi Kartik,

    If the Daily Volatility is available on NSE website.
    Would there be situations where in we would need to calculate this using the given formula.

    Thanks in Advance.

  191. Vaishnavi Sanjay says:

    Sir ,

    i was trying to download the historical data of SBIN Since 2000 . there is a huge difference in what i get on NSE website and the Historical data of SBIN on Zerodha or Money Control . if MoneyControl or Zerodha confirm that SBIN has been trading between Rs.,20- Rs.,400 , But Data on NSE shows Well above it – it even Goes to > 1000 even >3000 . is something wrong that i am doing while selecting the data ?

    Money Control :
    Zerodha :

    NSE : Between 500 – 1000 Between 1000- 3000

    Please Clarify

    • Karthik Rangappa says:

      It may not be adjusted for splits and bonus. I dont know about other sources, but I’d suggest you stick to Zerodha.

  192. Arun Donni says:

    Should we follow the steps followed by you to calculate annualized volatility or should we use the formula used by NSE? Which one is more relaible?

  193. Arun Donni says:

    With your calculation we get IV Rank as 100 for most of the days in this period. Has the change in formula done by nse considering this high volatility period we are in?

  194. Arun Donni says:

    ok.. It will be really helpful if you can update your findings on the the comparision between two approaches as and when it is done. Also, if I want to calculate volatility of NIFTY index, can I use INDIA VIX as a alternative?

  195. Anil Gupta says:

    I am trying to calculate the daily returns & annual returns of the NIFTY using STDEV formula but the result varies from nse website.
    from 9/5/19- to 8/5/20 by using your formula my result is as follow
    Daily Returns 1.962%
    Annual Retuns 31.15%
    but as per NSE website its 3.30 and 62.98. what could be the reason?

  196. Suraj says:

    This is how NSE calculated the daily and annualized volatility.

    Current Day Underlying Daily Volatility = Sqrt (0.94* Previous Day Underlying Volatility ^2 + 0.06* Underlying Log returns ^2)

    Annualized volatility = Current Day Underlying Daily Volatility * sqrt(365)

    • Karthik Rangappa says:

      Yes, I’m aware of this. The thing is the NSE gives more weightage to previous day’s vol, this makes sense as they need to charge margins to accommodate for the present day vol. However as a trader, you need to give equal weightage to past volatility as well, that would be a better way to deal with this.

  197. Suraj says:

    I agree with you. What bothers me is if I have to plot the hist. vol (nse calculation) vs the implied vol, and hist. vol (log returns) vs implied vol the gap between the 2 plots would be different and hence my assumption of IV might be wrong for the underlying. Right?

  198. Anil Gupta says:

    how to check NSE calculation?

  199. Varun Agrawal says:

    Hello Karthik,

    I am not sure if you are aware of it, but is a great tool. It has daily/weekly/monthly volatility column along with 100 other features 🙂

    It has a button to add new columns. Click on it and then you can add volatility.

  200. Anil Gupta says:

    I got to know the calculation of NSE, though complex compare to what I have learned through this module.
    Both give a different lower and upper range which in turn gives the different prospective of index/stock range.
    which calculation to use to get a better range of index/stocks?

    • Karthik Rangappa says:

      Yeah, from my understanding, NSE’s volatility computation is wrt to computing the margins from a day to day perspective. They do this by assigning highest weightage wrt the most recent data. YOu as a trader need to give equal weightage to the last 10 o 15 day data, which is what happens when you compute volatility in the way described in the chapter. I’d suggest you stick to this method.

  201. Anil Gupta says:

    Thank you so much! Karthik
    Thoroughly enjoying the course. Your examples and explanations theory is amazing and very practical.

  202. Anil Gupta says:

    Range Calculation with 15 days SD
    15 days Nifty
    upper 6.35% 9979.11 9998.45
    lower -8.86% 8551.73 8587.49

    Premium market lot
    SELL 10000 CE 73 75 5475

    my first trade based on quantitative strategy learned by you, sir!! I was off the view that there are 68% chances nifty won’t cross 10000 in next 15 days!! today premium is down by 50% .

  203. Ragav says:

    I did a daily Vol calculation for HUL from May 2019 to April 2020, there seems to be a big deviation from what I calculated using excel vs the nse website . Daily Vol as per my calc is 2.7 vs Nse 3.11 which one should I go with ?

    • Karthik Rangappa says:

      Yes, that is because of the way NSE calculates Vol. They do this keeping margins in perspective. To trade, you go with the technique described here.

  204. Shreedhar says:

    Sir ,

    Which Version of R Software is recommended ? I am I Unable to Download Foptions into it . I want to get Volatility Smile , Volatility Cone using R . is there any Traning Centers who teach R from a scratch ? .

  205. MANOHAR NADKAR says:

    Hi, thanks for such nice e-book..very informative,
    if I want to caluclate weekly & monthly volatility then formula like this–wkly vol = daily volatility sqrt(5) & mothly=daily volatility sqrt(21)
    and i calculate 9 days vol. then 9days vol. =daily volatility sqrt(9)
    pls guide.
    Thanks a lot

  206. Ragav says:

    Thanks for the reply, I have another query . I did a Vol for ITC from 2019 May to April 2020, and daily returns were calculated on a log scale. I get a negative average of -0.20 / daily . So when converting to annual x 365 days it’s a – 74.05 % for 1 year. How do I work out the sd for these values ?

    1. Should is go for a longer period to calculate log returns, as the last 1 year ITC has been on a downward trend so returns are obviously in negative ?

    • Karthik Rangappa says:

      1) This is the problem with -ve returns, happens when the stock has trended down for a long time. I’ll get back to you on this.

  207. Manohar Nadkar says:

    Thanks you very much Karthik for your reply…Good bless you and all traders.
    Manohar Nadkar

  208. Ragav says:

    Sure, thanks.

  209. Aniket says:

    I have a query regarding the relevance of volatility calculated by us and as available on NSE.
    So, I calculated the daily volatility and it comes out to be very different as given on NSE, please guide me if I have committed any mistake.
    The above date pertains to the period 22 may 2019 – 21 may 2020
    However as per NSE, Volatility turns out to be very different.

    • Karthik Rangappa says:

      Yes, the vol as per NSE is to calculated keeping margins in perspective. We calculate keeping trading in perspective.

  210. Aniket says:

    Hey, i have gone through comments, i was able to figure it out, thank you!

  211. Mandar says:

    hi Karthik,
    If we select the daily closing data of any scrip for finding its std. dev. instead of getting its natural logarithm (LN), what isthe result? I know the answer will be wrong but still want to know the importance of LN.

    • Karthik Rangappa says:

      Stock prices can trend, but returns are normally distributed. Do check the chapter for an explanation.

  212. Hemakumar D says:

    Hi! Karthick..

    Thank you so much for the knowledge.

    I also have the same problem/doubt while calculating the volatility for longer period for the stocks which has fallen a lot

    Thanks & Regards
    Hemakumar D

  213. Uday says:


    during daily to annual volatility calculation, why time factor is considered as 252 and not 365? from your screenshot for Wipro, annual volatility is 25.5, 25.5/SQRT(365) = 1.34. which matches the daily volatility in the screenshot.
    Similarly from NSE website for INFY, daily volatility = 2.55, annual volatility = 48.77; calculation 48.77/SQRT(365) = 2.55, again matches.
    Can you help clarify pls?


    • Karthik Rangappa says:

      I’ve considered the actual number of trading days, but I guess NSE has considered the total calendar days. Please do stick to NSE’s convention.

  214. Uday says:

    Thanks. Amazing to see quick reply from you. Appreciated.

    BTW, I was so confused for FnO but the way you have explained entire stuff; i am excited to trade :). Thanks for nice theory.


  215. BISWESWAR GHOSH says:

    Hi Sir. Perhaps you may like knowing that I am studying your articles on Volatility very deeply, so that I can master the subject.
    I refer to the example where you calculated conversion from Annual SD to Daily SD by dividing the Annual SD by SQRT(252) (perhaps 252 is the no. of trading days in a year). Step 2 then multiplying the daily SD with SQRT(NO. OF DAYS) for which no. of days the SD is required. Fine.
    I am reading a book titled “Mastering Short Strangles: Trading Analysis of Real Trade included” written by Pradip M. where the writer wrote:
    “Given the Realised Annual Volatility of 16.8% , we get 1SD movement of 4.73% for a period of 29 days. The calculation arrived as below: 1 SD for 1 day = 16.8/sqrt(365) = 0.87935219 and then 1 SD for 29 days = 0.87935219*sqrt(29) = 4.735456466 …”
    Request your examination on this matter. Thanking you in advance for a reply.

    • Karthik Rangappa says:

      Thats right. When you want to convert daily vol to annual vol or any time frame, you multiply the daily vol by sqrt of time. However, if you want to calculate the daily from annual vol, then you divide it by sqrt of time.

  216. Vipinn says:

    Hi Karthik, Thank you so much for the material that you upload for us learners.

    I had a query regarding the excel sheet that you uploaded. It calculates the daily returns of nifty with normal distribution. I have been able to find out the Max & Min percentage returns along with the Bin width value. I have also been able to create the bin array by adding the bin width to the Min percentage returns till i had the Max percentage returns.

    What I am stuck at now is how to find the frequency of the percentage returns through this bin array. When I use the frequency formula, the cell value keeps incrementing and I dont see that happening in the sheet you uploaded. Further, I have tried using the dollar signs to stop the incrementing from happening but it ends up giving a value of 1 for each bin array.

    What is the possible way to stop this from happening?

    • Karthik Rangappa says:

      Are you directly pressing enter? You need to press ‘Ctrl+shift+enter’, when using an array function on excel.

  217. Vipinn says:

    Thank you. I was able to execute the formula with your advice but there’s a separate issue with the result I get. Some numbers in my bin array that feature in the percentage returns are showing 0 frequency after the formula. how could I rectify this error?

  218. Vipinn says:

    I can try to increase the bin width which would reduce the bin array. I had two questions in this regard:
    1. How important is the bin width formula i.e. (Max – Min)/50? If not very important, I can put a higher number for width to reduce the arrays.
    2. Also I wanted to confirm that, through the frequency formula, what we get is the number of times a value is repeating in the range of one bin array to another i.e. If bin array = 13, 11, 9, 7….., through the frequency formula I would get how many times numbers ranging between 13 & 11, 11 & 9, 9 & 7….. are repeating in the bin array?

    • Karthik Rangappa says:

      1) The denominator bit of that formula is very flexible. Try shrinking the bin width, if you increase you may get more bins with 0 values.
      2) That’s right, frequency gives us the frequency at which observation occurs.

  219. Vipinn says:

    I was able to work around the issue by shrinking the bin width. Rest of the calculations have also panned out effectively with respect to 1SD & 2SD. Thank you again for all your help and the study material.

  220. Shivam Puri says:

    very good content
    i have one doubt in excel , you considered 365 days for calculating annual volatility . but in the article , you considered 252 days can you please rectify ?

    • Karthik Rangappa says:

      Hmm, 252 is the trading days, whereas 365 is the calendar number of days. So it is really up to you which convention to stick to. I’d prefer the trading number of days.

  221. Roshan says:

    Hello sir,
    I cannot understand the logic behind multiplying one day volatility with square root of the timespan to get the volatility of that particular span and vice versa.please explain.

    PS:Thank you for the amazing content!

    • Karthik Rangappa says:

      Roshan, there is a mathematical derivation for that. Not sure if we should get into explaining that 🙂

  222. SOMAN RAJ says:

    @Karthik Rangappa : First of all I thank you very much. I have learnt a lot from Zerodha Varsity. The way everything is explained is so lucid.

    Could you make a video about the new nse website or could you provide some links if any. I need to know what the resources data free available, where we can find useful insights just like walk through of the site.

    • Karthik Rangappa says:

      Thanks, Soman. NSE’s website is an ocean of resources, takeaways too much bandwidth. Plus they keep upgrading the site, so will be a tough thing to do 🙂

  223. Atrijit says:

    Hi Karthik,

    I faced one problem while calculating the “Daily Average Return”. In one of your later chapters you demonstrated how I can calculate the range of a particular stock for the next n number of days using
    1) Daily Average Return
    2) Standard Deviation
    So I decided to download last 1 year data of ITC. I calculated daily return like you showed in this chapter. I calculated Standard Deviation similarly. Now when it comes to Daily average return I just used the AVG function on the entire column of daily average.
    The Average daily return came out to be negative! Now I am perplexed as in how to proceed. Can you suggest how to proceed now?

    On another note I found NSE website contains daily volatility data,but is there anywhere i can find daily Avg return and the daily SD(or 1SD,2SD) range data ready made. Or do you also download the excel everytime and manually calculate the same?

  224. Atrijit says:

    Hi Karthik,

    I did download you excel and copy pasted your formula only. But that gives me daily returns. I need to find out the Daily Average return. So how to do this? So I put Average(C3:C247) [Column C contained all the daily return percentages] and it got me -0.14%. Stock was in a downtrend in the last 1 year.

    But my question is how should I use this negative value to calculate the stock Range? a couple of chapters later you demonstrated how you got Nifty 16 Day Range. So with a negative value how to do that? Do I take a Mod value?

    And also if you can please answer my other question .Is there any readymade source of these data? Or you prepare this everytime manually?

    • Karthik Rangappa says:

      No, my question is for the daily return itself, how are you calculating the return? Is it the regular way i.e. [today’s value/y’day value]-1 or are you taking the log values i.e. ln[today’s value/y’day value].

      I’d suggest you take the log method.

  225. Atrijit says:

    Hi Karthik,

    No I am taking ln[today’s value/y’day value] only. I had no idea about the other formula. After log method when I took average I got negative result.

  226. rajesht says:

    What if the stock is split during the time period. Will the volatility calculation using the above method still holds true?

  227. M Aditya says:

    Hello Sir,

    For calculating Historical volatility, what is the minimum period to be taken in to consideration (Close prices). For example I tried 01-01-2019 to 17-07-2020 the value of 1 yr SD I got is 26.68%, where as when I considered 01-01-2016 to 17-07-2020 the value of SD is 18.6% but actual nifty spot Annualised volatility is 35.73 %. there is so much difference in the values, so how much data to be considered for calculating Annualised volatility.

    • Karthik Rangappa says:

      You get different values for different time period. I’d suggest you stick to 1 or at the most 1.5yrs, this should be good enough.

  228. Sabareesh SK says:

    Hello sir,
    First of all thanks for those wonderful content sir. After reading all I have a doubt. I am able to calculate the daily volatility and annualised volatility Of nifty index and got similar results with what they published in nse website. But I tried calculating daily average of nifty index for tooo many times but I couldn’t get the values it shows 0%. Can u please tell how to find that or if possible kindly share the daily average of nifty index alone. It will be helpful for many of us. Thanks in advance sir.

  229. Sabareesh SK says:

    To find the estimated range over a period of time of any stock or index , we need daily standard deviation/volatility and Daily Average/Mean. In this I am able to calculate the daily S.D of nifty index but daily average of nifty index is showing 0% when I calculate with log daily returns sir. So I am unable to calculate that and I tried many times. So can you please tell how to calculate that daily average/mean or what is the daily average of nifty index sir.

  230. Sabareesh SK says:

    No sir. I don’t no how to increase the decimal points sir?

  231. Arnav says:

    For Beta calculation what period is considered idea.
    Sometimes companies use 60 month period / 24 month period etc.
    Also, what period does Zerodha use in calculation for beta


  232. Arnav says:

    In Kite, for any given stock, if you go in fundamentals in kite, you show the Beta of the stock right ? for what period do you calculate that Beta

  233. Satheesh says:

    Hi Karthik,

    With Nifty options lot size 75, margin requirement for collecting premium comes some where around 127000.
    returns after adjusting brokerage looks very less. I agree this is consistent approach, but considering risk/reward,
    do you still think returns are decent enough ?

    • Karthik Rangappa says:

      Hmm, depends on how much margin you collect right? Also, the thumb rule is – anything higher that 2% a month is worth considering.

  234. Satheesh says:

    True, it depends on how much premium we are collecting. Say after calculating nifty upper range, we identify a strike trading at 20Rs premium, then returns works out to be ~1.25% [ 1500/127000 ] which is still decent returns.
    But not sure if we get such strikes where Rs.20+ premium can be collected consistently.

    • Karthik Rangappa says:

      Possible, you just need to track the market and you will get an opportunity sometime during the series, especially when there is a spike in volatility.

  235. Satheesh says:

    Thanks again Karthik for your insights. This reinforced the thought to wait patiently for the opportunity from market.

  236. Aman Parvez says:

    Your work is commendable, these modules are really helping many new traders like me. I understood almost everything till this chapter along with evolving crystal clear concepts of market. All thanks to you Sir!
    Just two questions i have. (i) In calculating annual volatility why you put the figure 252 in the formula and second thing is when i downloaded the same excel file you mentioned above there in which you have placed the figure 365 instead of 252 in the Excel Sheet Formula.
    Please clarify
    Thank you Sir!

    • Karthik Rangappa says:

      Glad you liked the content 🙂

      1) 252 is the number of trading days in a year and 365 as you know is the calender number of days. NSE considers 252, I’d suggest you do the same as well.

  237. Vaishakh says:

    Sir, When to start trailing your stoploss ? I have tried to do it while trading but found that i am not able to properly make decision regarding it

  238. Vaishakh says:

    Suppose i bought a share at 500, with Reward to risk as 1:1 , i would keep SL at 496 and imaginary target at 504, and when the price reached 504, i would manually change SL to 501 so that at least my capital is preserved. Or sometimes modify SL to price little less than target in this case let’s say new SL is 503 and SL gets hit and price increases from there on. So booking only small profit even though things were going good.

    And given the fluctuations in prices, I face a difficulty while deciding at what value should i keep new SL, whether it should be little above buy price or at target price ?
    (NOTE – currently BO orders are not available to trade due to increased volatility , this statement can be seen in Zerodha’s Bulletin segment)
    I hope you got my question 🙂

    • Karthik Rangappa says:

      Got it. YOur technique of trailing is right. If I were you, I’d buy at 500, SL is 496. I’d trail the SL to 500, if the underlying moves to 504. If The underlying moves further ahead, lets say 508 or 510, I’d increase the SL to 502, @ say 512, SL moves to 504….the point is that you have to wait for the underlying to move in your favor and then trail accordingly.

  239. niraj says:

    Sir, I calculated the volatility for HDFC Bank, it shows annual volatility of 96%, seems there is a stock split and I can’t able to get the clean data.

    As an alternative, can we use the value from current month Future Contract from the NSE website. 🤔

  240. Bipin says:

    Thanks for all your effort, this is awesome.
    There is a discrepancy in data between the downloadable excel sheet and what has been taken for annual volatility calculation in this article.
    In excel the time value is 365 where you have written 252 in the article. Kindly clarify.

  241. Ashish Bhadoria says:

    Hi Sir, i have one confusion what if we calculate standard deviation of price itself in place of standard deviation of return. Like i have calculated standard deviation of daily return (21 days) for Nifty at 0.57% whereas standard deviation of absolute price comes at 172 points as on 31st Aug 2020. now 172/11387 comes at 1.51%. why there is such huge difference in absolute and SD of return?

    • Karthik Rangappa says:

      You cannot do this on prices, as prices trend to trend, and are not normally distributed. However, stock returns are normally distributed, which is what I’ve explained in the chapter. You can apply principals of SD only if its a normal distribution.

  242. Guru says:

    Hello sir, thank you for your clear explanation. I am wondering how can I get data for NIFTY options in the derivatives section. I want to learn how to do projections for NIFTY options. Could you suggest me a few tips on doing projections for NIFTY options?
    thank you!

  243. Guru says:

    Sir I am looking for the historical data to download for NIFTY to do the calculations and I can’t find it. (in this chapter we downloaded WIPRO)

  244. Abel says:

    Is it possible to trade options, using price action and indicators just like we do with stocks, without considering the options greeks? If yes, what would be the difference? If no, why?

  245. ANURAG says:


  246. Sagar says:

    Thanks Karthik.
    is volatility on daily and annually calculated at each day EOD.

  247. Sahil Aswani says:

    Bro How Can I Get All Days Return In % By One Click, It’s Hard To Apply Formula Everyday And Find Return For Everyday, How Can I Do It Easily?

  248. Prashant Yadav says:

    Sir you’ve mentioned here that to convert daily volatility to annual volatility, multiply the daily volatility by the square root of time; and the time value is taken as 252. What is 252 here? Are they the number of trading days between 22nd July 2014 to 21st July 2015?

  249. Deathstroke08 says:

    hello karthik,
    so to calculate the weekly volatility form daily volatility do we need to multiply the daily volatility by sqrt(5) or sqrt(52)??
    thanks you.

  250. Luv Nambiar says:

    Hey Karthik,
    Can you provide me with a link with a clear explanation/derivation for why we should multiply or divide by SQRT(252). I googled it and I do understand it has something to do with the variances adding up but I don’t think I understood the full derivation.

  251. Luv Nambiar says:

    Okay, I have almost understood how it works. But why is variance linearly proportional to time? Shouldn’t S.D be the term which is linearly proportional?

  252. Priya Xavier says:

    Hello Karthik,
    Thanks for the detailed learning. Quoting from your session “So with this, we know WIPRO’s daily volatility is 1.47% and its annual volatility is about 23%.
    Lets double-check these numbers with what the NSE has published on their website. NSE publishes these numbers only for F&O stocks and not other stocks. ”
    I’m unable to find this on the nse website. Could you help pls.

  253. Luv Nambiar says:

    Thanks, Karthik. Got it.

  254. Trace says:

    Dear Sir,

    In your last calculation you converted annual volatility to daily volatility.
    = 25.2% / sqrt(252) = 1.60%

    The nse website got 1.34% as they used 365 days while you used 252 days.

    Isn’t your calculation more accurate compared to the NSE as markets are not open on the weekend and that .3% can sway entry and exit points.

  255. Rajnish says:

    Hello Kartik,
    So far so good,

    Just to relate the current part of excel calculations with the previous chapter where you have taken the examples of Bill and Mike.
    Just correct me wherever I am wrong.
    In this chapter the Nifty closing prices are nothing but runs scored by Bill and Mike in the previous chapter.
    The Daily nifty returns (which are log returns in % percentages) are nothing but deviations from Mean.
    Here we did not calculate the Mean as excel allows us to use a shortcut to calculate standard deviation by using the direct formula “STDEV.P” on the values of deviations from Mean.

  256. JatinShah says:

    Dear Sir,

    I did download the Nifty historical data and calculated avg, std etc.
    But it is constantly annoying to calculate this every week manually.

    Is there better way like a website or anything that does this?
    Could you recommend such a site?

  257. Shankar Mohan says:


    First, Thank you. Everything i know about the markets, f&o etc is from here.

    why ln to calculate returns?

  258. Tayaan says:

    Good work! Where did you pull-out the time of 252 from? In your excel sheet it’s not 252, it’s 365. So please explain that. For monthly, I have to sqrt 30 days and weekly 7 days, right? And yearly 356

    Thanks a lot.

  259. A Jain says:

    Please refer to you last part of the tutorial, reproduced below.
    So in this case we have calculated the daily volatility, and we now need WIPRO’s annual volatility. We will calculate the same here –

    Daily Volatility = 1.47%
    Time = 252
    Annual Volatility = 1.47% * SQRT (252)
    = 23.33%

    Can you please tell how you deduced time as equal to 252. In actual there are 244 trading sessions in the trading year selected for excel calculation.

  260. Ajay Devgan says:

    Hi Karthik, I never had so much clarity on greeks before I read your content on Varsity. I cannot thank you enough for what you have given me FOC. My doubt. The calculation of Wipro Daily returns, Standard Deviation, Daily Volatility done on 23rd Jul 2014 is based on the yearly data until 21st Jul 2015. Right?. But on 23rd July if I want to do the calculation, how will I get the data of 24th July, 25th July, and so on?. In this case, should I take data of 1 year from 24th July 2013? If I take data for 6 months I should take 126 days?.

    In an option chain, there is volatility for each strike price. Is this also Annual volatility?. I use the Interactive Broker portal to trade US stocks. I can see an IV at the top on the Option chain and also with each strike price. How are the 2 different. Sorry, too many questions. Appreciate your response. Thanks

    • Karthik Rangappa says:

      Thanks, Ajay. The data can be downloaded by subscribing to a data vendor, who will supply you with the daily dump of data. Yes, IV is usually an annual number. I’m not sure what that means, maybe you should check with them 🙂


    Hello Karthik,
    A wonderful and simple explanation of such complex topics. Thank you for making option easy n simple for me to learn, understand and analyze.
    Why are you calculating log daily returns, any particular logic behind it?

    • Karthik Rangappa says:

      Thanks for the kind words, Chandan. Returns can be calculated using log or simple returns. Usually when the data set is large, it’s the log return.

  262. pranav says:

    hey karthik! loved the module… just couldnt understand one thing that why did you take time to be 252 when u took the data for an year?

  263. Sachin says:

    In the start of this chapter it’s written –

    Square and add up all deviations – this is called variance

    While it must be divided with no of observation as per last chapter.

    It’s contradictory Pl check

  264. Amit says:

    Sir, today is Friday and it’s past 4 PM so the trading time for today is over.
    I have calculated daily volatility using past one year return.
    I want to know the volatility of the next expiry of nifty weekly options i.e. coming Thursday (06 May, 2021).

    So what will be the formula?

    (i) Daily Volatility*SQRT(6) (Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, i.e. taking both trading holidays and expiry day into consideration)

    (ii) Daily Volatility*SQRT(5) (Saturday, Sunday, Monday, Tuesday, Wednesday, i.e. taking trading holidays into consideration but not expiry day)

    (iii) Daily Volatility*SQRT(4) (Monday, Tuesday, Wednesday and Thursday, i.e. taking expiry day into consideration but not trading holidays)

    (iv) Daily Volatility*SQRT(3) (Monday, Tuesday, Wednesday, i.e. not taking both expiry day and trading holidays into consideration)

    Please answer. Thank you.

  265. Yogaraj says:

    Pls can you able to say in volatility annual calculation has been selected as 252. What is a logic behind this. Pls explain why 252 selected it is a constant valve or any other parameter.

  266. Sashank says:

    Thank You for the rich value you provide on the internet.

    I calculated along the steps for “TATAMOTORS” for the past 1 year but my data and NSE’s data differ quite a bit. So asking for help. 1. Why is the time value “252”

  267. Sashank says:

    Thank You for the rich value you provide on the internet.

    I calculated along the steps for “TATAMOTORS” for the past 1 year but my data and NSE’s data differ quite a bit.
    For e.g My daily volatility is 0.66% while NSE’s 3.55% and My annual volatility is 10.53%but NSE’s 67.90%. Where did I go wrong?
    and Why is the time value “252” while calculating annual volatility?

    • Karthik Rangappa says:

      NSE calculates volatility mainly in terms of computing margins, which differs from the regular way of calculating volatility.

  268. Priyank Shah says:

    Hey Kartik. You have used the formula of LN here while calculating daily volatility. However, when we have to calculate the final values (+1SD, +2D etc.) we have to use exp function. However, when the values are more than 1 (X>1 for e^x) the values go too high. What to do in such a case? For eg. some stock can have an annual average return of more than 100%.

  269. KRISHNENDU SAHA says:

    In calculation of annual volatility where does 252 come from? Is it number of total trading days in a year? If yes then how to know the number of total trading days in previous year?

  270. Abdul says:

    I calculated Wipro Daily and Annual Volatility ( 15/05/20 to 14/05/21)
    I got answers
    Daily: 2.21%
    Annual: 42% (251 days)
    While you cross-checked at nse website ( in the last pic highlighted by a blue box), I am unable to crosscheck at nse. ( historical data is showing only historical price not daily nor annual volatility)
    Also where I can check Nifty annual volatility?
    thank u sir

    • Karthik Rangappa says:

      Its on the NSE site, please check the details once in Bhav copy. But the values will anyway be different since NSE now calculates volatility from the perspective of margins.

  271. Apoorva says:

    I never knew options are going to be this much easy,All thanks to you Sir. By the way Sir I am facing 1 problem, Sir when i am trying to get data for nifty(symbol). for last 1 year it is showing ”no records” Kindly help SIR. 🙂

  272. RAJU DHAKA says:

    Hi karthik sir,
    nice explanation.
    i would like to ask why you took time 252 to calcualte annulasied volatility.
    as on today I calculated the volatiity for wipro then it came for daily= 2.3% , and annulasied= 35.5% but on NSE website it is showing for daily=2.89% that is ok but annulasied =55%. can u clarify plz

    • Karthik Rangappa says:

      252 = number of trading days in a year.
      NSE calculates the volatility keeping the margins in perspective. Hence the difference.

  273. R.Balajikrishnamurthy says:

    Sir! How can I get to know about the range of the underlying by using the percentage(In NSE website they provided Daily and annual volatility in percentage).

    • Karthik Rangappa says:

      YOu can make these calculations yourself, it is quite easy. Have explained the method in the chapter itself.

  274. Anit Bhattacharya says:

    I am very new to Stock Market. So, my question might seem very trivial 😅. Still asking, Why has time been taken as 252 in the calculation?

  275. sangeet says:

    Hello Sir,
    I tried to calculate the Volatality using Standard deviation(from 4June’20 to 4June’21) but there is a huge difference in the daily volatility and the annual volatality.(Though it is of futures but the difference is significant, can this be considered??). I have tried 4-5stocks but the case is the same for every stock.
    Can you please check in the excel sheet and let me know if i went ahead correctly.
    I am sharing the google drive link where you can check the sheet.

    Also for calculating the Annual Volatality, in the NSE website , the daily volatality has been multiplied with the sq. root of 365 instead of 252?? Since there were 252 trading days during the above period, so the daily volatality should have been multiplied by 252. Isn’t it??
    Thank you.

    • Karthik Rangappa says:

      The difference between NSE’s volatility and the way you’ve calculated is because NSE calculates volatility from a margins perspective. NSE gives more weightage to recent data points where as in your calculation, it does not weigh the data points. HEnce the difference. I’d suggest you stick to your method to get a fair sense of what the volatility of the stock is.

  276. sangeet agarwal says:

    Sir, what about the number of trading days in the NSE website(has considered 365days for Annual volatality). Ideally the no. of trading sessions should be used which is 252days in our case??

  277. Ankit says:

    Hi Karthik,

    Can we not rely on the volatility provided on NSE website? Is there any benefit in calculating it ourselves when they’re so close?

    • Karthik Rangappa says:

      You can, but the NSE calculates the volatility by keeping margins in perspective. Hence they give more weightage to the recent data points so the NSE’s volatility will be different compared to calculating it via the stdev function.

  278. Abhigya Kushwah says:

    Dear Karthik,
    I am absolutely new to the Stock Market but it has always been fascinating me since my student times. But I neither got an opportunity to learn nor did I ever got a good material or teacher to make me understand the stock market. But Varsity has been so nicely designed in a step by step manner that it’s actually easy to learn and understand all the concepts. You have even taught the formulas for coming to the values which are already given on different websites, which is the best part as we should also know how to calculate. Thanks to you mate for all this.

    As I mentioned to you in the beginning that I new to the stock market, hence, I will be coming out will lots of questions, which you or many other sisters or brothers may feel are useless, but I love to be clear on every doubt.

    Now my question to you here is regarding the Volatility.
    1. We have discussed about the calculation of volatility and based on the excel sheet you have given, it’s on the basis of four years. I have prepared similar kind of spread sheet in my excel. Now I wanted to know, that the Daily and Annual Volatility already available on the NSE website is based on how many years data?
    2. When we calculate the 1SD, 2SD, 3SD, which Volatility Data to use – the one given on the NSE website or the one to which we have reached by our calculations?

    • Karthik Rangappa says:

      Thanks for all the kind words, Abhigya 🙂

      1) NSE data is probably for a year, but their approach to calculating volatility is different. They do this with an intention to calculate margins, hence give more weightage to recent data points, unlike the method described here wherein there is equal weightage for all the data points

      2) I’d suggest you use the method described here.

  279. Abhigya Kushwah says:

    Dear Karthik,
    Thanks a lot… I will go by our calculations… But Will keep on troubling you again again, if and whenever I am stuck… in different modules…

  280. AKAASH KUMAR says:

    Excel sheet link is not opening ? Another way to get the sheet ??

  281. raja says:

    Hi Mr. Karthik,

    Your lessons are very simple, practical and interesting.

    Keep up the good work.

    I have a query in the above chapter

    For calculating volatility, time was considered as 252, why?


  282. vicky says:

    from where i can get daily and annual volatility on NSE site?

    • Karthik Rangappa says:

      I’m not sure where they are publishing this info, Vicky. Its best if you can check with NSE directly.

  283. Renu says:

    Very insightful. I am not able to download the XLs from chapter 16 n 17, could you pl check.

  284. Manjunath says:

    How you have selected time as 252

  285. Kunal Vikram Singh says:

    I have question. We calculated annualized volatility using daily returns.

    Therefore, if we calculate volatility using annual prices, then both the value should be same. But they aren’t! Why?

  286. Nilakantan says:

    Thanks a lot for the detailed explanation Karthik.. Couldnt imagine the kind of efforts would have gone in to build this wonderful modules.. Really appreciate your teams effort on this.

    we are not able to download the Excel link attached here.. is the link chagned?

  287. Abhishek says:

    Hi Sir,

    What period should we use to calculate historical volatility comparable with Nifty India VIX?

  288. Prashant says:

    Hello Sir,
    But from NSE data annual volatility showing 25.52 seems derived with 365 days and we have taken 252 trading days. Please confirm.

    • Karthik Rangappa says:

      252 is the number of trading days in the year (approximately). I’d suggest you take both and see which one you get better results in.

  289. Prashant says:

    Got it Sir! Thanks for the prompt response.. really appreciated!
    Learned a lot.. still learning.. thanks for the quality contents and efforts..

  290. Karan Ramchandani says:

    Why we use log to distributre the return? and we take time as 252??

  291. Roshan says:

    Can we calculate the volatility of bank nifty using the method explained in this chapter.
    OR is there INDIA VIX like tool available for Banknifty?

  292. Om says:

    Sorry for this silly question…I am very much new to stock hope you don’t mind. My question is why time value is 252 ?


    Hi Sir,

    To convert to annual return i need to consider the number of trading days last year right?

  294. Amit says:

    The time used in calculating volatility(here252) , how do we get that?

  295. Victor says:

    Hello Karthik,
    I am not very good with excel sheets. Is there a formula to calculate the Daily returns for the entire year? it is time consuming to calculate individual rows. Thanks in advance

Post a comment