Module 5 Options Theory for Professional Trading

Chapter 16

Volatility Calculation (Historical)

265

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://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 = 365
  • Annual Volatility = 1.47% * SQRT (365)
  • = 28.08%

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

Image 6_AV

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

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 (365)

= 1.34%

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 option 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

Product Links

icici commodity trading ongc share price intraday hdfc net babnking cesc share price today federal bank nri account most volatile stocks nse nse stock charts hexaware technologies share price today roe financial ratio stock index india fibonacci stock charts ongc money control crisil ltd share price

265 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 scheiss-leben, 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.

    • Karthik Rangappa says:

      No Vasanth – nothing like that happens. Index is like a car which can go at a speed dependent of the accelerating capacity of the driver….similarly the index derives its values which is dependent on the underlying stocks. No one can manipulate this. Suggest you read this chapter – /varsity/chapter/the-stock-markets-index/

  15. Abhijit Haware says:

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

  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://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://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.

  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

  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

    • Karthik Rangappa says:

      1) Yes, volatility is one of the prime driver of option premium….especially on results day.

      2) Again, it is because of volatility. In fact, when you bought the option, the premiums were probably inflated (again thanks to volatility)

      3) Check the case study here, you will appreciate it as its executed on Infy (aroud results time) – /varsity/chapter/case-studies-wrapping-it-all-up/, section 23.5.

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

    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 scheiss-leben 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 scheiss-leben 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?

Product Links

icici commodity trading ongc share price intraday hdfc net babnking cesc share price today federal bank nri account most volatile stocks nse nse stock charts hexaware technologies share price today roe financial ratio stock index india fibonacci stock charts ongc money control crisil ltd share price