[Highfrequency-commits] r46 - pkg/highfrequency/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 19 12:11:33 CEST 2013


Author: kboudt
Date: 2013-08-19 12:11:33 +0200 (Mon, 19 Aug 2013)
New Revision: 46

Added:
   pkg/highfrequency/man/AJjumptest.Rd
   pkg/highfrequency/man/BNSjumptest.Rd
   pkg/highfrequency/man/JOjumptest.Rd
   pkg/highfrequency/man/MRC.Rd
   pkg/highfrequency/man/RKurt.Rd
   pkg/highfrequency/man/RQPVar.Rd
   pkg/highfrequency/man/RQuar.Rd
   pkg/highfrequency/man/RSkew.Rd
   pkg/highfrequency/man/RTPVar.Rd
   pkg/highfrequency/man/RsV.Rd
   pkg/highfrequency/man/highfrequencyGSOC-package.Rd
   pkg/highfrequency/man/ivInference.Rd
   pkg/highfrequency/man/medRQ.Rd
   pkg/highfrequency/man/minRQ.Rd
   pkg/highfrequency/man/rBeta.Rd
   pkg/highfrequency/man/rMPV.Rd
Log:


Added: pkg/highfrequency/man/AJjumptest.Rd
===================================================================
--- pkg/highfrequency/man/AJjumptest.Rd	                        (rev 0)
+++ pkg/highfrequency/man/AJjumptest.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,106 @@
+\name{AJjumptest}
+\alias{AJjumptest}
+\title{
+Ait- Sahalia and Jacod (2009) tests for the presence of jumps in the price series. 
+}
+\description{
+ 
+This test examines the presence of jumps in highfrequency price series. It is based on the theory of Ait-Sahalia and Jacod (2009) (AJ). It consists in comparing the multipower variation of equispaced returns computed at a fast time scale (\eqn{h}), \eqn{r_{t,i}} (\eqn{i=1, \ldots,N}) and those computed at the slower time scale (\eqn{kh}), \eqn{y_{t,i}}(\eqn{i=1, \ldots ,\mbox{N/k}}).
+
+They found that the limit (for \eqn{N} \eqn{\to} \eqn{\infty} ) of the realized power variation is invariant for different sampling scales and that their ratio is \eqn{1} in case of jumps and \eqn{\mbox{k}^{p/2}-1} if no jumps.
+Therefore the AJ test detects the presence of jump using the ratio of realized power variation sampled from two scales. The null hypothesis is no jumps.
+
+Function returns three outcomes: 1.z-test value 2.critical value under confidence level of \eqn{95\%} and 3.p-value.  
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+And there is \eqn{N/k} equispaced returns in period \eqn{t}. Let \eqn{y_{t,i}} be a return (with \eqn{i=1, \ldots ,\mbox{N/k}}) in period \eqn{t}.
+
+Then the AJjumptest is given by: 
+\deqn{
+\mbox{AJjumptest}_{t,N}= \frac{S_t(p,k,h)-k^{p/2-1}}{\sqrt{V_{t,N}}}
+}
+
+in which, 
+
+\deqn{
+\mbox{S}_t(p,k,h)= \frac{PV_{t,M}(p,kh)}{PV_{t,M}(p,h)}
+}
+
+\deqn{
+\mbox{PV}_{t,N}(p,kh)= \sum_{i=1}^{N/k}{|y_{t,i}|^p}
+}
+
+\deqn{
+\mbox{PV}_{t,N}(p,h)= \sum_{i=1}^{N}{|r_{t,i}|^p}
+}
+
+\deqn{
+\mbox{V}_{t,N}= \frac{N(p,k) A_{t,N(2p)}}{N A_{t,N(p)}}
+}
+
+\deqn{
+\mbox{N}(p,k)= \left(\frac{1}{\mu_p^2}\right)(k^{p-2}(1+k))\mu_{2p} + k^{p-2}(k-1) \mu_p^2 - 2k^{p/2-1}\mu_{k,p}
+}
+
+\deqn{
+\mbox{A}_{t,n(2p)}= \frac{(1/N)^{(1-p/2)}}{\mu_p} \sum_{i=1}^{N}{|r_{t,i}|^p} \ \ \mbox{for} \ \ |r_j|< \alpha(1/N)^w
+}
+
+\deqn{
+\mu_{k,p}=  E(|U|^p  |U+\sqrt{k-1}V|^p)
+} 
+
+\eqn{U, V}: independent standard normal random variables; \eqn{h=1/N}; \eqn{p, k, \alpha, w}: parameters. 
+
+}
+\usage{
+AJjumptest(pdata, p=4 , k=2, align.by= NULL, align.period = NULL, makeReturns= FALSE, ...)
+}
+
+\arguments{
+  \item{pdata}{a zoo/xts object containing all prices in period t for one asset.}
+  \item{p}{can be chosen among 2 or 3 or 4. The author suggests 4. 4 by default.}
+  \item{k}{can be chosen among 2 or 3 or 4. The author suggests 2. 2 by default.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+list
+}
+
+\details{
+The theoretical framework underlying jump test is that the logarithmic price process \eqn{X_t} belongs to the class of Brownian semimartingales, which can be written as:
+\deqn{
+\mbox{X}_{t}=  \int_{0}^{t} a_udu + \int_{0}^{t}\sigma_{u}dW_{u} + Z_t
+}
+where \eqn{a} is the drift term, \eqn{\sigma} denotes the spot volatility process, \eqn{W} is a standard Brownian motion and \eqn{Z} is a jump process defined by:
+\deqn{
+\mbox{Z}_{t}=  \sum_{j=1}^{N_t}k_j
+}
+where \eqn{k_j} are nonzero random variables. The counting process can be either finite or infinite for finite or infinite activity jumps.
+
+The Ait-Sahalia and Jacod test is that: Using the convergence properties of power variation and its dependence on the time scale on which it is measured, Ait-Sahalia and Jacod (2009) define a new variable which converges to 1 in the presence of jumps in the underlying return series, or to another deterministic and known number in the absence of jumps. (Theodosiou& Zikes(2009))
+}
+
+\references{
+Ait-Sahalia, Y. and Jacod, J. (2009). Testing for jumps in a discretely observed process. The Annals of Statistics, 37(1), 184- 222.
+
+Theodosiou, M., & Zikes, F. (2009). A comprehensive comparison of alternative tests for jumps in asset prices. Unpublished manuscript, Graduate School of Business, Imperial College London.
+}
+
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+AJjumptest(sample_tdata$PRICE, p= 2, k= 3, align.by= "seconds", align.period= 5, makeReturns= TRUE)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ AJjumptest }

