+ Reply to Thread
Results 1 to 3 of 3

How to calculate the annual volatility of a stock with VBA?

  1. #1
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    How to calculate the annual volatility of a stock with VBA?

    Good afternoon.
    I would like to have a program where I select one ticker of a stock (ex: AAPL) and a period (from 01/01/2010 until 31/12/2019) and I obtain the annual volatility of this stock from 201O until 2019.
    Do you know how to do this?
    Thank you for your help.
    Have good day
    Attached Files Attached Files
    Last edited by Luu4466; 04-05-2021 at 05:49 AM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: How to calculate the annual volatility of a stock with VBA?

    Are you required to use VBA for this? What is your algorithm for computing annual volatility?

    A quick internet search found this tutorial (https://www.investopedia.com/ask/ans...lity-excel.asp ) that shows one way to calculate volatility in Excel that does not use VBA. Their formula seems simple enough that I see no reason to resort to VBA for this.

    It sounds like you have a long data base to pull from. I expect that Excel's pivot table (https://www.excel-easy.com/data-****...ot-tables.html ) and/or filter (https://www.wikihow.com/Use-AutoFilter-in-MS-Excel ) tools will be easier to use for extracting a subset of the raw data for this analysis. Power Pivot or Power Query would probably be better tools for filtering the data than VBA, though I am not familiar with these tools.

    Does that help, or are you required to use VBA to filter the data and calculate volatility?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Re: How to calculate the annual volatility of a stock with VBA?

    Thank you for you answer @MrShorty but I need to calculate the volatility of 120 stocks. I will upload the file tomorrow with the 37 stocks (the file is too big with 120 stocks)
    So I need a VBA to calculate with efficiency the volatility of each stock.
    Last edited by Luu4466; 04-01-2021 at 09:15 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 03-18-2015, 07:21 PM
  2. Replies: 1
    Last Post: 03-18-2015, 06:16 PM
  3. Replies: 3
    Last Post: 03-17-2015, 11:36 PM
  4. [SOLVED] calculate new volatility in excel
    By kmaloney01 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-11-2014, 05:50 AM
  5. Calculate Volatility ?
    By Simon-ch in forum Excel General
    Replies: 0
    Last Post: 11-18-2008, 06:28 AM
  6. [SOLVED] calculating the volatility of a stock
    By Richard M 2006 in forum Excel General
    Replies: 1
    Last Post: 05-09-2006, 05:00 PM
  7. Monthly Stock Return Volatility
    By frank in forum Excel General
    Replies: 6
    Last Post: 02-21-2006, 01:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1