(no subject)
by Diego Fernández
Hi dear gretel users,
I need to work with Markov Switching Models with time varying probabilities
so as to predict a variable. Is possible to work in gretl?
I have a program in Eviews language but it has only two states and I would
like to work with three or more.
Thanks
--
Diego Fernández
Magister en Economía
Facultad Ciencias Económicas
Montevideo Uruguay
10 years
ML Estimation/Estimate Behavior
by Daniel Bencik
Dear forum,
in "Chaing, Wang (2013): Volatility contagion: A range-based volatility approach" the authors specify a 'new' model for volatility forecasting. Simply put,
eps ~ logNormal(-0.5*sigma^2, sigma^2)
volatility[t] = lambda[t] * eps[t]
lambda[t] = c + a*volatility[t-1] + b*lambda[t-1]
I try to estimate the (1,1) specification of the model with
<hansl>
scalar c_ = 0.1
scalar rng = 0.1
scalar err = 0.2
scalar sigma = 0.36
mle ll = -0.5*ln(2 * pi) - 0.5 * ln( sigma ^ 2 ) - ln(sqrtPark) - 0.5 * ( (( ln(sqrtPark) - ln(lambda) - sigma^2/2)^2 ) / sigma ^ 2 )
series lambda = mean(sqrtPark)
series lambda = c_ + rng * sqrtPark(-1) + err * lambda(-1)
params sigma c_ rng err
end mle --robust
</hansl>
Estimation results are the following and everything seems all right
Model 6: ML, using observations 2007-12-11:2013-06-17 (T = 1440)
ll = -0.5*ln(2 * pi) - 0.5 * ln( sigma ^ 2 ) - ln(sqrtPark) - 0.5 * ( (( ln(sqrtPark) - ln(lambda) - sigma^2/2)^2 ) / sigma ^ 2 )
Standard errors based on Hessian
estimate std. error z p-value
-----------------------------------------------------------------------------------------
sigma 0.360439 0.00671545 53.67 0.0000 ***
c_ 7.26934e-05 2.98068e-05 2.439 0.0147 **
rng 0.0930949 0.0121914 7.636 2.24e-014 ***
err 0.881256 0.0163204 54.00 0.0000 ***
Log-likelihood 6803.599 Akaike criterion −13599.20
Schwarz criterion −13578.11 Hannan-Quinn −13591.32
However, when I produce in-sample fits, this model's fit is "biased". A comparison of in-sample fits of a similar model (with eps[t] being exponentially distributed) can be found at https://dl.dropboxusercontent.com/u/84870456/gretl.png . The blue line is simply "way below" the green one. The green one is nearly the same in-sample fit as the one from a HAR model (i.e. the green line is a verified good fit).The red line is the target variable. To solve the riddle I estimated this model in Julia and got completely opposite results. Julia gets different estimates and the resulting in-sample fit is "way above" what it should be. A comparison of in-sample fits from julia can befound at https://dl.dropboxusercontent.com/u/84870456/julie.JPG . My question would thus be whether you have any idea why this model behaves so wierdly. Specifications with exponentially or weibull distributed eps[t] run and fit just fine in both softwares.Any hint is much appreciated, Daniel
10 years, 1 month
no chart
by Wingenroth, Thorsten
Hi,
could anybody tell me why none of these time series can be plotted as a chart?
I double-click on a series, then I use the icon for chart.
Thanks and kind regards,
Thorsten
Prof. Dr. Thorsten Wingenroth
Professor für Lehraufgaben BWL-Bank
Fakultät Wirtschaft | Studienzentrum Finanzwirtschaft (Center of Finance)
Duale Hochschule Baden-Württemberg Stuttgart
Baden-Wuerttemberg Cooperative State University Stuttgart
Herdweg 18 | 70174 Stuttgart
Fon +49 711 1849-766
thorsten.wingenroth(a)dhbw-stuttgart.de<mailto:thorsten.wingenroth@dhbw-stuttgart.de> | http://www.dhbw-stuttgart.de/bank
Master in Business Management - Banking & Finance
http://www.dhbw.de/master-finance
10 years, 1 month
VAR Model estimation
by alexkakashi@libero.it
Hi,I have a question about the VAR models. I have two annual time series from 1880 to 2011. I set the range of the sample from 1882 to 1970. Then a VAR(2) model is estimated, but in the OLS estimates are considered 89 observations (from 1882 to 1970) and not the observation from 1884 to 1970.How can I solve this problem?
Best regards.Alessandro Attanasio
10 years, 1 month
on nested loops
by Artur Bala
The script below stops at "loop: i = 2" with the message "Out of memory"
but I hardly can point out why!!!
Best,
Artur
*loop i=1..3*
* smpl zone=i --restrict --replace*
* loop 1000 --progressive --quiet*
* do some sorting*
* do some estimation*
* do some printing*
* endloop*
*endloop*
10 years, 1 month
helps error prediction in SARIMA model, I find the command - ajuda previsao de erro no modelo SARIMA, não encontro o comando
by Marluci Wildner
Hello, I can not find the command in gretl program for the prediction error
in a SARIMA model, our teacher did not found and pointed us to send an
e-mail to gretl to know where the command. Rodo and every model is correct,
however I can not find the option to see the error of the forecast.
Thank you!
Olá, não consigo encontrar o comando no programa gretl para o erro de
previsão em um modelo SARIMA, nosso professor também não encontrou e nos
indicou a mandar um e-mail ao gretl para saber onde está o comando. Rodo
todo modelo e fica correto, porem não consigo achar a opção para ver o
erro da previsão.
Muito obrigada!
Atenciosamente,
*MARLUCI Casalini Wildner*
Discente do PPGE&D - UFSM
10 years, 1 month
bootstrap IRF -ps
by Stefano Fachin
sorry, I forgot one last point: it would be nice to be able to print the
bootstrap quantiles, as it can be now done with the IRFs
thanks,
Stefano
10 years, 1 month
bootstrap inference on IRFs
by Stefano Fachin
Hello, a couple of points on bootstrap confidence intervals on VAR
impulse response functions:
1. in the manual of the cvs 1.10.0 (december, 12) the documentation
appears as "to be done". Given that these procedures are not
standard (there are different ways to do them) I think that in the
meanwhile some references should be included. Then the user can go
and look it up by himself, as well as quoting the references
properly in his work (btw: among many, one of the things about gretl
that I find amazing is the quality of the documentation, something
often boring and time-consuming to produce-thanks folks!)
2. I assume the confidence intervals are computed according to the most
common approach, that is pointwise. If that is the case, the "shaded
area" option, although graphically somehow nicer, should
supplemented with a stern warning: seeing an "area" may easily
reinforce the common misperception of such intervals as providing a
confidence _band_ for the entire trajectory.
bye,
Stefano
--
_________________________________________________________________________
Stefano Fachin
Professore Ordinario di Statistica Economica
Dip. di Scienze Statistiche
Università di Roma "La Sapienza"
P.le A. Moro 5 - 00185 Roma - Italia
Tel. +39-06-49910834
fax +39-06-49910072
web http://stefanofachin.site.uniroma1.it/
10 years, 1 month
How to retrieve a list's element name
by Henrique Andrade
Dear Gretl Community,
I need to retrieve a name of a specific element from a list and use it as a
string. I tried the following commands:
<hansl code>
open australia.gdt
list L = PAU PUS E
string S = varname(varnum(L[2]))
</hansl code>
Best,
Henrique Andrade
10 years, 1 month
Index loop exits when mle does not converge
by Alecos Papadopoulos
I have to evaluate the finite-sample performance of the ML estimator in
the estimation of a 3-parameter distribution, based on simulated samples.
The "progressive loop" environment which is set for Monte Carlo studies
does not seem to support the mle command. I ended up using the index
loop which supports the mle command, while writing the coefficient
vector obtained in each loop that is grabbed by $coeff, to successive
rows of a pre-defined zero matrix. So far so good.
The problem is the following: the distribution appears difficult to
estimate in small samples and rather often the convergence criterion for
the mle is not met (I don't mind that, this is part of the evaluation of
the performance of the MLE). But when this happens, /the loop stops.
/The total number of runs of the loop will possibly require some hours
to run. If the loop stops every time the mle does not converge, I will
have to be constantly overseeing the process for the duration, in order
to re-ignite the loop. It would be very convenient if the loop could
continue irrespective of whether the mle in a particular loop fails to
converge.
Is there a way to tell Gretl not to stop the loop, even if the mle
fails, to write the container matrix with NANs, and to proceed to the
next run;
Thank you.
--
Alecos Papadopoulos
Athens University of Economics and Business, Greece
Department of Economics
cell:+30-6945-378680
fax: +30-210-8259763
skype:alecos.papadopoulos
10 years, 1 month