Description Usage Arguments Details Value References Examples
View source: R/intraday_return.R
intra.return function calculates three types of intra-day return curves: intra-day log return (IDR), cumulative intra-day log return (CIDR), and overnight cumulative intra-day log return (OCIDR).
1 | intra.return(yd)
|
yd |
A (grid_point) x (number of observations) matrix drawn from N intra-day price curves. |
Suppose that P_i(t) denotes the intra-day price curves, for 1≤q i ≤q N and t\in[0,1], we then have,
Intra-day log returns: x_i(t)=\log P_i(t) - \log P_i(t-Δ), where Δ is the frequency at intra-day grid points;
Cumulative intra-day log returns: X_i(t)=\log P_i(t) - \log P_i(0);
Overnight cumulative intra-day log returns: x_i(t)=\log P_i(t) - \log P_{i-1}(1).
List of return data:
idr: the IDR.
cidr: the CIDR.
ocidr: the OCIDR.
Gabrys, R., Horvath, L., Kokoszka, P. (2010). Tests for error correlation in the functional linear model. Journal of the American Statistical Association, 105(491), 1113-1125. <doi:10.1198/jasa.2010.tm09794>.
Rice, G., Wirjanto, T., Zhao, Y. (2020). Forecasting Value at Risk via Intra-Day Return Curves. International Journal of Forecasting. <doi:10.1016/j.ijforecast.2019.10.006>.
1 2 3 4 5 6 7 8 9 | # generate intra-day price curve data for the FGARCH process.
yd = dgp.fgarch(50, 100, "garch")
yd = yd$garch_mat
# calculate discrete data drawn from N intra-day return curves.
fcurve = intra.return(yd)
idr = fcurve$idr
cidr = fcurve$cidr
ocidr = fcurve$ocidr
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.