similar to: A mistake in garchFit()? {fGarch}

Displaying 20 results from an estimated 1000 matches similar to: "A mistake in garchFit()? {fGarch}"

2010 Aug 15
2
fGarch: how to use garchFit() in loop?
Dear expeRts, How can I specify the order p,q of a GARCH(p,q) model within a loop? Here's a minimal example showing that an "Formula and data units do not match"-error appears: library(fGarch) spec <- garchSpec(model = list(alpha = 0.1, beta = c(0.4, 0.4))) data <- garchSim(spec, n = 100) x <- list() for(q in 1:3){ print(q) x[q] <-
2008 Apr 01
1
garch prediction
Hello I want to predict the future values of time series with Garch When I specified my model like this: library(fGarch) ret <- diff(log(x))*100 fit = garchFit(~arma(1,0,0)+garch(1, 1), data =ret) predict(fit, n.ahead = 10) meanForecast meanError standardDeviation 1 0.01371299 0.03086350 0.03305819 2 0.01211893 0.03094519 0.03350248
2008 Aug 18
1
another GARCH problem
Hallo, i want to fit a GARCH model with a extern regressor (without arma components), so i found the following function in package fGarch. I tryed out a lot of things but usually I get this Error. > garchFit(formula=y~x, formula.var=~garch(1,1),data=w) Error in .garchFit(formula.mean, formula.var, series = x, init.rec, delta, : Algorithm only supported for mci Recursion I think i use the
2011 Sep 28
1
fGarch - Fitting and APARCH-Modell with fixed delta
Hi there, I'm trying to fit a GJR-GARCH Model using fGarch. I wanted to try that by fitting an APARCH model with a fixed delta of 2 and a non-fixed gamma. So I was simply trying to use: spec <- garchFit(~aparch(1,1),data=garchSim(),delta=2) coef(spec) And sometimes, it's working like a charm and delta is indeed exactly 2 in the resulting coefficient vector. Frequently, though, the
2011 Nov 06
0
fGarch: garchFit and include.shape/shape parameters
Hello, The function garchFit in the package fGarch allows for choosing a conditional distribution, one of which is the t-distribution. The function allows specification of the shape parameter of the distribution (equal to the degrees of freedom for the t-distribution), for which the default is set to 4. The function also includes an option "include.shape", which is "a logical flag
2009 Apr 29
1
arma model with garch errors
Dear R experts, I am trying to estimate an ARMA 2,2 model with garch errors. I used the following code on R 2.9. #library library(fGarch) #data data1<-ts(read.table("C:/Users/falcon/Desktop/Time Series/exports/goods1.csv"), start=c(1992,1), frequency=12) head(data1) #garch garchFit(formula.mean= ~arma(2,2),formula.var=~garch(1,1), data=data1) but get this error: >
2011 Mar 24
1
Problems with predict in fGarch
Hello. I am using fGarch to estimate the following model: Call: garchFit(formula = fmla, data = X[, i], trace = F) Mean and Variance Equation: data ~ arma(1, 1) + garch(1, 1) Conditional Distribution: norm Coefficient(s): mu ar1 ma1 omega alpha1 beta1 -0.94934 1.00000 -0.23211 54.06402 0.45709 0.61738 Std. Errors: based on Hessian Error Analysis:
2010 Jul 14
0
fGarch: garchFit() with fixed coefficents
hello everybody, I would like to fit a model to a times series (testing set) for out of sample predictions using garchFit(). I would like to keep the coefficients of ARMA/GARCH model fixed (as found by fitting the model to my training set). The arima fitting function has such an option for that (fixed=NULL) but the garchFit() doesnt. It is very important for me to keep the same coefficients
2009 Jun 30
1
garchFit in fGarch fitted values are all the same
Dear all- Package /fGarch/ version 2100.78 in R version 2.8.1 (2008-12-22) running on linux 2.6.22.9-91.fc7 In trying to fit garch models in above environment. I am getting "reasonable" fitted coefficients, but the fitObject@fitted are all the same. This is true even for the help page example: library(fGarch) R> X.timeSeries = as.timeSeries(msft.dat) R> head( +
2009 Jun 19
1
using garchFit() to fit ARMA+GARCH model with exogeneous variables
Hello - Here's what I'm trying to do. I want to fit a time series y with ARMA(1,1) + GARCH(1,1), there are also an exogeneous variable x which I wish to include, so the whole equation looks like: y_t - \phi y_{t-1} = \sigma_t \epsilon_t + \theta \sigma_{t-1} \epsilon_{t-1} + c x_t where \epsilon_t are i.i.d. random variables \sigma_t^2 = omega + \alpha \sigma_{t-1}^2 + \beta
2008 Mar 24
0
ARCH(1,0) with t-residuals
Dear R users, I need to estimate an ARCH(1,0) model with t-residuals. To do this I use garchFit function from fGarch library. However, I get the following error message: Error in.garchInitParameters (formula.mean = formula.mean, formula.var = formula.var, ): object "alpha" not found I tried to estimate this model with different series, but I always get this error message. For example,
2009 Apr 06
1
Problem with Extracting Fitted Values from fGarch package
Good day everyone, I fitted a GARCH model to a time series and R estimated the model and provide me with the estimates. However, when I tried to extract the fitted values from the estimated model I got the following error message: "Error in .local(object, ...) : object "fit" not found"   I used the following to extract the fitted values fitted_TASI <- fitted(garchFit(~
2008 Sep 12
1
Error in solve.default(Hessian) : system is computationally singular
Hello everyone, I'm trying to estimate the parameters of the returns series attached using the GARCH code below, but I get the following error message: Error in solve.default(Hessian) : system is computationally singular: reciprocal condition number = 0 Error in diag(solve(Hessian)) : error in evaluating the argument 'x' in selecting a method for function 'diag' Can
2008 Aug 18
1
ARMA(0,2) & GARCH(1,1) - code & hessian
Hello R-list-members, I'm trying to model ARMA(0,2) & GARCH(1,1) process using the code below, but according to my textbook, the estimated parameters are wrong. The MA-parameters should be negative. (I've got the same problem using garchFit()). Can anyone tell me what I'm doing wrong? And how can I calculate the hessian matrix? Many thanks, Desislava Kavrakova Code:
2011 May 04
1
fGarch
Hi, I am attempting to fit a ARMA/GARCH regression model without success. ### ARIMA-GARCH model with regressor ### ### Time series data: A multivariate data set. cov.ts.dq = cov.ts[1:4,"dq1"][!is.na(cov.ts[,"dq1"])] cov.ts.day = ts.intersect(dq = diff(q.ts), day = lag(q.ts, -1)) ### The following R scripts work: (summary(no.day.fitr <- garchFit(dq ~ arma(0,3) +
2008 Nov 04
1
AIC in time series
Hi everybody, I have fitted an ar(1),Garch(1,1) model to some observations with the help of the garchFit function which is in the fGarch package. Here what I've done: library("fGarch") fit = garchFit(formula=~ar(1)+~garch(1,1), data=garat) Now I want to count AIC for this model. How can I do it? I cannot do it with the AIC function of stats package, because R tells me: "Error
2010 Dec 07
1
Using nlminb for maximum likelihood estimation
I'm trying to estimate the parameters for GARCH(1,1) process. Here's my code: loglikelihood <-function(theta) { h=((r[1]-theta[1])^2) p=0 for (t in 2:length(r)) { h=c(h,theta[2]+theta[3]*((r[t-1]-theta[1])^2)+theta[4]*h[t-1]) p=c(p,dnorm(r[t],theta[1],sqrt(h[t]),log=TRUE)) } -sum(p) } Then I use nlminb to minimize the function loglikelihood: nlminb(
2012 Oct 11
1
a question
Dear R-helpers, I need to read some data from output of garchFit in fGarch. my model is garch(1,1) and i want to read coefficients(omega,alpha,beta) and timeseries(x) and conditional SD(s). because i need them to use in other formula. for example :omega+x[1]+s[3] and maybe i have several simulation then i need a general way to read them, not to read with my eyes for example the quantity of
2011 May 15
4
DCC-GARCH model
Hello, I have a few questions concerning the DCC-GARCH model and its programming in R. So here is what I want to do: I take quotes of two indices - S&P500 and DJ. And the aim is to estimate coefficients of the DCC-GARCH model for them. This is how I do it: library(tseries) p1 = get.hist.quote(instrument = "^gspc",start = "2005-01-07",end =
2010 Mar 17
1
accessing info in object slots from listed objects using loops
Hey, I have stacked a couple of garchFit objects in a list with names $fit1, $fit2, ..., $fiti assigning objects names using a loop, i.e. after running the loop modelStack = list($fit1, $fit2,...,$fiti). Thus the following apply; a = modelStack$fit2, then a is the second garchFit object of formal class 'fGarch' with 11 slots, @call, @formula... etc. I then want to extract information in