dgp.fgarch | R Documentation |
dgp.fgarch function generates functional curve data following the functional ARCH(1) or GARCH(1,1) process.
dgp.fgarch(grid_point, N, type, alpha_par = NULL, beta_par = NULL)
grid_point |
The number of grid point in each curve observation. |
N |
The sample size. |
type |
A string to switch data generating process between "arch" - functional ARCH and "garch" - functional GARCH. |
alpha_par |
The ARCH kernel coefficient function in the conditional volatility equation. If it is missing, " |
beta_par |
The GARCH kernel coefficient function in the conditional volatility equation. If it is missing, " |
If x_i(t)
follows an FARCH(1) process,
x_i(t)=\sigma_i(t)\varepsilon_i(t)
, t \in [0,1]
,
\sigma_i^2(t)=\omega(t)+\int \alpha(t,s) x^2_{i-1}(s)ds
.
If x_i(t)
follows an FGARCH(1,1) process,
x_i(t)=\sigma_i(t)\varepsilon_i(t)
, t \in [0,1]
,
\sigma_i^2(t)=\omega(t)+\int \alpha(t,s) x^2_{i-1}(s)ds+\int \beta(t,s) \sigma^2_{i-1}(s)ds
,
where the innovation \varepsilon_i(t)
follows an Ornstein–Uhlenbeck process dgp.fiid
, and the constant coefficient \omega(t)=0.1t(1-t)
.
List of generated processes:
garch_mat: FARCH/GARCH sequences, where the finite realization of curves are stored in columns;
sigma_mat: Conditional volatility sequences, where the finite realization of curves are stored in columns.
Hormann, S., Horvath, L., Reeder, R. (2013). A functional version of the ARCH model. Econometric Theory. 29(2), 267-288. <doi:10.1017/S0266466612000345>.
Aue, A., Horvath, L., F. Pellatt, D. (2017). Functional generalized autoregressive conditional heteroskedasticity. Journal of Time Series Analysis. 38(1), 3-21. <doi:10.1111/jtsa.12192>.
dgp.fiid
# generate discrete evaluations of 100 FARCH curves that each curve is realized on 50 grid points.
yd = dgp.fgarch(50, 100, "garch")
yd_garch = yd$garch_mat
# smooth discrete data into functional curves.
fd = fda::Data2fd(argvals=seq(0,1,len=50),y=yd_garch,fda::create.bspline.basis(nbasis=32))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.