1st error:
closing
}
on line 29
dangling
2nd error, line 10: "cac40" should be "CAC40"
3rd error, towards bottom:
Draw(5, (Hfor~forc[][1])’);
doesn't use ' symbol but a higher unicode character
Jurgen
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
oxoxoxox 15th OxMetrics user conference 2014
oxoxoxox Cass Business School London, 4-5 September
oxoxoxox 2014 Econometrics Summer School
oxoxoxox Aix-Marseille University, 6-13 July
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
Dr Jurgen A Doornik
James Martin Fellow, Institute for New Economic Thinking
at the Oxford Martin School, University of Oxford
http://www.doornik.com
http://www.oxmetrics.net
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
On 2014-09-29 21:44, Vries, J.J. de wrote:
> Yes, this is something different. From line 57 (nearly the end of the program) everything is treated as a syntax error. Usually that is caused by some small typo, but I do not spot it. Anyone?
>
> greetings,
> Jaap
> ________________________________________
> Van: Abdelrazzaq Alrababa'A [[log in to unmask]]
> Verzonden: maandag 29 september 2014 22:27
> Aan: Vries, J.J. de
> Onderwerp: Re: Ox reports errors: exit code= 1!!
>
> I don't think so.
>
> the code:
> #include <oxstd.h>
> #include <oxdraw.h>
> #import <packages/Garch/garch>
> main()
> {
> decl garchobj;
> garchobj = new Garch();
> //*** DATA ***//
> garchobj.Load("C:/ProgramFiles(x86)/OxMetrics7/ox/packages/Garch/data/cac40.xls");
> garchobj.Select(Y_VAR, {"cac40",0,0} );
> garchobj.SetSelSample(-1, 1, 800, 1);
> //*** SPECIFICATIONS ***//
> garchobj.DISTRI(0); // 0 for Gauss, 1 for Student, 2 for GED, 3 for Skewed-Student
> garchobj.ARMA_ORDERS(0,0); // AR order (p), MA order (q).
> garchobj.GARCH_ORDERS(1,1); // p order, q order
> garchobj.MODEL(1); // 0:RISKMETRICS 1:GARCH 2:EGARCH 3:GJR 4:APARCH 5:IGARCH
> // 6:FIGARCH_BBM 7:FIGARCH_CHUNG 8:FIEGARCH
> // 9:FIAPARCH_BBM 10: FIAPARCH_CHUNG 11: HYGARCH
> garchobj.MLE(1); // 0: MLE (Second derivatives), 1 : MLE (OPG Matrix), 2 : QMLE
> garchobj.Initialization(<>);
> garchobj.DoEstimation(<>);
> garchobj.Output();
> //************************************************************************************
> decl forc=<>,h,yfor=<>,shape=<>;
> decl number_of_forecasts=448; // number of h_step_ahead forecasts
> decl step=1; // specify h (h-step-ahead forecasts)
> decl T=garchobj.GetcT();
> println("!!! Please Wait while computing the forecasts !!!");
> }
> decl distri=garchobj.GetDistri();
> if (distri==1 || distri==2)
> shape=garchobj.GetValue("m_cV");
> else if (distri==3)
> shape=garchobj.GetValue("m_cA")|garchobj.GetValue("m_cV");
> for (h=0; h<number_of_forecasts; ++h)
> {
> garchobj.FORECAST(1,step,0);
> garchobj.SetSelSample(-1, 1, T+h, 1);
> garchobj.InitData();
> yfor|=garchobj.GetForcData(Y_VAR, step);
> forc|=garchobj.FORECASTING();
> }
> decl Hfor = garchobj.GetVar("REALVOLA")[801:]; // Realized volatility
> // decl Hfor = (yfor - meanc(yfor)).^2; // Squared returns (in deviation)
> decl cd=garchobj.CD(yfor-forc[][0],forc[][1],garchobj.GetDistri(),shape);
> println("Density Forecast Test on Standardized Forecast Errors");
> garchobj.APGT(cd,20|30,garchobj.GetValue("m_cPar"));
> garchobj.AUTO(cd, number_of_forecasts, -0.1, 0.1, 0);
> garchobj.confidence_limits_uniform(cd,30,0.95,1,4);
> DrawTitle(5, "Conditional variance forecast and realized volatility");
> Draw(5, (Hfor~forc[][1])’);
> ShowDrawWindow();
> garchobj.MZ(Hfor, forc[][1], number_of_forecasts);
> garchobj.FEM(forc, yfor~Hfor);
> savemat("MeanFor.xls",forc[][0]); // Saves the mean forecasts in an Excel file.
> savemat("VarFor.xls",forc[][1]); // Saves the variance forecasts in an Excel file.
> delete garchobj;
> }
>
> and now the new error:!!!!!!!
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): 'savemat' redefinition of argument count
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): ';' expected but found '<string>'
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): '<string>' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): ',' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): '[' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): '[' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): ']' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): '[' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): '<int>' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): ']' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): ')' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (57): ';' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (58): 'delete' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (58): ';' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (58): ';' out of place
> C:\Program Files (x86)\OxMetrics7\ox\packages\Garch\samples\Forecast.ox (59): '}' out of place
> Ox reports errors: exit code= 1!!
>
>
|