+ Reply to Thread
Results 1 to 8 of 8

calculate exponentially weighted moving average (EWMA) in one cell without separate column

  1. #1
    Registered User
    Join Date
    12-26-2013
    Location
    Switzerland
    MS-Off Ver
    Excel 2013
    Posts
    26

    calculate exponentially weighted moving average (EWMA) in one cell without separate column

    i already calculuated the EWMA (exponentially weighted moving average) in excel calculate EWMA (Exponentially weighted moving average).xlsx (G2523 in the excel file, the EWMA is red marked) for the last day.

    i need to calculate the EWMA for all historical dates... (G2522, G2521 etc.) that i don't need to generate 100 new columns (for column J, K & L), i'm looking for a way to generate G2523, G2522 etc. with a single formula in one cell?

    for those who don't know EWMA here's a little explanation: https://www.youtube.com/watch?v=P_tr9_Ue220

    thank you very much for your help.

    Excel File EWMA:
    calculate EWMA (Exponentially weighted moving average).xlsx

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,124

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

    I'm not a financial analyst, or ANYTHING like it, so I didn't watch the clip the whole way through. Four stoopid questions, though:

    Lambda featured in the clip, but you don't seem to be using it. Why?
    Why choose the square root of 250 (columns G & N), as opposed to any other number?
    Why does your date range for the EWMA cover 133 days (column L)? Why not 137 (random number) or 365 (a rolling year)?
    Why not just copy the formulae back up the columns? Doesn't that give you your result?

    Sorry if these Qs are dopey, I just don't understand EWMA yet!!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    12-26-2013
    Location
    Switzerland
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

    thank you for looking at the file. here the answers

    Lambda featured in the clip, but you don't seem to be using it. Why?
    Answer: Lambda is used, look at column J "weights"

    Why choose the square root of 250 (columns G & N), as opposed to any other number?
    Answer: M is the daily volatility, to calculate the year volatility the market has around 250 open days a year and not 365

    Why does your date range for the EWMA cover 133 days (column L)? Why not 137 (random number) or 365 (a rolling year)?
    Answer: because it doesn't matter, column L is only the weight average & it has to be 100 %.

    Why not just copy the formulae back up the columns? Doesn't that give you your result?
    Answer: well it's not that easy, i need a new colums M, N & O to calculate one new EWMA

    here's a new file i calculated the next EWMA with new columns, it may helps to understand. i don't wanna create 130 new columns to get the result...

    calculate EWMA (Exponentially weighted moving average) 1.01.xlsx





    Quote Originally Posted by Glenn Kennedy View Post
    I'm not a financial analyst, or ANYTHING like it, so I didn't watch the clip the whole way through. Four stoopid questions, though:

    Lambda featured in the clip, but you don't seem to be using it. Why?
    Why choose the square root of 250 (columns G & N), as opposed to any other number?
    Why does your date range for the EWMA cover 133 days (column L)? Why not 137 (random number) or 365 (a rolling year)?
    Why not just copy the formulae back up the columns? Doesn't that give you your result?

    Sorry if these Qs are dopey, I just don't understand EWMA yet!!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,124

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

    OK. I see the problem now. Dunno if I can help, but we'll see.

  5. #5
    Registered User
    Join Date
    12-26-2013
    Location
    Switzerland
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

    i think with formula =SUMPRODUCT((ROW(...)) ... its possible to solve it, but i'm not an expert in this, anyone an idea?

  6. #6
    Registered User
    Join Date
    12-26-2013
    Location
    Switzerland
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

    meanwhile i got the solution. put the follow formula into G2522

    =(SQRT(SUMPRODUCT(SMALL((1-R2)*R2^(ROW(2389:2522)-ROW(A2389));ROW(2389:2522)-ROW(A2389)+1);I2389:I2522)))*SQRT(250)

    cheers

  7. #7
    Registered User
    Join Date
    04-01-2017
    Location
    UK
    MS-Off Ver
    Mac 2011
    Posts
    4

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

    Could anyone assist me urgently please? I tried pasting the above formula into the spreadsheet posted above, but it doesn't seem to work.

    Is the formula correct? I am looking to modify the formula for my own needs but I need to make sure the above formula works first, which it doesn't seem to. The software refuses to accept it.

    Any help appreciated.

  8. #8
    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,945

    Re: calculate exponentially weighted moving average (EWMA) in one cell without separate co

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

Similar Threads

  1. Weighted Moving Average
    By steven723 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-10-2014, 09:50 PM
  2. Exponentially Weighted Moving Averages
    By controlfreak in forum Excel General
    Replies: 0
    Last Post: 01-09-2014, 12:12 PM
  3. [SOLVED] Calculate a weighted average in a single cell based on multiple criteria
    By _Bryan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2013, 04:38 PM
  4. Weighted moving average
    By Boom1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-01-2006, 05:30 PM
  5. [SOLVED] Re: Weighted moving average
    By Boom1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-01-2006, 03:55 PM

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