[Blotter-commits] r325 - pkg/RTAQ/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 9 18:47:18 CEST 2010


Author: jonathan
Date: 2010-04-09 18:47:18 +0200 (Fri, 09 Apr 2010)
New Revision: 325

Added:
   pkg/RTAQ/man/MedRV.Rd
   pkg/RTAQ/man/MinRV.Rd
   pkg/RTAQ/man/RBPCov.Rd
   pkg/RTAQ/man/RBPVar.Rd
   pkg/RTAQ/man/RCor.Rd
   pkg/RTAQ/man/RCov.Rd
   pkg/RTAQ/man/ROWCov.Rd
   pkg/RTAQ/man/ROWVar.Rd
   pkg/RTAQ/man/agg_price.Rd
   pkg/RTAQ/man/agg_quotes.Rd
   pkg/RTAQ/man/agg_trades.Rd
   pkg/RTAQ/man/aggregatets.Rd
   pkg/RTAQ/man/thresholdcov.Rd
Modified:
   pkg/RTAQ/man/RV.Rd
Log:
help files: volatility and aggregation functions

Added: pkg/RTAQ/man/MedRV.Rd
===================================================================
--- pkg/RTAQ/man/MedRV.Rd	                        (rev 0)
+++ pkg/RTAQ/man/MedRV.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,42 @@
+\name{MedRV}
+\Rdversion{1.1}
+\alias{MedRV}
+\title{
+MedRV
+}
+\description{
+Function returns the MedRV, defined in Andersen et al. (2009).
+
+Let \eqn{r_{t,i}} be a return (with \eqn{i=1,\ldots,M}) in period \eqn{t}.
+
+Then, the MedRV is given by
+\deqn{
+\mbox{MedRV}_{t}=\frac{\pi}{6-4\sqrt{3}+\pi}\left(\frac{M}{M-2}\right) \sum_{i=2}^{M-1} \mbox{med}(|r_{t,i-1}|,|r_{t,i}|, |r_{t,i+1}|)^2
+}
+
+}
+
+\usage{
+MedRV(data)
+}
+
+\arguments{
+  \item{data}{ a zoo/xts object containing all returns in period t for one asset. }
+}
+
+\section{Details}{
+}
+
+\value{
+numeric
+}
+
+\references{
+Andersen, T. G., D. Dobrev, and E. Schaumburg (2009). Jump-robust volatility 
+estimation using nearest neighbor truncation. NBER Working Paper No.
+15533.}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/MinRV.Rd
===================================================================
--- pkg/RTAQ/man/MinRV.Rd	                        (rev 0)
+++ pkg/RTAQ/man/MinRV.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,42 @@
+\name{MinRV}
+\Rdversion{1.1}
+\alias{MinRV}
+\title{
+MinRV
+}
+\description{
+Function returns the MinRV, defined in Andersen et al. (2009).
+
+Let \eqn{r_{t,i}} be a return (with \eqn{i=1,\ldots,M}) in period \eqn{t}.
+
+Then, the MinRV is given by
+\deqn{
+\mbox{MinRV}_{t}=\frac{\pi}{\pi - 2}\left(\frac{M}{M-1}\right) \sum_{i=1}^{M-1} \mbox{min}(|r_{t,i}| ,|r_{t,i+1}|)^2
+}
+
+}
+
+\usage{
+MinRV(data)
+}
+
+\arguments{
+  \item{data}{ a zoo/xts object containing all returns in period t for one asset. }
+}
+
+\section{Details}{
+}
+
+\value{
+numeric
+}
+
+\references{
+Andersen, T. G., D. Dobrev, and E. Schaumburg (2009). Jump-robust volatility 
+estimation using nearest neighbor truncation. NBER Working Paper No.
+15533.}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/RBPCov.Rd
===================================================================
--- pkg/RTAQ/man/RBPCov.Rd	                        (rev 0)
+++ pkg/RTAQ/man/RBPCov.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,51 @@
+\name{RBPCov}
+\Rdversion{1.1}
+\alias{RBPCov}
+\title{
+Realized BiPower Covariance}
+
+\description{
+Function returns the Realized BiPower Covariance (RBPCov), 
+defined in Barndorff-Nielsen and Shephard (2004).
+
+Let \eqn{r_{t,i}} be an intraday \eqn{N x 1} return vector and \eqn{i=1,...,M} 
+the number of intraday returns.
+
+
+The RBPCov is defined as the process whose value at time \eqn{t}
+is the \eqn{N}-dimensional square matrix with \eqn{k,q}-th element equal to
+\deqn{
+\mbox{RBPCov}[k,q]_t = \frac{\pi}{8} \bigg( & \sum_{i=2}^{M} 
+\left|
+r_{(k)t,i} + r_{(q)t,i} \right| \ \left| r_{(k)t,i-1} + r_{(q)t,i-1} \right| &  \\
+&- \left| r_{(k)t,i}  - r_{(q)t,i} \right| \ \left|
+r_{(k)t,i-1} - r_{(q)t,i-1} \right|  \bigg),&
+}
+where \eqn{r_{(k)t,i}} is the
+\eqn{k}-th component of the return vector \eqn{r_{i,t}}.
+}
+
+\usage{
+RBPCov(data)
+}
+
+\arguments{
+  \item{data}{ a \eqn{(M x N)} matrix/zoo/xts object containing the \eqn{N}
+return series over period \eqn{t}, with \eqn{M} observations during \eqn{t}.}
+}
+
+\section{Details}{}
+
+\value{
+an \eqn{N x N} matrix
+}
+
+\references{
+Barndorff-Nielsen, O. and N. Shephard (2004). Measuring the impact of
+jumps in multivariate price processes using bipower covariation. Discussion
+paper, Nuffield College, Oxford University.}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/RBPVar.Rd
===================================================================
--- pkg/RTAQ/man/RBPVar.Rd	                        (rev 0)
+++ pkg/RTAQ/man/RBPVar.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,41 @@
+\name{RBPVar}
+\Rdversion{1.1}
+\alias{RBPVar}
+\title{
+Realized BiPower Variance
+}
+\description{
+Function returns the Realized BiPower Variance (RBPVar), defined in Barndorff-Nielsen and Shephard (2004).
+
+Let \eqn{r_{t,i}} be a return (with \eqn{i=1,\ldots,M}) in period \eqn{t}.
+
+Then, the RBPVar is given by
+\deqn{
+\mbox{RBPVar}_{t}= \frac{\pi}{2} \sum_{i=2}^{M} |r_{t,i}| |r_{t,i-1}|
+}
+
+}
+
+\usage{
+RBPVar(data)
+}
+
+\arguments{
+  \item{data}{ a vector/zoo/xts object containing all returns in period t for one asset. }
+}
+
+\section{Details}{
+}
+
+\value{
+numeric
+}
+
+\references{
+Barndorff-Nielsen, O. and N. Shephard (2004). Power and bipower variation with 
+stochastic volatility and jumps. Journal of Financial Econometrics 2 (1), 1-37.}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/RCor.Rd
===================================================================
--- pkg/RTAQ/man/RCor.Rd	                        (rev 0)
+++ pkg/RTAQ/man/RCor.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,42 @@
+\name{RCor}
+\Rdversion{1.1}
+\alias{RCor}
+\title{
+Realized Correlation}
+
+\description{
+Function returns the realized correlation matrix.
+
+Let \eqn{r_{t,i}} be an intraday \eqn{N x 1} return vector and \eqn{i=1,...,M}
+the number of intraday returns.
+
+Then, the \eqn{(k,q)}-th element of the 
+Realized correlation matrix over period \eqn{t} is defined as
+\deqn{
+\mbox{RCor}[k,q]_t = \frac{\sum_{i=1}^{n}r_{(k)t,i}*r_{(q)t,i}}{\sqrt{\sum_{i=1}^{n}r^2_{(k)t,i}\sum_{i=1}^{n}r^2_{(q)t,i}}}
+}
+where \eqn{r_{(k)t,i}} is the \eqn{k}-th component of the return vector \eqn{r_{t,i}} 
+and \eqn{n} the number of observations per day.
+}
+
+\usage{
+RCor(data)
+}
+
+\arguments{
+  \item{data}{ a \eqn{(M x N)} matrix/zoo/xts object containing the \eqn{N}
+return series over period \eqn{t}, with \eqn{M} observations during \eqn{t}.}
+}
+
+\section{Details}{}
+
+\value{
+an \eqn{N x N} matrix
+}
+
+\references{}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/RCov.Rd
===================================================================
--- pkg/RTAQ/man/RCov.Rd	                        (rev 0)
+++ pkg/RTAQ/man/RCov.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,42 @@
+\name{RCov}
+\Rdversion{1.1}
+\alias{RCov}
+\title{
+Realized Covariance
+}
+
+\description{
+Function returns the Realized Covariation (RCov).
+
+Let \eqn{r_{t,i}} be an intraday \eqn{N x 1} return vector and \eqn{i=1,...,M} 
+the number of intraday returns.
+
+Then, the RCov is given by
+\deqn{
+\mbox{RCov}_{t}=\sum_{i=1}^{M}r_{t,i}r'_{t,i}.
+}
+}
+
+\usage{
+RCov(data)
+}
+
+\arguments{
+  \item{data}{ a \eqn{(M x N)} matrix/zoo/xts object containing the \eqn{N}
+return series over period \eqn{t}, with \eqn{M} observations during \eqn{t}.}
+}
+
+\section{Details}{
+}
+
+\value{
+an \eqn{N x N} matrix
+}
+
+\references{
+}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/ROWCov.Rd
===================================================================
--- pkg/RTAQ/man/ROWCov.Rd	                        (rev 0)
+++ pkg/RTAQ/man/ROWCov.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,60 @@
+\name{ROWCov}
+\Rdversion{1.1}
+\alias{ROWCov}
+\title{
+Realized Outlyingness Weighted Covariance}
+
+\description{
+Function returns the Realized Outlyingness Weighted Covariance, defined in Boudt et al. (2008).
+
+Let \eqn{r_{t,i}}, for \eqn{i=1,...,M} be a sample
+of \eqn{M} high-frequency \eqn{(N x 1)} return vectors and \eqn{d_{t,i}}
+their outlyingness given by the squared Mahalanobis distance between
+the return vector and zero in terms of the reweighted MCD covariance
+estimate based on these returns.
+
+Then, the ROWCov is given by
+\deqn{
+\mbox{ROWCov}_{t}=c_{w}\frac{\sum_{i=1}^{M}w(d_{t,i})r_{t,i}r'_{t,i}}{\frac{1}{M}\sum_{i=1}^{M}w(d_{t,i})},
+}
+where \eqn{w(\cdot)} is a hard rejection weight function and \eqn{c_{w}} the corresponding 
+correction factor, assuming the returns follow a normal distribution, 
+as described in Boudt et al. (2008).
+}
+
+\usage{
+ROWCov(data, seasadjR = NULL, wfunction = "HR" , alphaMCD = 0.5, alpha = 0.001)
+}
+
+\arguments{
+  \item{data}{ a \eqn{(M x N)} matrix/zoo/xts object containing the \eqn{N}
+return series over period \eqn{t}, with \eqn{M} observations during \eqn{t}.}
+  \item{seasadjR}{ a \eqn{(M x N)} matrix/zoo/xts object containing 
+the seasonaly adjusted returns. This is an optional argument.}
+   \item{wfunction}{ determines whether a Hard Rejection ("HR") or 
+Soft Rejection ("SR") weight function is to be used.
+By default a Hard Rejection (wfunction = "HR") function is used.}
+   \item{alphaMCD}{ a numeric parameter, controlling the size of 
+the subsets over which the determinant is minimized. 
+Allowed values are between 0.5 and 1 and 
+the default is 0.75. See Boudt et al. (2008) or "?covMcd" in the robustbase package.}
+   \item{alpha}{ is a parameter between 0 and 1, 
+that determines the rejection threshold value 
+(see Boudt et al. (2008) for details).}
+}
+
+\section{Details}{}
+
+\value{
+an \eqn{N x N} matrix
+}
+
+\references{
+Boudt, K., C. Croux, and S. Laurent (2008). Outlyingness weighted quadratic
+covariation. Mimeo.
+}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Added: pkg/RTAQ/man/ROWVar.Rd
===================================================================
--- pkg/RTAQ/man/ROWVar.Rd	                        (rev 0)
+++ pkg/RTAQ/man/ROWVar.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,56 @@
+\name{ROWVar}
+\Rdversion{1.1}
+\alias{ROWVar}
+\title{
+Realized Outlyingness Weighted Variance
+}
+\description{
+Function returns the Realized Outlyingness Weighted Variance (ROWVar), defined in Boudt et al. (2008).
+
+Let \eqn{r_{t,i}} be a return (with \eqn{i=1,\ldots,M}) in period \eqn{t} and \eqn{d_{t,i}} 
+a measure for the local outlyingness
+of that return, as defined in Boudt et al. (2008). The ROWVar is then given by
+
+\deqn{
+\mbox{ROWVar}_{t}=c_{w}\frac{\sum_{i=1}^{M}w(d_{t,i})r_{t,i}^{2}}{\frac{1}{M}\sum_{i=1}^{M}w(d_{t,i})}.
+}
+
+}
+
+\usage{
+ROWVar(data, seasadjR = NULL, wfunction = "HR" , alphaMCD = 0.5, alpha = 0.001)
+}
+
+\arguments{
+  \item{data}{ a vector/zoo/xts object containing all returns in period t for one asset. }
+  \item{seasadjR}{ seasadjR is a matrix/zoo/xts object containing the seasonaly adjusted
+returns in period t for one asset. This is an optional argument.}
+  \item{wfunction}{ determines whether a Hard Rejection ("HR") or Soft Rejec-
+tion ("SR") weight function is to be used. By default a Hard Rejection
+(wfunction = "HR") function is used.}
+  \item{alphaMCD}{
+a numeric parameter, controlling the size of the subsets over
+which the determinant is minimized. Allowed values are between 0.5 and
+1 and the default is 0.5. See Boudt et al. (2008) or the \code{covMcd} function in the
+robustbase package.
+}
+  \item{alpha}{a parameter between 0 and 1, that determines the rejection
+threshold value (see Boudt et al. (2008) for details).}
+}
+
+\section{Details}{
+}
+
+\value{
+numeric
+}
+
+\references{
+Boudt, K., C. Croux, and S. Laurent (2008). Outlyingness weighted quadratic
+covariation. Mimeo.
+}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file

Modified: pkg/RTAQ/man/RV.Rd
===================================================================
--- pkg/RTAQ/man/RV.Rd	2010-04-08 10:16:09 UTC (rev 324)
+++ pkg/RTAQ/man/RV.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -2,7 +2,7 @@
 \Rdversion{1.1}
 \alias{RV}
 \title{
-Realized Volatility
+Realized Variance
 }
 \description{
 Function returns the Realized Variance (RV).
@@ -14,11 +14,11 @@
 }
 
 \usage{
-RV(returnseries);
+RV(data);
 }
 
 \arguments{
-  \item{returnseries}{ a vector/zoo/xts object containing all returns in period t for one asset }
+  \item{data}{ a vector/zoo/xts object containing all returns in period t for one asset. }
 }
 
 \section{Details}{
@@ -27,8 +27,10 @@
 \value{
 numeric
 }
+
 \references{
 }
+
 \author{ Jonathan Cornelissen and Kris Boudt}
 
 %cd C:\package\TradeAnalytics\pkg\RTAQ\man

Added: pkg/RTAQ/man/agg_price.Rd
===================================================================
--- pkg/RTAQ/man/agg_price.Rd	                        (rev 0)
+++ pkg/RTAQ/man/agg_price.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,50 @@
+\name{agg_price}
+\Rdversion{1.1}
+\alias{agg_price}
+\title{
+Aggregate a time series but keep first and last observation}
+
+\description{
+Function returns new time series as xts object where first observation is always the opening price
+and subsequent observations are the closing prices over the interval with as endpoint the timestamp 
+of the result.
+}
+
+\usage{
+agg_price = function(ts,FUN = previoustick,on="minutes",k=5)
+}
+
+\arguments{
+\item{ts}{ xts object, containing the original time series.}
+\item{FUN}{ function to apply over each interval. By default, previous tick aggregation is done.}
+\item{on}{ character, indicating the time scale in which "k" is expressed. Possible values are: “secs”, “seconds”, “mins”, “minutes”,“hours”.}
+\item{k}{ positive integer, indicating the number of periods to aggregate over. E.g. to aggregate a 
+xts object to the 5 minute frequency set k=5 and on="minutes".}
+}
+
+\section{Details}{
+The timestamps of the new time series are the closing times and/or days of the intervals. 
+
+In case of previous tick aggregation, 
+for on="seconds"/"minutes"/"hours",
+ the element of the returned series with e.g. timestamp 09:35:00 contains 
+the last observation up to that point, excluding the value at 09:35:00 itself. An exception 
+is 16:00:00, where the observation at 16:00:00 is included in the interval, since this is the
+end of a trading day at the NYSE.
+
+Please Note:
+
+In case an interval is empty, it is omitted. (Possibly, you expect an NA but this isn't the case)
+
+It is assumed that a trading day starts at 09:30:00 and ends at 16:00:00.
+
+It is recommended to use a time series containing one day as input.
+}
+
+\value{
+An xts object containing the aggregated time series.
+}
+
+\references{}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
\ No newline at end of file

Added: pkg/RTAQ/man/agg_quotes.Rd
===================================================================
--- pkg/RTAQ/man/agg_quotes.Rd	                        (rev 0)
+++ pkg/RTAQ/man/agg_quotes.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,45 @@
+\name{agg_quotes}
+\Rdversion{1.1}
+\alias{agg_quotes}
+\title{
+Aggregate an xts object containing quote data}
+
+
+\description{
+Function returns an xts object containing the aggregated quote data with columns "SYMBOL", "EX", "BID","BIDSIZE","OFFER","OFFERSIZE". 
+Please see pdf documentation for the requirements regarding "quote data objects".
+}
+
+\usage{
+agg_quotes(qdata,on="minutes",k=5)
+}
+
+\arguments{
+\item{qdata}{ xts object, containing the quote data. See pdf documentation for more details.}
+\item{on}{ character, indicating the time scale in which "k" is expressed. Possible values are: “secs”, “seconds”, “mins”, “minutes”,“hours”.}
+\item{k}{ positive integer, indicating the number of periods to aggregate over. E.g. to aggregate a 
+xts object to the 5 minute frequency, set k=5 and on="minutes".}
+}
+
+\section{Details}{
+The timestamps of the new time series are the closing times of the intervals. 
+
+Please Note:
+
+In case an interval is empty, it is omitted. (Possibly, you expect an NA but this isn't the case)
+
+Column "MODE" is dropped because aggregating makes no sense.
+
+It is assumed that a trading day starts at 09:30:00 and ends at 16:00:00. Returned object will always contain the 
+first observation (opening price,..).
+
+It is recommended to use an object containing one day of data as input.
+}
+
+\value{
+An xts object containing the aggregated quote data.
+}
+
+\references{}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
\ No newline at end of file

Added: pkg/RTAQ/man/agg_trades.Rd
===================================================================
--- pkg/RTAQ/man/agg_trades.Rd	                        (rev 0)
+++ pkg/RTAQ/man/agg_trades.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,45 @@
+\name{agg_trades}
+\Rdversion{1.1}
+\alias{agg_trades}
+\title{
+Aggregate an xts object containing trade data}
+
+
+\description{
+Function returns an xts object containing the aggregated trade data with columns "SYMBOL", "EX", "PRICE", "SIZE". 
+Please see pdf documentation for the requirements regarding "trade data objects".
+}
+
+\usage{
+agg_trades(tdata,on="minutes",k=5)
+}
+
+\arguments{
+\item{tdata}{ xts object, containing the trade data. See pdf documentation for more details.}
+\item{on}{ character, indicating the time scale in which "k" is expressed. Possible values are: “secs”, “seconds”, “mins”, “minutes”,“hours”.}
+\item{k}{ positive integer, indicating the number of periods to aggregate over. E.g. to aggregate a 
+xts object to the 5 minute frequency set k=5 and on="minutes".}
+}
+
+\section{Details}{
+The timestamps of the new time series are the closing times of the intervals. 
+
+Please Note:
+
+In case an interval is empty, it is omitted. (Possibly, you expect an NA but this isn't the case)
+
+Columns "COND", "CR", "G127" are dropped because aggregating them makes no sense.
+
+It is assumed that a trading day starts at 09:30:00 and ends at 16:00:00. Returned object will always contain the 
+first observation (opening price,..).
+
+It is recommended to use an object containing one day of data as input.
+}
+
+\value{
+An xts object containing the aggregated trade data.
+}
+
+\references{}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
\ No newline at end of file

Added: pkg/RTAQ/man/aggregatets.Rd
===================================================================
--- pkg/RTAQ/man/aggregatets.Rd	                        (rev 0)
+++ pkg/RTAQ/man/aggregatets.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,49 @@
+\name{aggregatets}
+\Rdversion{1.1}
+\alias{aggregatets}
+\title{
+Aggregate a time series}
+
+\description{
+Function returns aggregated time series as xts object. 
+It can handle irregularly spaced timeseries and returns a regularly spaced one.
+}
+
+\usage{
+aggregatets(ts, FUN=previoustick, on="minutes", k=1, weights=NULL)
+}
+
+\arguments{
+\item{ts}{ xts object, containing the original time series.}
+\item{FUN}{ function to apply over each interval. By default, previous tick aggregation is done. 
+In case weights are supplied, this argument is ignored and a weighted average is taken.}
+\item{on}{ character, indicating the time scale in which "k" is expressed. Possible values are: “secs”, “seconds”, “mins”, “minutes”,“hours”, “days”, “weeks”.}
+\item{k}{ positive integer, indicating the number of periods to aggregate over. E.g. to aggregate a 
+xts object to the 5 minute frequency set k=5 and on="minutes".}
+\item{weights}{ 
+By default, no weighting scheme is used. 
+When you assign an xts object with wheights to this argument, a weighted mean is taken over each interval. 
+Of course, the weights should have the same timestamps as the supplied time series.
+}
+}
+
+\section{Details}{
+The timestamps of the new time series are the closing times and/or days of the intervals. 
+E.g. for a weekly aggregation the new timestamp is the last day in that particular week (namely sunday).
+
+In case of previous tick aggregation, 
+for on="seconds"/"minutes"/"hours",
+ the element of the returned series with e.g. timestamp 09:35:00 contains 
+the last observation up to that point, excluding the value at 09:35:00 itself.
+
+Please Note:
+In case an interval is empty, it is omitted. (Possibly, you expect an NA but this isn't the case)
+}
+
+\value{
+An xts object containing the aggregated time series.
+}
+
+\references{}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
\ No newline at end of file

Added: pkg/RTAQ/man/thresholdcov.Rd
===================================================================
--- pkg/RTAQ/man/thresholdcov.Rd	                        (rev 0)
+++ pkg/RTAQ/man/thresholdcov.Rd	2010-04-09 16:47:18 UTC (rev 325)
@@ -0,0 +1,48 @@
+\name{thresholdcov}
+\Rdversion{1.1}
+\alias{thresholdcov}
+\title{
+Threshold Covariance}
+
+\description{
+Function returns the treshold covariance matrix proposed in Gobbi and Mancini (2009).
+
+Let \eqn{r_{t,i}} be an intraday \eqn{N x 1} return vector and \eqn{i=1,...,M}
+the number of intraday returns.
+
+Then, the \eqn{k,q}-th element of the threshold covariance matrix is defined as
+\deqn{
+\mbox{tresholdcov}[k,q]_{t} = \sum_{i=1}^{M} r_{(k)t,i} 1_{\{r_{(k)t,i}^2 \leq TR_{M}\}}  \ \ r_{(q)t,i} 1_{\{r_{(q)t,i}^2 \leq TR_{M}\}},
+}
+
+with the treshold value \eqn{TR_{M}} taken as suggested in Jacod and Todorov (2009).
+}
+
+\usage{
+thresholdcov(data)
+}
+
+\arguments{
+  \item{data}{ a \eqn{(M x N)} matrix/zoo/xts object containing the \eqn{N}
+return series over period \eqn{t}, with \eqn{M} observations during \eqn{t}.}
+}
+
+\section{Details}{}
+
+\value{
+an \eqn{N x N} matrix
+}
+
+\references{
+Barndorff-Nielsen, O. and N. Shephard (2004). Measuring the impact of
+jumps in multivariate price processes using bipower covariation. Discussion
+paper, Nuffield College, Oxford University.
+
+Jacod, J. and V. Todorov (2009). Testing for common arrival of jumps in
+discretely-observed multidimensional processes. Annals of Statistics 37,
+1792-1838.}
+
+\author{ Jonathan Cornelissen and Kris Boudt}
+
+%cd C:\package\TradeAnalytics\pkg\RTAQ\man
+%R CMD Rdconv --type=html --output=sample_5minprices.htm sample_5minprices.Rd
\ No newline at end of file



More information about the Blotter-commits mailing list