Added: pkg/highfrequency/man/BNSjumptest.Rd
===================================================================
--- pkg/highfrequency/man/BNSjumptest.Rd	                        (rev 0)
+++ pkg/highfrequency/man/BNSjumptest.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,86 @@
+\name{BNSjumptest}
+\alias{BNSjumptest}
+\title{
+Barndorff- Nielsen and Shephard (2006) tests for the presence of jumps in the price series.
+}
+\description{
+ 
+This test examines the presence of jumps in highfrequency price series. It is based on theory of Barndorff- Nielsen and Shephard (BNS). The null hypothesis is no jumps. 
+Depending on users' choices of estimator (integrated variance (IVestimator), integrated quarticity (IQestimator)), mechanism (linear, ratio) and adjustment (logarith), the function returns the result.
+Function returns three outcomes: 1.z-test value 2.critical value(with confidence level of 95\%) and 3.pvalue of the test. 
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. 
+
+Assume the Realized variance (RV), IVestimator and IQestimator are based on \eqn{N} equispaced returns. 
+
+Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}. 
+
+Then the BNSjumptest is given by: 
+\deqn{
+\mbox{BNSjumptest}= \frac{RV - IVestimator}{\sqrt{(\theta-2)\frac{1}{N} {IQestimator}}}
+}
+in which, \eqn{IVestimator} can be: bipower variance (BV), minRV, medRV. 
+\eqn{IQestimator} can be: tripower quarticity (TP), quadpower quarticity (QP), minRQ, medRQ.
+
+\eqn{\theta}: depends on IVestimator. 
+(Huang and Tauchen (2005))
+}
+\usage{
+BNSjumptest(rdata, IVestimator= "BV", IQestimator= "TP", type= "linear", logtransform= FALSE, 
+            max= FALSE, align.by= NULL, align.period= NULL, makeReturns = FALSE, startV= NULL,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{IVestimator}{can be chosen among jump robust integrated variance estimators: BV, minRV, medRV and corrected threshold bipower variation (CTBV). BV by default.}
+  \item{IQestimator}{can be chosen among jump robust integrated quarticity estimators: TP, QP, minRQ and medRQ. TP by default.}
+  \item{type}{a method of BNS testing: can be linear or ratio. Linear by default.}
+  \item{logtransform}{boolean, should be TRUE when QVestimator and IVestimator are in logarith form. FALSE by default.}
+  \item{max}{boolean, should be TRUE when max adjustment in SE. FALSE by default.}  
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours" }
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by default.} 
+  \item{startV}{start point of auxiliary estimators in threshold estimation (Corsi et al. (2010). NULL by default.}
+  \item{...}{additional arguments.}
+}
+
+\value{
+list
+}
+
+\details{
+The theoretical framework underlying jump test is that the logarithmic price process \eqn{X_t} belongs to the class of Brownian semimartingales, which can be written as:
+\deqn{
+\mbox{X}_{t}=  \int_{0}^{t} a_udu + \int_{0}^{t}\sigma_{u}dW_{u} + Z_t
+}
+where \eqn{a} is the drift term, \eqn{\sigma} denotes the spot volatility process, \eqn{W} is a standard Brownian motion and \eqn{Z} is a jump process defined by:
+\deqn{
+\mbox{Z}_{t}=  \sum_{j=1}^{N_t}k_j
+}
+where \eqn{k_j} are nonzero random variables. The counting process can be either finite or infinite for finite or infinite activity jumps.
+
+Since the realized volatility converges to the sum of integrated variance and jump variation, while the robust IVestimator converges to the integrated variance,  it follows that the difference between \eqn{RV_{t,N}} and the IVestimator captures the jump part only, and this observation underlines the BNS test for jumps. (Theodosiou& Zikes(2009))
+}
+
+\references{
+Barndorff-Nielsen, O. E., & Shephard, N. (2006). Econometrics of testing for jumps in financial economics using bipower variation. Journal of financial Econometrics, 4(1), 1-30. 
+
+Corsi, F., Pirino, D., & Reno, R. (2010). Threshold bipower variation and the impact of jumps on volatility forecasting. Journal of Econometrics, 159(2), 276-288.
+
+Huang, X., & Tauchen, G. (2005). The relative contribution of jumps to total price variance. Journal of financial econometrics, 3(4), 456-499.
+
+Theodosiou, M., & Zikes, F. (2009). A comprehensive comparison of alternative tests for jumps in asset prices. Unpublished manuscript, Graduate School of Business, Imperial College London.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+BNSjumptest(sample_tdata$PRICE, QVestimator= "RV", IVestimator= "minRV", 
+            IQestimator = "medRQ", type= "linear", makeReturns = TRUE)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ BNSjumptest }

Added: pkg/highfrequency/man/JOjumptest.Rd
===================================================================
--- pkg/highfrequency/man/JOjumptest.Rd	                        (rev 0)
+++ pkg/highfrequency/man/JOjumptest.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,86 @@
+\name{JOjumptest}
+\alias{JOjumptest}
+\title{
+Jiang and Oomen (2008) tests for the presence of jumps in the price series.
+}
+\description{
+ 
+This test examines the jump in highfrequency data. It is based on theory of Jiang and Oomen (JO). They found that the difference of simple return and logarithmic return can capture one half of integrated variance if there is no jump in the underlying sample path. The null hypothesis is no jumps.
+
+Function returns three outcomes: 1.z-test value 2.critical value under confidence level of \eqn{95\%} and 3.p-value.  
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}.
+
+Let \eqn{r_{t,i}} be a logarithmic return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Let \eqn{R_{t,i}} be a simple return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then the JOjumptest is given by: 
+\deqn{
+\mbox{JOjumptest}_{t,N}= \frac{N BV_{t}}{\sqrt{\Omega_{SwV}} \left(1-\frac{RV_{t}}{SwV_{t}} \right)}
+}
+in which, 
+\eqn{BV}: bipower variance;
+\eqn{RV}: realized variance (defined by Andersen et al. (2012));
+\deqn{
+  \mbox{SwV}_{t}=2 \sum_{i=1}^{N}(R_{t,i}-r_{t,i})
+}
+\deqn{
+  \Omega_{SwV}= \frac{\mu_6}{9} \frac{{N^3}{\mu_{6/p}^{-p}}}{N-p-1} \sum_{i=0}^{N-p}\prod_{k=1}^{p}|r_{t,i+k}|^{6/p}
+} 
+\deqn{
+  \mu_{p}= \mbox{E}[|\mbox{U}|^{p}] = 2^{p/2} \frac{\Gamma(1/2(p+1))}{\Gamma(1/2)}
+  % \mbox{E}[|\mbox{U}|^p]=
+}
+%\eqn{ \mbox{E}[|\mbox{U}|]^{\mbox{p}}}
+  \eqn{U}: independent standard normal random variables
+  
+  p: parameter (power).
+}
+\usage{
+JOjumptest(pdata, power=4,...)
+}
+
+\arguments{
+  \item{pdata}{a zoo/xts object containing all prices in period t for one asset.}
+  \item{power}{can be chosen among 4 or 6. 4 by default.}
+  \item{...}{additional arguments.}
+}
+
+\value{
+list
+}
+
+\details{
+The theoretical framework underlying jump test is that the logarithmic price process \eqn{X_t} belongs to the class of Brownian semimartingales, which can be written as:
+\deqn{
+\mbox{X}_{t}=  \int_{0}^{t} a_udu + \int_{0}^{t}\sigma_{u}dW_{u} + Z_t
+}
+where \eqn{a} is the drift term, \eqn{\sigma} denotes the spot volatility process, \eqn{W} is a standard Brownian motion and \eqn{Z} is a jump process defined by:
+\deqn{
+\mbox{Z}_{t}=  \sum_{j=1}^{N_t}k_j
+}
+where \eqn{k_j} are nonzero random variables. The counting process can be either finite or infinite for finite or infinite activity jumps.
+
+The Jiang and Oomen test is that: in the absence of jumps, the accumulated difference between the simple return and the log return captures one half of the integrated variance.(Theodosiou& Zikes(2009))
+}
+
+\references{
+Andersen, T. G., D. Dobrev, and E. Schaumburg (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169(1), 75- 93.
+
+Jiang, J.G. and Oomen R.C.A (2008). Testing for jumps when asset prices are observed with noise- a "swap variance" approach. Journal of Econometrics,144(2), 352-370.
+
+Theodosiou, M., & Zikes, F. (2009). A comprehensive comparison of alternative tests for jumps in asset prices. Unpublished manuscript, Graduate School of Business, Imperial College London.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_5minprices_jumps)
+JOjumptest(sample_5minprices_jumps[,1], power= 6)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ JOjumptest }

