Hi there,
I would like to compute correlations using exponential smoothing so that the most recent observations have more weight.
More specifically, if the expected value using equal weights p1,p2,...pk for a random variable X can be calculated as:
E(X) = p_1*x_1 + p_2*x_2 + ... + p_k*x_k
I would like to give different weights to each observation so that I would calculated the expected value as:
E(X) = a*x_t + a(1-a)*x_t-1 + a(1-a)(1-a)*x_t-2 ... + a(1-a)...(1-a)*x_t-k
The last weight is a*[(1-a) to the k]
I intend to calculate the correlations recursively where the sample used keeps increasing as time goes by.
What would be the best way to accomplish this in Eviews 7.2 ?
I tought to create a series where each observation is a weight value (a, a(1-a), a(1-a) to the 2, ...) and multiple the variables I want to calculate the correlations by this series beforehand. Would this be a good approach?
Thanks for any sugestions,
Mara
correlations using exponential smoothing
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
maragloria
- Posts: 105
- Joined: Tue Jun 29, 2010 7:09 am
Re: correlations using exponential smoothing
I just realized that my approach will not work because the corr function of eviews would calculate the classical mean of my transformed variables (so basically, I am calculating the mean twice, once with different weights and once with equal weights). So, I am looking forward to suggetstions 
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: correlations using exponential smoothing
EViews can compute weighted covariances where you specify the weights. If your covariance has a mean, it will compute the moments using the deviations from the weighted means. It looks like you'll have to be careful lining up the weights with the appropriate observations for each relevant sample, but it should be possible to do so.
-
maragloria
- Posts: 105
- Joined: Tue Jun 29, 2010 7:09 am
Re: correlations using exponential smoothing
I realize that on the window "Covariance Analysis" there is a session "Options" where I can set "weighting" but I don't know how to use. There are 6 options: none, frequency, var, st. dev, scaled var, scaled st. dev. Which one should I use? p.401 of the User's guide don't make this clear to me.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: correlations using exponential smoothing
Depends on how you want your weighted mean and variance computed...
Who is online
Users browsing this forum: No registered users and 1 guest
