M5-Ch16-Cartoon

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 – http://www.nseindia.com/products/content/equities/equities/equities.htm 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



881 comments

  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.

    • Karthik Rangappa says:

      Raj, what you have quoted is a very practical situation. The main reason for this would be changes in volatility. As this mini series on Volatility evolves, I’m sure you will get the answers yourself. Please stay tuned till then 🙂

  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?

    Shankar

  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:

    karthik,

    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:

    Hi,

    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

    • Karthik Rangappa says:

      Yes, for this the data has to be clean and adjusted for splits and bonus. Usually data vendors such as http://www.neotradeanalytics.com/ do this for you.

      • Suren says:

        The neotradeanalytics site seems to be shutdown. Can you explain what do you mean by cleaned and adjusted ? Can we ourselves not do it ? Please explain with an example.

        • Karthik Rangappa says:

          Yup, unfortunately they shut shop. Check https://www.truedata.in/ instead.

          Clean and adjusted usually refers to cleaning up the data for corporate actions such as – splits, bonus, special dividends etc. Doing it yourself can be quite challenging considering these things happen everyday…for some stock or the other.

  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.
    regards

  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.
    thanks

    • 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

    Regards

    • 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 .

    Regards

  38. aehsan4004 says:

    CAN SOMEONE PLEASE SHARE DIRECT LINK OF NSE SITE PAGE WHERE ANNUAL & DAILY VOLATILITY OF EQUITIES AND CURRENCY BE FOUND ?
    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:

    sir,
    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:

    Thanks.

  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?

    Regards,
    Dev

    • 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:

        Thanks,
        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.

        Regards,
        Dev

        • Karthik Rangappa says:

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

          • Dev says:

            HI,
            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.
            Regards,
            Dev

          • 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.

            Regards,

            Dev

          • 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.
            Regards,
            Dev

          • 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:

    Sir,
    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.
    Thanks

  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.

    Regards,

    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 header..as 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:

    HI,
    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:

    Hi,
    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.

    • Karthik Rangappa says:

      Check this – http://avasaram.com/

      • M K says:

        HI,

        have checked this site, but there’s no data they have provided for indian stock exchange triall all optiosn and strategies finder or charting screener,
        it;s just nothing coming over there for indian stock market. seems only related to USA markets.

        Please help!!

        • Karthik Rangappa says:

          I understand, but thats the best option I know off. Will keep you posted as and when I find something reliable.

  59. ASHOK KUMAR jANARDHAN says:

    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.

  60. ASHOK KUMAR jANARDHAN says:

    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

    • Karthik Rangappa says:

      I guess NSE takes into account 365 days, so I guess its ok to stick to this particular time count convention.

  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
    Sudheer

  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.

    Thanks
    Tirth

    • 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:

    Sir,
    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:

    Sir
    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
    Rajib.

  80. Rajib says:

    Karthik,
    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
    Thanks.

  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 ( https://support.google.com/docs/answer/3093281?hl=en)

    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 useful.one 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
    regards
    girish

    • 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:

    Karthik.
    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?

    Thanks!
    Ash.

    • 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.

    Thanks

    • 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?

    Thanks
    Pankaj

  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…..
    OR
    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 https://www.nseindia.com/products/content/derivatives/equities/adjust_in_case_corp.htm
    Thanks

  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?

  112. SUHAS SHRINIVAS VAZE says:

    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.

    Nifty
    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:

        Hi,

        Please see below link

        https://drive.google.com/file/d/1zbOGojgXNkBNE7I5urm8JeFE4C1w54Oy/view?usp=sharing

        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 Sensibull.com 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.

  119. RANJANA CHOUDHURY says:

    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.

    https://www.youtube.com/watch?v=zT1H4vjMTjc&t=367s

    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 -https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuoteFO.jsp?underlying=BANKNIFTY&instrument=FUTIDX&type=-&strike=-&expiry=29NOV2018

      • 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 🙂

        Thanks

        • Karthik Rangappa says:

          Shernik, this can be quite tedious. It is best if you can download the data from a professional data source.

  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
    Prafulla

  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:

      Vivek,
      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..as 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:
    https://nseindia.com/archives/nsccl/volt/CMVOLT_22022019.CSV

  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.

    Thanks,
    Manish

  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?

    Regards
    Anand

    • 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?

        Regards
        JB

        • 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.
    THANK YOU

    • 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.
        THANK YOU SO MUCH.

        • 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:

    THANKS FOR THIS USEFUL INFORMATION !
    * * * *
    Q.

    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:

    Sir/Madam
    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:

    sir,
    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:

    Hi,
    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:

    SIR, HOW TO CALCULATE MEAN OF DAILY RETURNS?

  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?

    • Karthik Rangappa says:

      It will expire worthless unless a major move in your direction happens and the option premium picks up value.

  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 options..it 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:

    Sir,

    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:

    Sir,

    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 ?

    Regards,
    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:

    Hi,

    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)?

    Regards,
    Arun

  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.

    Regards,
    -Sachin

    • 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. […] 16. Volatility Calculation (Historical) […]

  169. 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.

  170. 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…..so 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.

  171. 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.

  172. 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

  173. 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…..so 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.

  174. 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.
    Regards

    • 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 🙂

  175. 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.

  176. 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,

  177. 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.

  178. Amit says:

    Hi Karthik ,

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

  179. 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?

  180. Parag says:

    Sir,
    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.
    Thanks.

    • Karthik Rangappa says:

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

  181. 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

  182. 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.

  183. 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!

  184. Akash says:

    Sir
    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.

    Thanks

  185. 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?

  186. 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?
    Regards
    Abini

  187. Abini says:

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

  188. praveen says:

    Hi Kartheek,

    Here is the link – https://www1.nseindia.com/products/content/all_daily_reports.htm
    from above link we can download daily volatility.csv.. Please download the same we can see how NSE calculating the Volatility

  189. 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

    • Karthik Rangappa says:

      The futures price is slightly different from the spot price. Do check the module on futures pricing.

  190. 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.

  191. 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.

  192. 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 : https://www.moneycontrol.com/india/stockpricequote/banks-public-sector/statebankindia/SBI
    Zerodha : https://www.tradingview.com/x/G7qVzuNQ

    NSE :

    https://www.tradingview.com/x/G7qVzuNQ Between 500 – 1000
    https://www.tradingview.com/x/G7qVzuNQ 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.

  193. 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?

    • Karthik Rangappa says:

      I’d say mine, but the difference is too much 🙁

      Doing a bit of research myself on this.

  194. 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?

  195. 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?

  196. Anil Gupta says:

    Sir,
    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?

  197. 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.

  198. 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?

  199. Anil Gupta says:

    how to check NSE calculation?

    • Karthik Rangappa says:

      I think the calculation technique is available on their website, you need to look for it.

  200. Varun Agrawal says:

    Hello Karthik,

    I am not sure if you are aware of it, but https://in.tradingview.com/screener/ 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.

  201. 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.

  202. Anil Gupta says:

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

  203. 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% .

  204. 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.

  205. 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 ? .

  206. 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
    Manohar

  207. 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.

  208. Manohar Nadkar says:

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

  209. Ragav says:

    Sure, thanks.

  210. Aniket says:

    Hello,
    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.
    [img]https://i.imgur.com/GuU5oBl.png[/img]
    The above date pertains to the period 22 may 2019 – 21 may 2020
    [img]https://i.imgur.com/XOllZep.png[/img]
    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.

  211. Aniket says:

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

  212. 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.

  213. 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

  214. Uday says:

    Hello

    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?

    Thanks

    • 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.

  215. 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.

    Thanks

  216. 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.

  217. 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.

  218. 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?

    • Karthik Rangappa says:

      Hmm, that means there are no observations across these bins. Can you try reducing the number of bins?

  219. 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.

  220. 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.

  221. 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.

  222. 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 🙂

  223. 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 🙂

  224. 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?

  225. 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.

  226. 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.

  227. rajesht says:

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

  228. 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.

  229. 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.

  230. 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.

  231. Sabareesh SK says:

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

  232. 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

    Regards

  233. 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

  234. 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.

  235. 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.

  236. Satheesh says:

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

  237. Aman Parvez says:

    Sir,
    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.

  238. 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

  239. 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.

  240. 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. 🤔

  241. 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.

  242. 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.

  243. 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!

  244. 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)

  245. 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?

  246. ANURAG says:

    HELLO KARTHIK, WHY YOU TAKE 252 UNDER LEBEL TIME WHILE CALCULATING ANNUAL VOLATILITY?

  247. Sagar says:

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

  248. 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?

  249. 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?

  250. 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.

  251. 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.

  252. 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?

  253. 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.

  254. Luv Nambiar says:

    Thanks, Karthik. Got it.

  255. 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.

    • Karthik Rangappa says:

      I’d like to believe that, but many traders find comfort in sticking to the exchanges’ convention.

  256. 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.

  257. 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?

  258. Shankar Mohan says:

    Karthick

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

    why ln to calculate returns?

  259. Tayaan says:

    Hi!
    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.

  260. A Jain says:

    Hi
    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.

  261. 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 🙂

  262. CHANDAN NAGARAJA says:

    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.

  263. 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?

  264. 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

  265. 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.

  266. Yogaraj says:

    HI,
    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.

  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. So asking for help. 1. Why is the time value “252”

  268. 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.

  269. 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%.

  270. 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?

  271. 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

    https://www1.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuote.jsp?symbol=WIPRO&illiquid=0&smeFlag=0&itpFlag=0#

    • 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.

  272. 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. 🙂

  273. 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.

  274. 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.

  275. 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?

  276. 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.

    https://drive.google.com/file/d/1OGxpJnIV5NUS_2VrtyNuj8lAxksuo4dk/view?usp=sharing

    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.

  277. 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??

    • Karthik Rangappa says:

      I’m not sure what they use, I guess they take in 365 days. Maybe you should check with them.

  278. 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.

  279. 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.

  280. 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…

  281. AKAASH KUMAR says:

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

  282. 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?

    raja

  283. 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.

  284. Renu says:

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

  285. Manjunath says:

    How you have selected time as 252

  286. 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?

  287. 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?

  288. Abhishek says:

    Hi Sir,

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

  289. 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.

  290. Prashant says:

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

  291. Karan Ramchandani says:

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

  292. Roshan says:

    Sir,
    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?

  293. Om says:

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

  294. RATHEESH CHELLAPPA says:

    Hi Sir,

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

  295. Amit says:

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

  296. 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

  297. Madhu Gauranga Das says:

    The difference in your calculation and Nse calculation for annualised volatility number is because you multiplied the SGRT with 252 and NSE does that with 365 days

    thanks love your content

    • Karthik Rangappa says:

      Thats right Madhu. There is (could be) another reason. NSE uses a lambda approach wherein they give more weightage to variance in returns for the recent few days as opposed to our approach where we give equal weightage to all returns. NSE’s idea of volatility is to figure how much margins to charge given the recent volatility in the market, and our idea is to figure the riskiness of the stock over a period.

  298. Devansh Gupta says:

    Hi Karthik! My question is regarding the calculation of annual volatility. You have mentioned that in order to convert the daily volatility to annual volatility just multiply the daily volatility number with the square root of time. But I did not understand how you got the 252 figure in the example of Wipro. There are 365 days in a year so should it not be the square root of 365?

    • Karthik Rangappa says:

      252 is the approximate number of trading days in a year, Devansh. 365 is the total number of calendar days in a year.

  299. choi says:

    Can not download excel sheet, can you please share on my email ID

  300. Monali Gursale says:

    Hello Sir,
    I could get the historical closing price for 1 year for all the stocks but how to get the data for Nifty and Bank Nifty.

    • Karthik Rangappa says:

      Monali, I’d suggest you get in touch with an authorised data vendor for this. Make sure you get the continuous futures data.

  301. Rakesh says:

    Sir time 252 how?

  302. Aditya says:

    Hey Karthik , I hope you are still active here on the forum answering doubts –

    I have data from 1991 april to 2021 november ( monthwise) and i have found the standard deviation of 30 years and 8 months .

    1)the volatility / std dev i have found : is it called month wise historical standard deviation/volatility ?
    2) can i convert this to weekly or annual or daily standard deviation of this historical month based volatility ?

    I have also found the mean ( month based historical ) for the same

    3) is it called month wise historical average ?
    4) can i convert this to weekly or annual or daily averages of this historical month based average ?

    4 questions above
    hoping for a positive answer

    thank you

    • Karthik Rangappa says:

      Aditya, yes, I’m active across the entire portal.

      1) Yes, that correct
      2) Yes you can
      3) Yes
      4) Yes

      YOu can convert any time frame to any time frame you’d wish, there is no problem with that. By the way, I don’t think taking 30 years SD is helpful, market dynamics have changed completely over these years. SD is best across the last few years.

  303. Aditya says:

    thank you sir , followup will be :

    how to convert month wise average to
    > week wise average
    > day wise average
    > annualized average

    and

    how to convert month wise volatility to
    > week wise volatility
    > day wise volatility
    > annualized volatility

    yes sir i will look to it i use shorter time frame than 91-21 thank you so much sir
    hoping for a positive reply

    • Karthik Rangappa says:

      Best is to first convert to daily and then scale the daily to whichever time frame. If monthly is 7%, the to convert monthly to daily, you have to divide by sqrt of time…so in this case it will be 7%/Sqrt(30). This will give you daily.

      Now from daily, you can convert to any timeframe for example if you want 45 days, then daily vol * Sqrt(45).

  304. Aditya says:

    shouldnt monthly factor be root 21 , as 21 working days in a month ( by logic that 21*12=252 )

    • Karthik Rangappa says:

      Yup, you can consider the actual number of months assuming you are considering the yearly number of days as 252.

  305. Narendra Athota says:

    STDDEV function is no more supported in the latest version of the excel sheet. When it’s calculated for the TCS using STDDEV.S function from 17-Dec-2021 through 16-Dec-2021, abnormal difference around 5% between what NSE is showing for the Annualized Volatality vs the calculation using Excel.

    • Karthik Rangappa says:

      Ah is it? I’m still using the old version. Can you check if there is stdev.p, if yes, can you use that and check?

  306. Vishnu Kant Jha says:

    I calculated the avg daily return of Nifty 50 index for the past 11 years(2010-2021). It comes out to be -0.04. Does the negative sign requires to be dealt in a different way or should I follow the same procedure because the Avg Annual return is coming out be -10%.

    • Karthik Rangappa says:

      Hmm, I’m not sure if the number is right. Markets have trended up quite well since then. Maybe you should double-check? 0.04% is ok, but I’m not convinced about the +ve sign.

  307. Vishnu Kant Jha says:

    Hi,
    While calculating weekly volatility, from Friday end of Day to Thursday expiry, What should be the value in sqrt time, no. of trading sessions remaining i.e. 4. Right?

  308. Sri says:

    Good article.

    I cross-checked with NSE figures. I think they are using 365 days, not 252 days.

  309. Manoj says:

    while calculating annual volitility time is taken as 252. how we got this ?
    It it the count of rows of daily data for one year we downloaded that is equivalent to 252?

  310. Kshitij says:

    Can anyone tell me from where I can double-check my volatility calculations on NSE website? The information provided there now is different from what is there in the screenshot in the article.

  311. Anand Patel says:

    why time is taken as 252 while calculating annual volatility ?

  312. Ujjwal says:

    Hi kartik,

    I just want to confirm about the global market situation that impact the nifty prices in India? Kindly explain sir or My link you share.
    People are earning only on the basis of global market. How much is it true sir

    Would obliged and thankful for your response sir,✨☺️

    • Karthik Rangappa says:

      Ujjwal, that cant be true. You need to have a view on both global and local markets. Trading on the basis of global cues alone cannot be an edge.

  313. Sudhindra Gururaj says:

    Hi. Why are you using log returns and not a simple – current close price / previous day close price?

    Thanks.

  314. harshit agrawal says:

    from where we get historical data of nifty 50 or bank nifty

  315. Muthu Suriya says:

    Karthik Sir, in the downloaded excel sheet i am getting 28.04% instead of 23.3% dont no why!

  316. Dhananjay says:

    Here is quick question- We have calculated the volatility for underlying by using its past 1 year data and then we proceed to calculate the range for it for next some days as per our interest. So how much past data I should use when I have to calculate range let say for next one week (Assuming I am thinking about trading weekly contracts). Should I go with same classic past 1 year data or should I give more weightage to recent data. Or should I go for more than past 1 year data? Please clarify

    • Karthik Rangappa says:

      You can consider both actually to develop a wider perspective. Start with 1-year data and then maybe 3 months as well.

  317. Dhananjay says:

    I don’t know why but link you provided for downloading excel sheet of Wipro is not working. It just redirect but doesn’t download anything

  318. Dhananjay says:

    Sure! Thanks a lot!

  319. RAJIV ASHAR says:

    I am new to option world but I am serious in making study. I am not good in mathematics. My question is now a days nseindia publish VAR and extreme loss rate and not volatility. Can you explain what it is how it is useful https://www1.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuote.jsp?symbol=SUNPHARMA&illiquid=0&smeFlag=0&itpFlag=0
    In previous chapter you explained standard deviation and explained method of calculation. But in this chapter you have calculated by calculating LOG METHOD what is difference

    • Karthik Rangappa says:

      Rajiv, VAR, and extreme loss are for calculating margins. For volatility, you can calculate using the same technique that we discussed in the chapter. Log method is just another technique to calculate the returns. You can stick to the regular method.

  320. Ankith says:

    one doubt regarding the calculation of annual volatility. should we take square root of 365 days for calculating annual volatility or 245 days ( as actually there is only 245 trading days after sundays , saturdays and holiday )

  321. Sandeep says:

    Dear Karthik sir,

    Can we download the historical closing values of Nifty and Bank Nifty, i am unable to locate.
    Please share the link.

  322. Shubham says:

    Hi Karthik sir, How you Calculated Annual Volatility
    I didn’t understand SQRT(254)

    • Karthik Rangappa says:

      Annual volatility = Daily volatility * Sqrt (time).
      Time = Number of trading days which is 252.

  323. Abhishek Suresh says:

    Can someone please tell me how to get the data for Bank Nifty and Nifty 50 to calculate daily returns, SD.

  324. GOPAL LAHOTI says:

    Sir, Suppose I calculated daily and annual volatility from period 11-04-2021 to 10-04-2022 then when my daily and annual volatility data expires ? In a nutshell, When I come to know I have to start calculating such volatility for next period ?

    • Karthik Rangappa says:

      It kind of stays good for at least 1 week, you can recalculate again after a week. Technically, you can calculate the next day also 🙂

  325. Paras says:

    Hi there!
    A small query regarding time,do we always have to consider 252 days as number of trading days or it may change?
    Thanks in advance!!

  326. Paras says:

    Another related query as while explaining you have always taken a year’s data and calculated log returns and then converted it into the time frame as an when required,ex-15dys,30 days.However can we not directly find the log returns of only 30 dys and calculate the Standard Deviation??

    • Karthik Rangappa says:

      If you take monthly time series (12 data points per year), you will directly get 30 days’ data. The same goes for taking weekly data.

  327. pavan says:

    Sir,
    I have tried to download your excel sheet but its not downloading to refer.
    I have under stood how to calculate standard deviation as u mentioned, but mean u have not mentioned but its imp in next chpter for normal distribution. So

    daily avg/ mean =sum(daily return) / no of rows
    for above sheet wipro= Sum/243=0.012
    I got this value.
    is this correct value?

  328. Avnish says:

    Hi Karthik,

    Very good efforts to explain concepts in a simple form that that can be understood by most people.

    Reference to above calculations, when we calculate daily volatility by using Annual Volatility, the number 1.60% does not match the daily volatility number (1.34%) of NSE. Assume NSE is using different data to calculate the annual volatility versus daily volatility, like Annual Volatility could be calculated by calculating the standard deviation % of annual data of the stock as well, using closing prices for each of the past years. What are your thoughts on the same?

    Also, for intra day volatility can’t we use the same logic as we used for daily volatility calculations but instead applying it on the respective frequency’s data e.g. when calculating minute level volatility, one can use minute data points. However, the question is how much data is enough to calculate volatility?

    • Karthik Rangappa says:

      Avinash, I think NSE uses a slightly different approach, wherein they calculate the volatility keeping margins in perspective. So they kind of give more importance to the recent data points compared to the technique taught here, wherein there is equal weightages to all the data points. Hence the difference.

  329. Nipul says:

    Hello sir, how do we calculate daily average return of index or stocks?

  330. yakshdeep says:

    sir how to calculate volatility for 1 hour or smaller time frames???

  331. Bhaskar says:

    Sir ,
    I have an account with Zerodha , my client code is mentioned above, can you please check whether the download excel link is working or not. Not able to download the excel sheet. Thank you.

    • Kulsum Khan says:

      Hi Bhaskar, we have added the link again, could you please check now? There seems to be no issue with downloading the excel.

  332. Bhaskar says:

    Hi Kulsum,
    Thank you for your reply, sorry for replying late. Yes, the link is working, seems there was an issue with my Opera browser. tried a different browser and its working. Thank you for looking into this.

  333. Amit says:

    For calculating annual volatility from daily volatility why time is taken as 252 , while it should be 1 year ?

  334. Pallavi says:

    If there is a person like you to teach and support ,I WILL become a very very successful trader and then I will declare that I have two gurus. 1)Mr.Eckhart tolle, my spiritual guru and 2) Mr. Karthik Rangappa my trading guru.

  335. Hardik Sonagra says:

    Now a days, I am going through one of varsity module 5. Each topic was very well explained in each chapter by you. currently I am stuck at calculation of annual volatility. I could not find “Annualised Volatility” value calculated by NSE at the link provided in chapter. I can see “security wise delivery position” and “Value at Risk in %” over there. I had calculated annualized volatility of a stock according to method taught by you in this module. How can I cross check whether it is correct or not?

    • Karthik Rangappa says:

      Hardik, I think NSE has changed the location of file. Maybe check the bhav copy file once?

  336. Rajiv K says:

    Hi ..thanks for such detailed chapters on Option..I dont think such resource exist anywhere else in web…for Free of Cost..
    Now for my query ..Can you pls share me exact link where I can Snapshot for Future option ( like you shared for Wipro in NSE website)..Tried searching could not found..

    Thanks in advance….
    Rajiv

  337. Sandeep says:

    Dear Karthik sir,
    The chapter says the formula to calculate Log returns in Excel is LN(Today’s price / Yesterday’s price).
    Similarly what is the formula to calculate the % returns ?

  338. Sandeep says:

    Dear Karthik sir,
    The chapter says the formula to calculate Log returns in Excel is LN(Today’s price / Yesterday’s price).
    But what is the formula to calculate the % returns ?

  339. Harsha says:

    Hi sir,
    How can we find intraday volatility?
    Is there any method to find intraday volatility?
    Is ARCH a good method to find intraday volatility?
    Thank you sir.

  340. Franklin Loyola says:

    Sir,
    First of all thanks for the work you put in to make all these study materials and also in answering the queries.
    Sir,few doubts
    1.Daily return formula = LN (Today’s Value / Yesterday’s Value) expressed as a percentage.
    As it is used to calculate the daily return,why yesterday’s value is used here.
    Also,in step 2 of Calculating Daily Returns
    Return = (Ending Price / Beginning Price) – 1
    Here in formula,it is beginning price,is the open price of the day being meant here as beginning price,I ask this because in pic of the excel sheet just below this formula,it’s shown LN(B3/B2),B2 and B3 are closing prices, aren’t they?
    2.in the step 3,”After the open bracket, select all the daily return data points and close the bracket”.
    What all are the daily return data points mentioned here,which all values are said to be involved in daily return data points.

    • Karthik Rangappa says:

      1) Return is calculated based on a reference value. For daily return the reference value is y’day’s closing price
      2) Ending price = today’s close and beginning price’s is y’day closing price
      3) Just y’day and today’s close.

  341. Franklin Loyola says:

    Thanks for clearing doubt,sir

  342. Franklin Loyola says:

    Sir,
    dates that have selected in the calculation to calculate the daily return is from 22nd July 2014 to 21st July 2015, that’s a total year.As it has involved daily closing prices of an year,can’t it be considered as annual volitility.why is it required to multiply the answer with sqrt.255.

  343. Franklin Loyola says:

    Sir,
    Instead of using the formula for calculating return ,why this formula Return = (Ending Price / Beginning Price) – 1, is used, can’t we calculate return just by subtracting ending price-beginning price.
    Sir,Please tell where I went wrong

    • Karthik Rangappa says:

      That will give you the absolute change in price, you divide the absolute change by y’day’s close you get the return.

  344. Franklin Loyola says:

    Sir,
    In the Image given just above step 3,the return of 22nd and 23rd July is not shown and also in the very next image only 23rd July daily return is shown,why is it so,sir?

    • Karthik Rangappa says:

      For return calculation, you need two reference prices. If you want to start from the 22nd, then there is no data on for 21st, right? Hence you cannot proceed.

  345. Franklin Loyola says:

    Sir,
    In question asked on July 20,2022,
    I didn’t get the clarity,sir.As all the closing prices of an year(22nd July 2014 to 21st July 2015) has already been taken up for daily return calculation,why again seperately we need to calculate annual volatility.

  346. malhar patel says:

    unable to download excel sheet. 🙁

  347. Mahesh Venkat says:

    Dear Karthik,

    I am unable to figure out why LN is used It is mentioned Long Returns which i am unable to figure out. Can you please explain if time permits?

    • Karthik Rangappa says:

      I’m copy pasting an earlier reply for a similar query –

      Here is the exact calculation for determining the price range

      1. calculate daily log returns
      2. calculate mean & SD of log returns series
      3. 68% confidence interval is current price * exp (mean*time +/- SD* sqrt(time))
      4. 95% confidence interval is current price * exp (mean*time +/- 2*SD*sqrt(time))

      The process involves computationally intensive tasks such as calculating log returns, calculating exponential of a value etc.

      Under the following circumstances, the above calculations can be approximated with more simpler calculations

      1. Short periods of time: When time is small, (mean * time) is so small that it hardly makes any difference to the final value i.e. mean * time << SD * sqrt(time) 2. When daily percentage movement < 10%, percentage returns and log returns nearly equals. Computationally, percentage is much faster to calculate than log returns. so percentages are used instead of logs. Computationally faster approximation is: 1. calculate percentage returns 2. calculate mean and SD 3. 68% confidence interval is current price (1 +/- SD*sqrt(time)) 4. 95% confidence interval is current price (1 +/- SD*sqrt(time)) I might have switched between approximate and accurate methods in many chapters. If you are implementing a system, a rule of thumb one can use is Go for a simpler method, if the price range > 20%, recalculate with accurate method, otherwise you can process with approximation.

  348. Mahesh Venkat says:

    Dear Karthik,

    Can you please clarify on that LN function used. It has been mentioned a s Long returns which is confusing for me.

  349. Mahesh Venkat says:

    Dear Karthik,

    I am unable to figure out why LN is used It is mentioned Long Returns which i am unable to figure out. Can you please explain if time permits? Also can we just work this out without Natural Log .

  350. CM Gupta says:

    NSE द्वारा
    ★ निफ्टी फ्यूचर में भी डेली और ऐनुअलाइज्ड वोलाटिलिटी दी जाती है
    और
    ★ India VIX भी दिया जाता है
    और दोनों का प्रयोग डेली, वीकली, ऐनुअल रेंज संभावित रेंज निकलने में होता है
    तो
    ★ india VIX और निफ्टी फ्यूचर की ऐनुअलाइज्ड वोलाटिलिटी में अंतर क्या होता है,
    ★ दोनों की वैल्यू में अंतर होने से एक ही चीज की रेंज अलग अलग मिलती है
    ऐसा क्यों?

  351. Pradeep says:

    Hi Karthik, I think the reason why we are seeing a difference between what shown on NSE website and your calculation is because I think NSE is taking SQRT of 365 instead of 252. When I take 365, it comes very very close to NSE number. Not sure if this is so, but just wanted to point it out.

    • Karthik Rangappa says:

      Yes, this could be one of the reasons. This is called the time count convention. We are using actual by actual, so in that case, we consider 24 trading days (ignore weekends) and 252 total trading days. Or you can use 30 monthly days and 365 days in a year, which NSE seems to be using. Either way you need to be consistent with what you use, cant use 24 and 365.

  352. Megha Runthala says:

    Sir, why did we use the LOG (LN) FUNCTION to calculate Daily return?

  353. Vishal Prasad says:

    Hey, please help me with this.

    Suppose I calculated the standard deviation(1SD) of nifty for the last six months and its 0.0109. Hence the daily volatility is 1.09%. Now volatility for the next three months(63 trading sessions) comes out to be 8.65%(1.09*√63).

    Now how do I calculate the range for the next three months. So the upper range would be avg+ 8.65% or spot +8.65%.

  354. jayasree says:

    Hi! Thanks for the crystal clear explanation. But the historical data which I tried to download shows different closing prices for WIPRO(22-jul-2014 to 21-july-2015). More over when I tried to download the excel it is not getting downloaded. Please provide the proper link so that I can calculate and understand the concept better.

  355. Gauri S Sinha says:

    Hi Karthik

    Thanks a lot for putting together your thoughts on this complex stuff in such a simple way.
    I have one question on Volatility, when you used daily closing price for one year as in example for July 2014 to July 2015..the volatility calculated is daily volatility for that period?
    if we take 10 day’s closing price and calculate volatility, then is that a daily volatility for that 10-day period? and can it be used to calculate annualized volatility by multiplying SQRT(252)?
    If we take 5 year closing price and calculate volatility, then is that an annual volatility for that 5-year period? or something else….

    • Karthik Rangappa says:

      Yes, if you calculate the daily volatility, then you will have to scale it accordingly by multiplying it with Sqrt of time. If you calculate for 10 days, then divide by sqrt of 10 to get the 1 day vol and then multiply with Sqrt of 252 for yearly volatility.

  356. kd patel says:

    hi kartik sir while using STDEV function in excel i got different answer other than using manually calculation first find variance and then its sqrt
    i took example of last chapter billy and mike ‘s put all 6 value and then use STDEV fun in excel and answer is different pls help me

    • Karthik Rangappa says:

      Most likely, you’d missed some step. Its unlikely to get two different numbers. Can you please recheck again?

  357. Kd patel says:

    If we use in excel =STDEV(-1.67,1.33,-0.67,2.33,-2.67,1.33) answer is 1.96 around while in previous chapter it was 1.79 in billy and mike’s data

  358. pankaj prajapati says:

    dear sir how time here is 252 can you help me with this

  359. Kd patel says:

    Kartik sir tell me when you check

  360. kd patel says:

    If we use in excel =STDEV(-1.67,1.33,-0.67,2.33,-2.67,1.33) answer is 1.96 around while in previous chapter it was 1.79 in billy and mike’s data

  361. Rahul says:

    Hi Karthik,bI just have one doubt in whole calculation part the daily volatility in case of the nse screenshot shows 1.34 while when we do according to the formula that is daily volatility=annual volatility/√time period (that is 252) why do we get the daily volatility as 1.60?

    • Karthik Rangappa says:

      There is a slight difference in calculation, and this is because NSE gives more important to recent trading days to calculate margins. In our case, we give equal importance to all data points.

  362. Aditya says:

    Why you have taken 252 days as time period for annualized return ?

  363. Sunil says:

    Hi, i just want to know that you mentioned as you calculated average of 0.04% and mentioned from previous chapters we can see the calculations, but previous chapter you dicussed about the daily volatility and annual volatility to find from wipro stock but never mentioned the average %. so please explain if i missed somewhere

    • Karthik Rangappa says:

      I’m guessing its in an earlier chapter, and I must have generally said ‘ previous’ chapter. Can you kindly check once? Thanks.

  364. Krishna Shah says:

    hii kartik sir, the excel file which is there in Volatility Basics is not downloadable.

  365. Amal says:

    Hi karthink,

    if we are trading a credit speared on on a particular stock and that stock daily volatility is [ 2.5 ]. and Nifty daily volatility is [1.08], so if i have created same credit speared on nifty with same MAX RISK and i have received 1000 rupees as primum so should i compare this with a stock which has 2.5 daily volatility and if that stock is fetching me 1000*2.5[2500] as primum then only i should consider trading on that particular stock ? or should i consider stock beta ?

    • Karthik Rangappa says:

      The risk profiles of both stock and Nifty are completely different, Amal. So are the returns. Comparing Nifty, a basket of 50 stocks may not make sense with a single stock. I’d suggest you go with your risk appetite and how much you are willing to risk on the trade 🙂

  366. Sudheer Kumar says:

    Hi Karthik,

    In your explanation your above you have shown the closing price of ten days for calculating the Volatility. And in the excel sheet given in your article has the data for almost an year (245 days). Could you please help me understand what is the right number of days to consider for calculating the volatility?

    Regards,
    Sudheer

    • Karthik Rangappa says:

      Sudheer, so these are conversions based on yearly and daily calculations. So if you have calculated yearly vol, then you can scale it down to 10 days or whichever time frame you’d need. Likewise, with daily vol…you can scale it up to 3 months, 6 months or whatever time scale you’d want.

  367. Jignesh Dalal says:

    Possible typo below:
    “I have used the Excel function ‘LN’ to calculate the long returns.”
    Should be “.. log returns.”

  368. Parikshit Singh says:

    What is this time constant you’ve used here “252”.

  369. Saurabh Singh says:

    Hello sir, that link to open excel sheet is not working…

  370. Saurabh Singh says:

    No issue, I downloaded from another site

  371. Aditya says:

    while converting daily volatility to annual volatility you have used factor of square root of time
    where time is 252
    My question is what exactly is 252

  372. logi says:

    Excel link at the end of section is not working

  373. Rohan Poojary says:

    Sr. the Average/Mean that we have to consider is of DAILY RETURN right ?

  374. karan says:

    how can we look for volatility on NSE official website now to double check and for nifty from where to get the historical data

    • Karthik Rangappa says:

      You can check the option chain on NSE. I’d even suggest you check out Sensibull for this.

  375. Ramandeep says:

    To get the daily volatility, do 1 year of historic data will always require?

    What if we use 6 months of data? Will it conclude the daily volatility range?

    • Karthik Rangappa says:

      You can use 6 months also, you will get the daily vol of 6 month. I generally prefer 1-year data.

  376. Ankit says:

    hi karthik, can you tell me when converting the daily volatility to annual, why are we multiplying or diving the returns with the square root of (365)??

    • Karthik Rangappa says:

      You need to multiply or divide by time to scale up/down the volatility. There is a mathematical derivation for this, you can look it up online if you interested in the math part.

  377. Sathish says:

    NIFTY daily volatility comes to around -0.01% according to my calculation. This is taken from 1 year data. Is there anywhere I can cross check this information, as NSE only gives this information for deliverable securities? Or if you can, please let me know whether this is right. Thank You.

    • Karthik Rangappa says:

      NSE or maybe Sensibull you can check to validate the data? Btw, most places they calculate the volatility keeping margins in perspective.

  378. Badri says:

    Hi,
    As you said to download the file to calculate the daily return from NSE, i think NSE the website got makeover and currently it is redirecting to error page.
    However, i tried to figure out the url, not sure that is correct or not, pasting it below
    https://www.nseindia.com/get-quotes/derivatives?symbol=NIFTY&identifier=OPTIDXNIFTY27-04-2023CE17700.00
    Question 1:
    Can you please confirm whether that is the url
    Question 2:
    to calculate the Mean and SD, do we need to have 1 year data or 3 months past data is sufficient enough. Because, i see that NSE is allowing to retrieve past 3months data only, if not we are getting duplicate records.

    Can you please through some light on this

    • Karthik Rangappa says:

      1) You’d want the historical data of stocks I guess. Look for a stock symbol, in the stock page, look for historical data (its there in one of the tabs)
      2) Both are ok and is dependent on how you intend to trade in the market

  379. Dr Nikhil Choudhary says:

    how did you come up with 252 as time … may look silly . no of entries in excel are 245

  380. DeepaK says:

    Hi Kartik,

    While calculating annual volatility by the square root of time from were did you get the time value = 252

  381. Sandeep says:

    Dear Karthik sir,
    Do candlestick patterns, indicators work in VIX chart too so that we can predict the VIX?

  382. Chander says:

    Sir,
    Will you pl tell how to get the volatility data for a stock from the NSE web site referred here?

  383. Sandeep says:

    Dear Karthik sir,
    Does a gap up/gap down increase volatility of that particular stock/index?

  384. Anirban Basak says:

    Sir,

    (i)To calculate the daily/annual volatility, you have suggested to calculate in with a look back period of 1 year. Sametime, you have suggested to get the data of daily spot close prices of instrument (stock EQ/index) from NSE website. Now, we have an option in zerodha terminal called “Table view” where similarly we are given with a populated excel sheet of instrument (stock EQ/index). Can we use this data from zerodha in “Table view” to calculate the annual/daily volatility of stock/index?

    (ii)Alternatively, can you please share the link of NSE website from where we can also get the historical data of index spot prices as well as any stock EQ historical data? (The link you have shared in material no loner exists)

    (iii)Also, after calculating the annual/daily volatility of a particular stock EQ/ index, request you to kindly share the link from where I can crosscheck my daily/annual volatility findings.

  385. Sandeep says:

    Dear Karthik sir
    How can we use the concept of volatility smile while trading? Kindly explain with an example.

  386. Varun says:

    Hello Karthik,

    Nice mathematical approach, able to follow it very well.
    However, I did not understand what is the meaning of “Return” when you are defining daily returns.
    Secondly, how is Daily Average calculated ??
    Third, how is Daily Return different from Daily Average to Daily Range?? Can you add or explain this as well.

    Thanks
    Varun

    • Karthik Rangappa says:

      Daily return is the % change in stock prices, Varun. I’ve shared the example of calculating the daily return in the chapter itself.

  387. Sandeep says:

    Dear Karthik sir
    In case of Weekly expiry series, from which day Theta starts playing out more?

  388. ABHAY SHAH says:

    The above calculation was very productive. I have one query. in the calculation of Annual Volatility, time is taken as 252 , it should have been 242. Correct me if I am wrong; I have taken 242 as time because these many are the total number of days.
    Totally baffled because of this 252 vs 242.
    Thank you.

  389. pavan says:

    As volatility is nothing but standard deviation,so to get range we should subtract and add from mean of daily returns .but we r not doing here y so?please answer me

  390. Sathish says:

    I saw your video where you said that you can forecast volatility by comparing historical volatility and implied volatility. Currently NIFTY daily historical volatility is 0.72. ATM IV is 8.7 from Sensibull. So should the comparison be between 8.7% and 0.72% ? I’m not sure whether this comparison is right, since ATM IV is always significantly high compared to Daily historical average or is the implied volatility figure I assumed wrong?

    • Karthik Rangappa says:

      That wont be right Sathish. The comparison works as a quick and dirty method. In this case, you are better off considering the ATM IV.

  391. Rishu says:

    How to download historical data now? The Nse site has changed too much.

    • Karthik Rangappa says:

      Rishu, only the links have changed, but both exchanges still provide the end-of-day historical data on their sites. Do check once.

  392. Ahmad says:

    hello sir I tried To apply =STEDEV(C3:C248) this formula in exel but I am getting error it says formula contain Unrecognized text

    and Exel file is also no downloading
    I clicked multiple time to download it but nothing happened

    • Karthik Rangappa says:

      Not sure about the error, you will have to debug this by following the cues on excel itself.

      About downloading, I’d request you try and download from another browser.

  393. Anush S says:

    Hi Sir, Can you explain what is the format of time we need to include in the formula ?

  394. ABHIJIT says:

    MY QUESTION IS WHEN CALCULATING ANNUAL VOLATILATY, WE NEEED TO MULTIPLY SQUARE ROOT OF TIME WITH DAILY VOLATILATY. HERE THE TIME VALUE HAS BEEN CONSIDERED AS 252.

    FROM WHERE THIS TIME VALUE 252 CAME? PLEASE CLARIFY

    • Karthik Rangappa says:

      Becuase volatility and time are proportional by the factor of time. Time in case of trading is 252 days after adjusting for weekends.

  395. Gaurav J Shirgaonkar says:

    Thank you so much for all your efforts Karthik.
    Also, I can see you have responded on almost every comment which is very appreciating.

    My question here is that I tried the same steps which you have mentioned for Wipro stock just for trial.
    However the date range is from 15th Jan 2023 to 15th Jan 2024 (One year).

    My figures are not matching with the NSE website.
    I am getting 1.26% as daily volatility and 19.68% as annual volatility.

    On the website daily volatility is shown as 1.45% and annual volatility is 27.70%.

    Can you please help?

    • Karthik Rangappa says:

      Thanks Gaurav. Yes, the difference exists becuase NSE looks at the ‘recency’ of data and gives weight age to recent price movements. Their interest in calculating volatility if from margin collection perspective. Where as in our method, we are paying attention to the variance from average returns i.e. volatility. Hence the difference.

  396. Abhinav says:

    252 ?

Post a comment