Added: pkg/highfrequency/man/MRC.Rd
===================================================================
--- pkg/highfrequency/man/MRC.Rd	                        (rev 0)
+++ pkg/highfrequency/man/MRC.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,88 @@
+\name{MRC}
+\alias{MRC}
+\title{
+Modulated Realized Covariance (MRC): Return univariate or multivariate preaveraged estimator.  
+}
+\description{
+Function returns univariate or multivariate preaveraged estimator, as difined in Hautsch & Podolskij (2013). 
+
+}
+
+}
+
+\usage{
+MRC= function(pdata, pairwise=FALSE,makePsd= FALSE,...)
+}
+
+\arguments{
+  \item{pdata}{a list. Each list-item contains an xts object with the intraday price data of a stock.}
+  \item{pairwise}{boolean, should be TRUE when refresh times are based on pairs of assets. FALSE by  default.}
+  \item{makePsd}{boolean, in case it is TRUE, the positive definite version of MRC is returned. FALSE by default.}
+  \item{...}{additional arguments.}
+}
+
+\value{
+an \eqn{d x d} matrix
+}
+
+\details{
+In practice, market microstructure noise leads to a departure from the pure semimartingale model. We consider the process \eqn{Y} in period \eqn{\tau}: 
+\deqn{
+\mbox{Y}_{\tau} = X_{\tau} + \epsilon_{\tau}
+}
+where, the observed \eqn{d} dimensional log-prices are the sum of underlying Brownian semimartingale process \eqn{X} and a noise term \eqn{\epsilon_{\tau}}. 
+
+\eqn{\epsilon_{\tau}} is an i.i.d process with \eqn{X}. 
+
+It is intuitive that under mean zero i.i.d. microstructure noise some form of smoothing of the observed log-price should tend to diminish the impact of the noise. Effectively, we are going to approximate a continuous function by an average of observations of Y in a neighborhood, the noise being averaged away. 
+
+Assume there is \eqn{N} equispaced returns in period \eqn{\tau} of a list (after refeshing data). Let \eqn{r_{\tau_i}} be a return (with \eqn{i=1, \ldots,N}) of an asset in period \eqn{\tau}. Assume there is \eqn{d} assets. 
+
+In order to define the univariate pre-averaging estimator, we first define the pre-averaged returns as
+\deqn{
+\bar{r}_{\tau_j}^{(k)}= \sum_{h=1}^{k_N-1}g\left(\frac{h}{k_N}\right)r_{\tau_{j+h}}^{(k)}
+}
+where g is a non-zero real-valued function \eqn{g:[0,1]} \eqn{\rightarrow} \eqn{R} given by \eqn{g(x)} = \eqn{\min(x,1-x)}. \eqn{k_N} is a sequence of integers satisfying  \eqn{\mbox{k}_{N} = \lfloor\theta N^{1/2}\rfloor}. We use \eqn{\theta = 0.8} as recommendations in (Hautsch & Podolskij (2013)). The pre-averaged returns are simply a weighted average over the returns in a local window. This averaging diminishes the influence of the noise. The order of the window size \eqn{k_n} is chosen to lead to optimal convergence rates. The pre-averaging estimator is then simply the analogue of the Realized Variance but based on pre-averaged returns and an additional term to remove bias due to noise
+\deqn{
+\hat{C}= \frac{N^{-1/2}}{\theta \psi_2}\sum_{i=0}^{N-k_N+1}  (\bar{r}_{\tau_i})^2-\frac{\psi_1^{k_N}N^{-1}}{2\theta^2\psi_2^{k_N}}\sum_{i=0}^{N}r_{\tau_i}^2
+}
+with
+\deqn{
+\psi_1^{k_N}= k_N \sum_{j=1}^{k_N}\left(g\left(\frac{j+1}{k_N}\right)-g\left(\frac{j}{k_N}\right)\right)^2,\quad 
+}
+\deqn{
+\psi_2^{k_N}= \frac{1}{k_N}\sum_{j=1}^{k_N-1}g^2\left(\frac{j}{k_N}\right).
+}
+\deqn{
+\psi_2= \frac{1}{12}
+}
+The multivariate counterpart is very similar. The estimator is called the Modulated Realized Covariance (MRC) and is defined as
+\deqn{
+\mbox{MRC}= \frac{N}{N-k_N+2}\frac{1}{\psi_2k_N}\sum_{i=0}^{N-k_N+1}\bar{\boldsymbol{r}}_{\tau_i}\cdot \bar{\boldsymbol{r}}'_{\tau_i} -\frac{\psi_1^{k_N}}{\theta^2\psi_2^{k_N}}\hat{\Psi}
+}
+where \eqn{\hat{\Psi}_N = \frac{1}{2N}\sum_{i=1}^N \boldsymbol{r}_{\tau_i}(\boldsymbol{r}_{\tau_i})'}. It is a bias correction to make it consistent. However, due to this correction, the estimator is not ensured PSD. An alternative is to slightly enlarge the bandwidth such that \eqn{\mbox{k}_{N} = \lfloor\theta N^{1/2+\delta}\rfloor}. \eqn{\delta = 0.1} results in a consistent estimate without the bias correction and a PSD estimate, in which case:
+\deqn{
+ \mbox{MRC}^{\delta}= \frac{N}{N-k_N+2}\frac{1}{\psi_2k_N}\sum_{i=0}^{N-k_N+1}\bar{\boldsymbol{r}}_i\cdot \bar{\boldsymbol{r}}'_i
+}
+
+}
+
+\references{
+Hautsch, N., & Podolskij, M. (2013). Preaveraging-Based Estimation of Quadratic Variation in the Presence of Noise and Jumps: Theory, Implementation, and Empirical Evidence. Journal of Business & Economic Statistics, 31(2), 165-183.
+
+}
+
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_5minprices_jumps)
+a= list (sample_5minprices_jumps["2010-01-04",1], 
+         sample_5minprices_jumps["2010-01-04",2] )
+MRC(a, pairwise=TRUE,makePsd=TRUE)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ preaveraging }

