+ Reply to Thread
Results 1 to 5 of 5

Calculating Returns and Standard Deviation from a data sample of share prices.

  1. #1
    Registered User
    Join Date
    04-10-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Calculating Returns and Standard Deviation from a data sample of share prices.

    Hi Guys,

    I need some help urgently. From the Shares Data attached,I wanna calculate the following using VBA specifically:

    1.Daily Returns
    2.Daily Standard deviation of return of each share
    3.Variance- Covariance matrix of the daily returns.

    I hope you guys can help!

    Thanks a mil!
    Attached Files Attached Files

  2. #2
    Forum Contributor PingPing's Avatar
    Join Date
    02-19-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    158

    Re: Calculating Returns and Standard Deviation from a data sample of share prices.

    1. Log or Arithmetic?
    2. Call 'WorksheetFunction.Stdev' in your VBA code.
    3. Call 'WorksheetFunction.Covar' in your VBA code, for each pair of stocks.

  3. #3
    Registered User
    Join Date
    04-10-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Calculating Returns and Standard Deviation from a data sample of share prices.

    I'll try that.

    Thanks!

  4. #4
    Registered User
    Join Date
    06-11-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Calculating Returns and Standard Deviation from a data sample of share prices.

    hi, this request is exactly what i am trying to achieve.
    What is your orignal VBA code to add the above call functions to?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Calculating Returns and Standard Deviation from a data sample of share prices.

    LMoir, welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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