View source: R/NonparTrawlEstimation.R
rq | R Documentation |
This function computes the scaled realised quarticity of a time series for a given width of the observation grid.
rq(data, Delta)
data |
The data set used to compute the scaled realised quarticity |
Delta |
The width Delta of the observation grid |
According to Sauri and Veraart (2022), the scaled realised quarticity for X_0, X_{Δ_n}, …, X_{(n-1)Δ_n} is given by
RQ_n:=\frac{1}{√{2 nΔ_{n}}} ∑_{k=0}^{n-2}(X_{(k+1)Δ_n}-X_{kΔ_n})^4.
The function returns the scaled realised quarticity RQ_n.
##Simulate a trawl process ##Determine the sampling grid my_n <- 1000 my_delta <- 0.1 my_t <- my_n*my_delta ###Choose the model parameter #Exponential trawl function: my_lambda <- 2 #Poisson marginal distribution trawl my_v <- 1 #Set the seed set.seed(123) #Simulate the trawl process Poi_data<-ambit::sim_weighted_trawl(my_n, my_delta, "Exp", my_lambda, "Poi", my_v)$path #Compute the scaled realised quarticity rq(Poi_data, my_delta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.