I am trying to model an ARMAX model with both seasonal dummies and a sinusoidal function (see attachment). I currently have the following:
"p c x1 x2 x3 x4 x5 @trend sin(@trend*@acos(-1)/365) ar(1) ar(7) ar(14) ma(1)". where x are the indicator functions.
However now I am still missing the alpha8 from the model (see attachment) and I don't really know how to model this.
I cannot add another constant c and adding just a 'dummy' variable equal to 1 does not give the required result since Eviews will only estimate sin(@trend*@acos(-1)/365) as 1 variable, i.e. only alpha7. Does anyone know how I can get alpha8? I assume this should not be a very difficult problem to solve but I just can't figure out how I should do this.
Thanks!
ARMAX model - Sinusoidal function
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
ARMAX model - Sinusoidal function
- Attachments
-
- Price.PNG (5.76 KiB) Viewed 13716 times
-
- EViews Developer
- Posts: 2671
- Joined: Wed Oct 15, 2008 9:17 am
Re: ARMAX model - Sinusoidal function
I just saw this for the first time (it's not really in the right forum group).
You can't do this by list. You have to specify your regression by expression, as in
p = c(1) + c(2)*x1 + ...
The relevant part you'll want is an expression with the coefficient defined explicitly, as in
c(8)*sin((@trend+c(9))*@acos(-1)/365)
This should be part of your expression equation.
You can't do this by list. You have to specify your regression by expression, as in
p = c(1) + c(2)*x1 + ...
The relevant part you'll want is an expression with the coefficient defined explicitly, as in
c(8)*sin((@trend+c(9))*@acos(-1)/365)
This should be part of your expression equation.
Re: ARMAX model - Sinusoidal function
Thanks a lot! This should solve the problem. However how would I now correctly specify the MA term?
-
- EViews Developer
- Posts: 2671
- Joined: Wed Oct 15, 2008 9:17 am
Re: ARMAX model - Sinusoidal function
Hadn't thought about the MA. I was just looking at the image of the conditional mean. Unfortunately, MA terms aren't allowed in equations specified by expression. So you're not going to be able to do the full specification using the equation. Sorry to get your hopes up.
The only thing you can do is to build the spec in a state space model. I'd go into the autospec, make the MA of the form that you want, then edit the spec to use your variables and restrictions.
The only thing you can do is to build the spec in a state space model. I'd go into the autospec, make the MA of the form that you want, then edit the spec to use your variables and restrictions.
Re: ARMAX model - Sinusoidal function
I'm sorry I don't really understand your state space solution. Could you explain this in more detail?
Thanks!
Thanks!
-
- EViews Developer
- Posts: 2671
- Joined: Wed Oct 15, 2008 9:17 am
Re: ARMAX model - Sinusoidal function
The state space object lets you estimate linear structural dynamic models that follow a particular form. ARMAX is one of the models that falls into this framework. The advantage of the state space object is that you can modify the specification to fit your particular needs; the downside is that you need to understand how the model syntax works. The manual describes the state space object in some detail. In addition, there is a tool in the state space object for constructing models of various forms. You can use that tool to construct a general specification for the state space object, and then modify it to fit your needs.
Re: ARMAX model - Sinusoidal function
I actually need this model as the conditional mean equation for a GARCH model, i.e. ARMAX-GARCH. I assume that this will become very difficult using state space models for the conditional mean?
-
- EViews Developer
- Posts: 2671
- Joined: Wed Oct 15, 2008 9:17 am
Re: ARMAX model - Sinusoidal function
It'll be difficult to do the GARCH part along with the MA in EViews, It's possible, but I can't think of an easy way to do it without you crafting your own optimization using either the LOGL object or the optimize command. There's nothing built-in that does the full set of what you want to do.
Re: ARMAX model - Sinusoidal function
I think that the sinusoidal function that you showed can be expressed as:
A1*Cos(2pit/365)+B1*Sin(2pit/365)
Where Alpha_7=(A1^2+B1^2)^(1/2) and Alpha_8=tan^-1(-B1/A1), which are the amplitude and the phase shift in radians. Therefore, you can perfom the estimation by list as:
In this way you can include MA tems and model the heteroskedasticity.
A1*Cos(2pit/365)+B1*Sin(2pit/365)
Where Alpha_7=(A1^2+B1^2)^(1/2) and Alpha_8=tan^-1(-B1/A1), which are the amplitude and the phase shift in radians. Therefore, you can perfom the estimation by list as:
Code: Select all
@cos(2*@acos(-1)*@trend/365) @sin(2*@acos(-1)*@trend/365)
In this way you can include MA tems and model the heteroskedasticity.
Who is online
Users browsing this forum: No registered users and 32 guests