determinist model
determinist model
Hello,
First, excuse me for my english level.
My job consist in make forecast for fish meal price since 01/01/1980 to 05/01/2017.
I have to make a determinist model but i have a problem: When i do the Box Jenkins test, the Jaques Berra is 2300 whereas he should be under 5.99. I try to change the dummies and the ARMA but everytime the jaque berra is above 5.99.
Have you an idee of what i can change to have a better determinist model ?
Thank you for your help
First, excuse me for my english level.
My job consist in make forecast for fish meal price since 01/01/1980 to 05/01/2017.
I have to make a determinist model but i have a problem: When i do the Box Jenkins test, the Jaques Berra is 2300 whereas he should be under 5.99. I try to change the dummies and the ARMA but everytime the jaque berra is above 5.99.
Have you an idee of what i can change to have a better determinist model ?
Thank you for your help
- Attachments
-
- deterministe2.RPF
- (1.88 KiB) Downloaded 948 times
-
- Classeur1.xlsx
- (13.9 KiB) Downloaded 770 times
Re: determinist model
The J-B test is a test for normality. A Box-Jenkins model is designed to produce serially uncorrelated residuals (tested with the Q, not with J-B), but there is nothing about it that will eliminate non-normality in the residuals. In fact, there are almost no models which are designed to produce normally distributed residuals. (GARCH models attempt to do that to some extent, but a complicated model for the variance will have almost no effect on the forecasts for the price itself).
Focusing on a "deterministic" model is not really a good approach. To me, that data series looks like an ARIMA model on the log with one difference is probably as good as any model (just on the basis of the graph)---you would just need to figure out what the ARMA part should be. A quadratic trend is almost never a good model---just think about what a quadratic trend has to look like out of sample. Is there any reason to believe that you need seasonal dummies? I don't see any sign of a seasonal pattern.
Focusing on a "deterministic" model is not really a good approach. To me, that data series looks like an ARIMA model on the log with one difference is probably as good as any model (just on the basis of the graph)---you would just need to figure out what the ARMA part should be. A quadratic trend is almost never a good model---just think about what a quadratic trend has to look like out of sample. Is there any reason to believe that you need seasonal dummies? I don't see any sign of a seasonal pattern.
Re: determinist model
First, thank you for your answer.
In fact, I am doing a class work and we have to use a determinist model for begining and after, we have to use a stochastic model.
For the seasonal dummies, I totally agree but if I remove "seasons{0 to -11}" to the ligne "linreg LY debreg * res2", the forecast is much less accurate. So it's why I use them.
In fact, I am doing a class work and we have to use a determinist model for begining and after, we have to use a stochastic model.
For the seasonal dummies, I totally agree but if I remove "seasons{0 to -11}" to the ligne "linreg LY debreg * res2", the forecast is much less accurate. So it's why I use them.
Re: determinist model
First, note that a deterministic model (any deterministic model) on that data set will leave residuals with a great deal of serial correlation. The J-B test has a maintained assumption that the data are independent, so isn't even valid on the serially correlated data. Also, if you have a CONSTANT in a model, you don't want seasons{0 to -11} as that's a full set of dummies which will be collinear with the constant. Use seasons{0 to -10} instead.bmahe wrote:First, thank you for your answer.
In fact, I am doing a class work and we have to use a determinist model for begining and after, we have to use a stochastic model.
For the seasonal dummies, I totally agree but if I remove "seasons{0 to -11}" to the ligne "linreg LY debreg * res2", the forecast is much less accurate. So it's why I use them.
I'm not sure what you mean by the "forecast is much less accurate". There's nothing in this program that is actually looking at forecasts.
Re: determinist model
Hello,
Thanks for your help, we have solved our problem. So, we have make a exponential smoothing, a determinist model and a stochastic model.
The last part of our classwork consist in make a combination of models. We have make some tests and the best combination is when we combinate the determinist model and the stochastique model.
We are making the forecast for the stochastic model and we have a problem. Here, it is our code:
* avec le modele stochastique
*
set Y2 = Y
SET DUM201211 = T>=2012:11.AND.T<=2012:11
SET DUM200810 = T>=2008:10.AND.T<=2008:10
set foreoosh2l tend tend+hoos = exp(foreoosh2(1))
boxjenk(regressors,noconstant,ar=5,ma=3,diffs=1,sdiffs=0,define=eqsoc) Y2
# DUM200810 DUM201211
forecast(model=eqsoc,from=tend+1,to=tend+hoos,stderrs=stderrsh2,print)
graph(shading=forezone,header="Previsions hors échantillon avec IC",subheader="Prévisions du modèle stochastique") 2
# Y
# foreoosh2
And the error message:
Entry Y2
2017:06 NA
2017:07 NA
2017:08 NA
2017:09 NA
2017:10 NA
2017:11 NA
2017:12 NA
2018:01 NA
2018:02 NA
2018:03 NA
2018:04 NA
2018:05 NA
2018:06 NA
2018:07 NA
2018:08 NA
2018:09 NA
2018:10 NA
2018:11 NA
## SR14. Empty Range on Series FOREOOSH2.
Can you see where is our problem ?
Thank you for your answer
Thanks for your help, we have solved our problem. So, we have make a exponential smoothing, a determinist model and a stochastic model.
The last part of our classwork consist in make a combination of models. We have make some tests and the best combination is when we combinate the determinist model and the stochastique model.
We are making the forecast for the stochastic model and we have a problem. Here, it is our code:
* avec le modele stochastique
*
set Y2 = Y
SET DUM201211 = T>=2012:11.AND.T<=2012:11
SET DUM200810 = T>=2008:10.AND.T<=2008:10
set foreoosh2l tend tend+hoos = exp(foreoosh2(1))
boxjenk(regressors,noconstant,ar=5,ma=3,diffs=1,sdiffs=0,define=eqsoc) Y2
# DUM200810 DUM201211
forecast(model=eqsoc,from=tend+1,to=tend+hoos,stderrs=stderrsh2,print)
graph(shading=forezone,header="Previsions hors échantillon avec IC",subheader="Prévisions du modèle stochastique") 2
# Y
# foreoosh2
And the error message:
Entry Y2
2017:06 NA
2017:07 NA
2017:08 NA
2017:09 NA
2017:10 NA
2017:11 NA
2017:12 NA
2018:01 NA
2018:02 NA
2018:03 NA
2018:04 NA
2018:05 NA
2018:06 NA
2018:07 NA
2018:08 NA
2018:09 NA
2018:10 NA
2018:11 NA
## SR14. Empty Range on Series FOREOOSH2.
Can you see where is our problem ?
Thank you for your answer
Re: determinist model
You need to extend these out to the end of the forecast range
SET DUM201211 = T>=2012:11.AND.T<=2012:11
SET DUM200810 = T>=2008:10.AND.T<=2008:10
Since the end of the forecast range is tend+hoos, you would want
SET DUM201211 * tend+hoos = T>=2012:11.AND.T<=2012:11
SET DUM200810 * tend+hoos = T>=2008:10.AND.T<=2008:10
Note also that those can be simplified to
SET DUM201211 * tend+hoos = T==2012:11
SET DUM200810 * tend+hoos = T==2008:10
SET DUM201211 = T>=2012:11.AND.T<=2012:11
SET DUM200810 = T>=2008:10.AND.T<=2008:10
Since the end of the forecast range is tend+hoos, you would want
SET DUM201211 * tend+hoos = T>=2012:11.AND.T<=2012:11
SET DUM200810 * tend+hoos = T>=2008:10.AND.T<=2008:10
Note also that those can be simplified to
SET DUM201211 * tend+hoos = T==2012:11
SET DUM200810 * tend+hoos = T==2008:10
Re: determinist model
Thank you for your answer.
I will try monday and I I will tell you if it works.
I will try monday and I I will tell you if it works.
Re: determinist model
Dear Tom
after testing your codes, there is no more NA. But for foreoosh2 there is always a problem. Indeed, here are the code follow by the errors messages :
[set Y2 = Y
SET DUM201211 * tend+hoos = T>=2012:11.AND.T<=2012:11
SET DUM200810 * tend+hoos = T>=2008:10.AND.T<=2008:10
set foreoosh2 tend tend+hoos = exp(foreoosh2(1))
boxjenk(regressors,noconstant,ar=5,ma=3,diffs=1,sdiffs=0,define=eqsoc) Y2
# DUM200810 DUM201211
forecast(model=eqsoc,from=tend+1,to=tend+hoos,stderrs=stderrsh2,print)
graph(shading=forezone,header="Previsions hors échantillon avec IC",subheader="Prévisions du modèle stochastique") 2
# Y
# foreoosh2]
error message :
Entry Y2
2017:06 1095.552302
2017:07 1083.230966
2017:08 1064.488666
2017:09 1081.328091
2017:10 1080.712842
2017:11 1093.622221
2017:12 1080.444556
2018:01 1087.404915
2018:02 1077.456938
2018:03 1089.393987
2018:04 1080.386163
2018:05 1089.700992
2018:06 1078.559366
2018:07 1088.131395
2018:08 1078.656493
2018:09 1089.153590
2018:10 1079.376744
2018:11 1089.025614
## SR14. Empty Range on Series FOREOOSH2.
In advance, thank you for your answer
Best regards
after testing your codes, there is no more NA. But for foreoosh2 there is always a problem. Indeed, here are the code follow by the errors messages :
[set Y2 = Y
SET DUM201211 * tend+hoos = T>=2012:11.AND.T<=2012:11
SET DUM200810 * tend+hoos = T>=2008:10.AND.T<=2008:10
set foreoosh2 tend tend+hoos = exp(foreoosh2(1))
boxjenk(regressors,noconstant,ar=5,ma=3,diffs=1,sdiffs=0,define=eqsoc) Y2
# DUM200810 DUM201211
forecast(model=eqsoc,from=tend+1,to=tend+hoos,stderrs=stderrsh2,print)
graph(shading=forezone,header="Previsions hors échantillon avec IC",subheader="Prévisions du modèle stochastique") 2
# Y
# foreoosh2]
error message :
Entry Y2
2017:06 1095.552302
2017:07 1083.230966
2017:08 1064.488666
2017:09 1081.328091
2017:10 1080.712842
2017:11 1093.622221
2017:12 1080.444556
2018:01 1087.404915
2018:02 1077.456938
2018:03 1089.393987
2018:04 1080.386163
2018:05 1089.700992
2018:06 1078.559366
2018:07 1088.131395
2018:08 1078.656493
2018:09 1089.153590
2018:10 1079.376744
2018:11 1089.025614
## SR14. Empty Range on Series FOREOOSH2.
In advance, thank you for your answer
Best regards