Added: pkg/highfrequency/man/RKurt.Rd
===================================================================
--- pkg/highfrequency/man/RKurt.Rd	                        (rev 0)
+++ pkg/highfrequency/man/RKurt.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,49 @@
+\name{rKurt}
+\alias{rKurt}
+\title{
+Realized kurtosis of highfrequency return series. 
+}
+\description{
+ 
+Function returns Realized kurtosis, defined in Amaya et al. (2011).
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then, the rKurt is given by
+\deqn{
+\mbox{rKurt}_{t}= \frac{N \sum_{i=1}^{N}(r_{t,i})^4}{RV_{t}^2} 
+}
+in which
+\eqn{RV_t:} realized variance
+}
+
+\usage{
+rKurt (rdata,align.by=NULL,align.period=NULL,makeReturns=FALSE,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by   default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+numeric
+}
+\references{
+Amaya, D., Christoffersen, P., Jacobs, K. and Vasquez, A. (2011). Do realized skewness and kurtosis predict the cross-section of equity returns?. CREATES research paper. p. 3-7.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+rKurt(sample_tdata$PRICE,align.by ="minutes", align.period =5, makeReturns = TRUE)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ rKurt }

Added: pkg/highfrequency/man/RQPVar.Rd
===================================================================
--- pkg/highfrequency/man/RQPVar.Rd	                        (rev 0)
+++ pkg/highfrequency/man/RQPVar.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,47 @@
+\name{rQPVar}
+\alias{rQPVar}
+\title{
+Realized quadpower variation of highfrequency return series. 
+}
+\description{
+ 
+Function returns the rQPVar, defined in Andersen et al. (2012).
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then, the rQPVar is given by
+\deqn{
+\mbox{rQPVar}_{t}=\frac{N}{N-3} \frac{\pi^2}{4} \sum_{i=4}^{N} \mbox(|r_{t,i}| |r_{t,i-1}| |r_{t,i-2}| |r_{t,i-3}|)
+}
+}
+\usage{
+rQPVar (rdata, align.by=NULL, align.period=NULL, makeReturns=FALSE,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by   default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+numeric
+}
+\references{
+Andersen, T. G., D. Dobrev, and E. Schaumburg (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169(1), 75- 93.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+rQPVar(rdata= sample_tdata$PRICE, align.by= "minutes", align.period =5, makeReturns= TRUE)
+rQPVar
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ rQPVar}

Added: pkg/highfrequency/man/RQuar.Rd
===================================================================
--- pkg/highfrequency/man/RQuar.Rd	                        (rev 0)
+++ pkg/highfrequency/man/RQuar.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,47 @@
+\name{rQuar}
+\alias{rQuar}
+\title{
+Realized quarticity of highfrequency return series. 
+}
+\description{
+ 
+Function returns the rQuar, defined in Andersen et al. (2012).
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then, the rQuar is given by
+\deqn{
+\mbox{rQuar}_{t}=\frac{N}{3} \sum_{i=1}^{N} \mbox(r_{t,i}^4)
+}
+}
+\usage{
+rQuar (rdata, align.by=NULL, align.period=NULL, makeReturns=FALSE,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by   default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+numeric
+}
+\references{
+Andersen, T. G., D. Dobrev, and E. Schaumburg (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169(1), 75- 93.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+rQuar(rdata= sample_tdata$PRICE, align.by= "minutes", align.period =5, makeReturns= TRUE)
+rQuar
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ rQuar}

Added: pkg/highfrequency/man/RSkew.Rd
===================================================================
--- pkg/highfrequency/man/RSkew.Rd	                        (rev 0)
+++ pkg/highfrequency/man/RSkew.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,50 @@
+\name{rSkew}
+\alias{rSkew}
+\title{
+Realized skewness of highfrequency return series.
+}
+\description{
+ 
+Function returns Realized skewness, defined in Amaya et al. (2011).
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then, the rSkew is given by
+\deqn{
+\mbox{rSkew}_{t}= \frac{\sqrt{N} \sum_{i=1}^{N}(r_{t,i})^3}{RV_{t}^{3/2}} 
+}
+
+in which
+\eqn{RV_{t}:} realized variance
+}
+
+\usage{
+rSkew (rdata,align.by=NULL,align.period=NULL,makeReturns=FALSE,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by   default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+numeric
+}
+\references{
+Amaya, D., Christoffersen, P., Jacobs, K. and Vasquez, A. (2011). Do realized skewness and kurtosis predict the cross-section of equity returns?. CREATES research paper. p. 3-7.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+rSkew(sample_tdata$PRICE,align.by ="minutes", align.period =5, makeReturns = TRUE)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ rSkew }

Added: pkg/highfrequency/man/RTPVar.Rd
===================================================================
--- pkg/highfrequency/man/RTPVar.Rd	                        (rev 0)
+++ pkg/highfrequency/man/RTPVar.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,47 @@
+\name{rTPVar}
+\alias{rTPVar}
+\title{
+Realized tripower variation of highfrequency return series.
+}
+\description{
+ 
+Function returns the rTPVar, defined in Andersen et al. (2012).
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then, the rTPVar is given by
+\deqn{
+\mbox{rTPVar}_{t}=\frac{N}{N-2} \frac{\Gamma^2 \left(1/2\right)}{4 \Gamma^2 \left(7/6\right)} \sum_{i=3}^{N} \mbox({|r_{t,i}|}^{4/3} {|r_{t,i-1}|}^{4/3} {|r_{t,i-2}|}^{4/3})
+}
+}
+\usage{
+rTPVar (rdata, align.by=NULL, align.period=NULL, makeReturns=FALSE,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by   default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+numeric
+}
+\references{
+Andersen, T. G., D. Dobrev, and E. Schaumburg (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169(1), 75- 93.
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+rTPVar(rdata= sample_tdata$PRICE, align.by= "minutes", align.period =5, makeReturns= TRUE)
+rTPVar
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ rTPVar}

Added: pkg/highfrequency/man/RsV.Rd
===================================================================
--- pkg/highfrequency/man/RsV.Rd	                        (rev 0)
+++ pkg/highfrequency/man/RsV.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,51 @@
+\name{rSV}
+\alias{rSV}
+\title{
+Realized semivariance of highfrequency return series. 
+}
+\description{
+ 
+Function returns Realized semivariance, defined in Barndorff-Nielsen et al. (2008).
+
+Function returns two outcomes: 1.Downside realized semivariance and 2.Upside realized semivariance.
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}. Let \eqn{r_{t,i}} be a return (with \eqn{i=1, \ldots,N}) in period \eqn{t}.
+
+Then, the rSV is given by
+\deqn{
+\mbox{rSVdownside}_{t}= \sum_{i=1}^{N} (r_{t,i})^2  \ \times \ I [ r_{t,i} <0 ]
+}
+\deqn{
+\mbox{rSVupside}_{t}= \sum_{i=1}^{N} (r_{t,i})^2 \ \times \ I [ r_{t,i} >0 ]
+}
+}
+\usage{
+rSV (rdata,align.by=NULL,align.period=NULL,makeReturns=FALSE,...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by   default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+list
+}
+\references{
+Barndorff- Nielsen, O.E., Kinnebrock, S. and Shephard N. (2008). Measuring downside risk- realized semivariance. CREATES research paper. p. 3-5
+}
+\author{
+Giang Nguyen, Jonathan Cornelissen and Kris Boudt
+}
+
+\examples{
+data(sample_tdata)
+rSV(sample_tdata$PRICE,align.by ="minutes", align.period =5, makeReturns = TRUE)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ highfrequency }
+\keyword{ rSV }

Added: pkg/highfrequency/man/highfrequencyGSOC-package.Rd
===================================================================
--- pkg/highfrequency/man/highfrequencyGSOC-package.Rd	                        (rev 0)
+++ pkg/highfrequency/man/highfrequencyGSOC-package.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,36 @@
+\name{highfrequencyGSOC-package}
+\alias{highfrequencyGSOC-package}
+\alias{highfrequencyGSOC}
+\docType{package}
+\title{
+Additional functionality for the highfrequency package
+}
+\description{
+Additional functionality for the highfrequency package: jump test, standard error
+}
+\details{
+\tabular{ll}{
+Package: \tab highfrequencyGSOC\cr
+Type: \tab Package\cr
+Version: \tab 1.0\cr
+Date: \tab 2013-07-02\cr
+License: \tab GPL\cr
+}
+~~ An overview of how to use the package, including the most important functions ~~
+}
+\author{
+Giang Nguyen, Kris Boudt, Jonathan Cornelissen
+
+Maintainer: Giang Nguyen <hagiang3108 at gmail.com>
+~~ The author and/or maintainer of the package ~~
+}
+\references{
+
+}
+~~ Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory ~~
+\keyword{ package }
+\seealso{
+}
+\examples{
+
+}

Added: pkg/highfrequency/man/ivInference.Rd
===================================================================
--- pkg/highfrequency/man/ivInference.Rd	                        (rev 0)
+++ pkg/highfrequency/man/ivInference.Rd	2013-08-19 10:11:33 UTC (rev 46)
@@ -0,0 +1,82 @@
+\name{ivInference}
+\alias{ivInference}
+\title{
+Function returns the value, the standard error and the confidence band of the integrated variance (IV) estimator. 
+}
+\description{
+ 
+This function supplies information about standard error and confidence band of integrated variance (IV) estimators under Brownian semimartingales model such as: bipower variation, minRV, medRV.  
+Depending on users' choices of estimator (integrated variance (IVestimator), integrated quarticity (IQestimator)) and confidence level, the function returns the result.(Barndorff (2002))
+Function returns three outcomes: 1.value of IV estimator 2.standard error of IV estimator and 3.confidence band of IV estimator. 
+
+Assume there is \eqn{N} equispaced returns in period \eqn{t}.
+
+Then the ivInference is given by: 
+\deqn{
+\mbox{standard error}= \frac{1}{\sqrt{N}} *sd
+}
+\deqn{
+\mbox{confidence band}= \hat{IV} \pm cv*se
+}
+in which,
+\deqn{
+\mbox{sd}= \sqrt{\theta \times \hat{IQ}} 
+}
+
+\eqn{cv:} critical value. 
+
+\eqn{se:} standard error.
+
+\eqn{\theta:} depending on IQestimator, \eqn{\theta} can take different value (Andersen et al. (2012)). 
+
+\eqn{\hat{IQ}} integrated quarticity estimator.
+}
+
+\usage{
+ivInference (rdata, IVestimator="RV", IQestimator="rQuar", confidence=0.95, 
+            align.by= NULL, align.period = NULL, makeReturns = FALSE, ...)
+}
+
+\arguments{
+  \item{rdata}{a zoo/xts object containing all returns in period t for one asset.}
+  \item{IVestimator}{can be chosen among integrated variance estimators: RV, BV, minRV or medRV. RV by default.}
+  \item{IQestimator}{can be chosen among integrated quarticity estimators: rQuar, TP, QP, minRQ or medRQ. rQuar by default.}
+  \item{confidence}{confidence level set by users. 0.95 by default. }
+  \item{align.by}{a string, align the tick data to "seconds"|"minutes"|"hours"}
+  \item{align.period}{an integer, align the tick data to this many [seconds|minutes|hours].}  
+  \item{makeReturns}{boolean, should be TRUE when rdata contains prices instead of returns. FALSE by  default.} 
+  \item{...}{additional arguments.}
+}
+
+\value{
+list
+}
+
+\details{
+The theoretical framework is the logarithmic price process \eqn{X_t} belongs to the class of Brownian semimartingales, which can be written as:
+\deqn{
+\mbox{X}_{t}=  \int_{0}^{t} a_udu + \int_{0}^{t}\sigma_{u}dW_{u}
+}
+where \eqn{a} is the drift term, \eqn{\sigma} denotes the spot volatility process, \eqn{W} is a standard Brownian motion (assume that there are no jumps). 
+
+}
+
+\references{
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/highfrequency -r 46


More information about the Highfrequency-commits mailing list