intra.return: Intra-day Return Curves

Description Usage Arguments Details Value References Examples

View source: R/intraday_return.R

Description

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).

Usage

1

Arguments

yd

A (grid_point) x (number of observations) matrix drawn from N intra-day price curves.

Details

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).

Value

List of return data:

idr: the IDR.

cidr: the CIDR.

ocidr: the OCIDR.

References

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>.

Examples

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

yzhao7322/CurVol documentation built on Sept. 5, 2021, 8:41 p.m.