
Hi Yohan,

 

I would like to ask you about how to fix the problem which appears any time I execute the fGarch, fPortfolio, f...packages. 

 

For instance, when I call the fGarch library I have the following remarks:

 

>library(fGarch)
Loading required package: timeSeries
Error: package 'timeDate' 290.84 is loaded, but >= 290.85 is required by 'timeSeries'
> 


 

Secondly, when I was trying to run one of the example in R-ex, e.g., garchFit, I have the following:

 

> ### Name: garchFit
> ### Title: Univariate GARCH Time Series Fitting
> ### Aliases: garchFit garchKappa
> ### Keywords: models
> 
> ### ** Examples
>   
> ## UNIVARIATE TIME SERIES INPUT:
>    # In the univariate case the lhs formula has not to be specified ... 
>    
>    # A numeric Vector from default GARCH(1,1) - fix the seed:
>    N = 200
>    x.vec = as.vector(garchSim(garchSpec(rseed = 1985), n = N)[,1])
Error in as.vector(garchSim(garchSpec(rseed = 1985), n = N)[, 1]) : 
  could not find function "garchSim"
>    garchFit(~ garch(1,1), data = x.vec, trace = FALSE)
Error: could not find function "garchFit"
> 
>    # An univariate timeSeries object with dummy dates:
>    x.timeSeries = dummyDailySeries(matrix(x.vec), units = "GARCH11")
Error: could not find function "dummyDailySeries"
>    garchFit(~ garch(1,1), data = x.timeSeries, trace = FALSE)         
Error: could not find function "garchFit"
> 
> ## Not run: 
> ##D    # An univariate zoo object:
> ##D    x.zoo = zoo(as.vector(x.vec), order.by = as.Date(rownames(x.timeSeries)))
> ##D    garchFit(~ garch(1,1), data = x.zoo, trace = FALSE) 
> ## End(Not run)
> 
>    # An univariate "ts" object:
>    x.ts = as.ts(x.vec)
Error in as.ts(x.vec) : object "x.vec" not found
>    garchFit(~ garch(1,1), data = x.ts, trace = FALSE)
Error: could not find function "garchFit"
>     
> ## MULTIVARIATE TIME SERIES INPUT:
>    # For multivariate data inputs the lhs formula must be specified ...
>    
>    # A numeric matrix binded with dummy random normal variates:
>    X.mat = cbind(GARCH11 = x.vec, R = rnorm(N))
Error in cbind(GARCH11 = x.vec, R = rnorm(N)) : object "x.vec" not found
>    garchFit(GARCH11 ~ garch(1,1), data = X.mat)
Error: could not find function "garchFit"
>         
>    # A multivariate timeSeries object with dummy dates:
>    X.timeSeries = dummyDailySeries(X.mat, units = c("GARCH11", "R")) 
Error: could not find function "dummyDailySeries"
>    garchFit(GARCH11 ~ garch(1,1), data = X.timeSeries)
Error: could not find function "garchFit"
> 
> ## Not run: 
> ##D     
> ##D    # A multivariate zoo object:
> ##D    X.zoo = zoo(X.mat, order.by = as.Date(rownames(x.timeSeries)))
> ##D    garchFit(GARCH11 ~ garch(1,1), data = X.zoo)
> ## End(Not run)
> 
>    # A multivariate "mts" object:
>    X.mts = as.ts(X.mat)
Error in as.ts(X.mat) : object "X.mat" not found
>    garchFit(GARCH11 ~ garch(1,1), data = X.mts)
Error: could not find function "garchFit"
>  
> ## MODELING THE PERCENTUAL SPI/SBI SPREAD FROM LPP BENCHMARK:
>     
>    X.timeSeries = as.timeSeries(data(LPP2005REC))
Error: could not find function "as.timeSeries"
>    X.mat = as.matrix(x.timeSeries)
Error in as.matrix(x.timeSeries) : object "x.timeSeries" not found
>    ## Not run: X.zoo = zoo(X.mat, order.by = as.Date(rownames(X.mat)))
>    X.mts = ts(X.mat)
Error in inherits(x, "data.frame") : object "X.mat" not found
>    garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.timeSeries)
Error: could not find function "garchFit"
>    # The remaining are not yet supported ...
>    # garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.mat)
>    # garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.zoo)
>    # garchFit(100*(SPI - SBI) ~ garch(1,1), data = X.mts)
>     
> ## MODELING HIGH/LOW RETURN SPREADS FROM MSFT PRICE SERIES:
>     
>    X.timeSeries = as.timeSeries(msft.dat)
Error: could not find function "as.timeSeries"
>    garchFit(Open ~ garch(1,1), data = returns(X.timeSeries)) 
Error: could not find function "garchFit"
>    garchFit(100*(High-Low) ~ garch(1,1), data = returns(X.timeSeries)) 
Error: could not find function "garchFit"

 

 

Do you have any suggestions on how to fix the problems?

 

Thanks for the help.

 

Budhi


_________________________________________________________________
See all the ways you can stay connected to friends and family

	[[alternative HTML version deleted]]

