[Returnanalytics-commits] r3063 - in pkg/FactorAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Sep 11 21:36:06 CEST 2013
Author: chenyian
Date: 2013-09-11 21:36:06 +0200 (Wed, 11 Sep 2013)
New Revision: 3063
Modified:
pkg/FactorAnalytics/R/factorModelCovariance.r
pkg/FactorAnalytics/R/factorModelEsDecomposition.R
pkg/FactorAnalytics/R/factorModelMonteCarlo.R
pkg/FactorAnalytics/R/factorModelPerformanceAttribution.r
pkg/FactorAnalytics/R/factorModelSdDecomposition.R
pkg/FactorAnalytics/man/factorModelCovariance.Rd
pkg/FactorAnalytics/man/factorModelEsDecomposition.Rd
pkg/FactorAnalytics/man/factorModelMonteCarlo.Rd
pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd
pkg/FactorAnalytics/man/factorModelSdDecomposition.Rd
Log:
modifying several Rd files to improve documentary.
Modified: pkg/FactorAnalytics/R/factorModelCovariance.r
===================================================================
--- pkg/FactorAnalytics/R/factorModelCovariance.r 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/R/factorModelCovariance.r 2013-09-11 19:36:06 UTC (rev 3063)
@@ -1,10 +1,11 @@
#' Compute Factor Model Covariance Matrix.
#'
-#' Compute asset return covariance matrix from factor model parameters.
+#' Compute asset return covariance matrix from factor model.
#'
-#' The return on asset \code{i} (\code{i = 1,...,N}) is assumed to follow the
-#' factor model \cr \code{R(i,t) = alpha + t(beta)*F(t) + e(i,t), e(i,t) ~ iid
-#' (0, sig(i)^2)} \cr where \code{beta} is a \code{K x 1} vector of factor
+#' The return on asset \code{i} is assumed to follow the
+#' factor model
+#' \cr \code{R(i,t) = alpha + t(beta)*F(t) + e(i,t), e(i,t) ~ iid(0, sig(i)^2)} \cr
+#' where \code{beta} is a \code{K x 1} vector of factor
#' exposures. The return variance is then \cr \code{var(R(i,t) =
#' t(beta)*var(F(t))*beta + sig(i)^2}, \cr and the \code{N x N} covariance
#' matrix of the return vector \code{R} is \cr \code{var(R) = B*var(F(t))*t(B)
Modified: pkg/FactorAnalytics/R/factorModelEsDecomposition.R
===================================================================
--- pkg/FactorAnalytics/R/factorModelEsDecomposition.R 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/R/factorModelEsDecomposition.R 2013-09-11 19:36:06 UTC (rev 3063)
@@ -1,4 +1,4 @@
-#' Compute Factor Model Factor ES Decomposition
+#' Compute Factor Model ES Decomposition
#'
#' Compute the factor model factor expected shortfall (ES) decomposition for an
#' asset based on Euler's theorem given historic or simulated data and factor
@@ -30,11 +30,11 @@
#' \item{VaR} {Scalar, nonparametric VaR value for fund reported as a
#' positive number.}
#' \item{n.exceed} Scalar, number of observations beyond VaR.
-#' \item{idx.exceed} \code{n.exceed x 1} vector giving index values of exceedences.
+#' \item{idx.exceed} n.exceed x 1 vector giving index values of exceedences.
#' \item{ES.fm} Scalar. nonparametric ES value for fund reported as a positive number.
-#' \item{mES.fm} \code{(K+1) x 1} vector of factor marginal contributions to ES.
-#' \item{cES.fm} \code{(K+1) x 1} vector of factor component contributions to ES.
-#' \item{pcES.fm} \code{(K+1) x 1} vector of factor percentage component contributions to ES.
+#' \item{mES.fm} (K+1) x 1 vector of factor marginal contributions to ES.
+#' \item{cES.fm} (K+1) x 1 vector of factor component contributions to ES.
+#' \item{pcES.fm} (K+1) x 1 vector of factor percentage component contributions to ES.
#' }
#' @author Eric Zviot and Yi-An Chen.
#' @references 1. Hallerback (2003), "Decomposing Portfolio Value-at-Risk: A
Modified: pkg/FactorAnalytics/R/factorModelMonteCarlo.R
===================================================================
--- pkg/FactorAnalytics/R/factorModelMonteCarlo.R 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/R/factorModelMonteCarlo.R 2013-09-11 19:36:06 UTC (rev 3063)
@@ -2,7 +2,7 @@
#'
#' Simulate returns using factor model Monte Carlo method. Parametric method
#' like normal distribution, Cornish-Fisher and skew-t distribution for
-#' residuals can be selected. Resampling method like non-parametric bootstrap
+#' residuals can be selected. Resampling method such as non-parametric bootstrap
#' or stationary bootstrap can be selected.
#'
#' The factor model Monte Carlo method is described in Jiang (2009).
@@ -37,11 +37,11 @@
#' residuals in output list object.
#' @return A list with the following components:
#' \itemize{
-#' \item returns \code{n.boot x n.funds} matrix of simulated fund
+#' \item{returns} \code{n.boot x n.funds} matrix of simulated fund
#' returns.
-#' \item factors \code{n.boot x n.factors} matrix of resampled factor
+#' \item{factors} \code{n.boot x n.factors} matrix of resampled factor
#' returns. Returned only if \code{return.factors = TRUE}.
-#' \item residuals \code{n.boot x n.funds} matrix of simulated fund
+#' \item{residuals} \code{n.boot x n.funds} matrix of simulated fund
#' residuals. Returned only if \code{return.residuals = TRUE}.
#' }
#' @author Eric Zivot and Yi-An Chen.
Modified: pkg/FactorAnalytics/R/factorModelPerformanceAttribution.r
===================================================================
--- pkg/FactorAnalytics/R/factorModelPerformanceAttribution.r 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/R/factorModelPerformanceAttribution.r 2013-09-11 19:36:06 UTC (rev 3063)
@@ -1,14 +1,13 @@
#' Compute performance attribution
#'
-#' Decompose total returns or active returns into returns attributed to factors
-#' and specific returns. Class of FM.attribution is generated and generic
-#' function \code{plot()} and \code{summary()},\code{print()} can be used.
+#' Decompose total returns into returns attributed to factors and specific returns.
+#' Class of FM.attribution is generated and generic function \code{plot()} and \code{summary()},\code{print()} can be applied.
#'
-#' total returns can be decomposed into returns attributed to factors and
-#' specific returns. \eqn{R_t = \sum_j b_{j} * f_{jt} +
-#' u_t},t=1..T,\eqn{b_{j}} is exposure to factor j and \eqn{f_{jt}} is factor
-#' j. The returns attributed to factor j is \eqn{b_{j} * f_{jt}} and specific
-#' returns is \eqn{u_t}.
+#' Total returns can be decomposed into returns attributed to factors and
+#' specific returns. \cr \eqn{R_t = \sum b_j * f_jt + u_t,t=1...T} \cr
+#' \code{b_j} is exposure to factor j and \code{f_jt} is factor j.
+#' The returns attributed to factor j is \code{b_j * f_jt} and specific
+#' returns is \code{u_t}.
#'
#' @param fit Class of "TimeSeriesFactorModel", "FundamentalFactorModel" or
#' "statFactorModel".
Modified: pkg/FactorAnalytics/R/factorModelSdDecomposition.R
===================================================================
--- pkg/FactorAnalytics/R/factorModelSdDecomposition.R 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/R/factorModelSdDecomposition.R 2013-09-11 19:36:06 UTC (rev 3063)
@@ -1,6 +1,7 @@
-#' Compute factor model factor risk (sd) decomposition for individual fund.
+#' Compute factor model standard deviation decomposition
#'
-#' Compute factor model factor risk (sd) decomposition for individual fund.
+#' Compute the factor model factor standard deviation decomposition for an
+#' asset based on Euler's theorem given factor model parameters.
#'
#'
#' @param beta.vec k x 1 vector of factor betas with factor names in the
Modified: pkg/FactorAnalytics/man/factorModelCovariance.Rd
===================================================================
--- pkg/FactorAnalytics/man/factorModelCovariance.Rd 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/man/factorModelCovariance.Rd 2013-09-11 19:36:06 UTC (rev 3063)
@@ -20,21 +20,20 @@
model parameters.
}
\description{
- Compute asset return covariance matrix from factor model
- parameters.
+ Compute asset return covariance matrix from factor model.
}
\details{
- The return on asset \code{i} (\code{i = 1,...,N}) is
- assumed to follow the factor model \cr \code{R(i,t) =
- alpha + t(beta)*F(t) + e(i,t), e(i,t) ~ iid (0,
- sig(i)^2)} \cr where \code{beta} is a \code{K x 1} vector
- of factor exposures. The return variance is then \cr
- \code{var(R(i,t) = t(beta)*var(F(t))*beta + sig(i)^2},
- \cr and the \code{N x N} covariance matrix of the return
- vector \code{R} is \cr \code{var(R) = B*var(F(t))*t(B) +
- D} \cr where B is the \code{N x K} matrix of asset betas
- and \code{D} is a diagonal matrix with \code{sig(i)^2}
- values along the diagonal.
+ The return on asset \code{i} is assumed to follow the
+ factor model \cr \code{R(i,t) = alpha + t(beta)*F(t) +
+ e(i,t), e(i,t) ~ iid(0, sig(i)^2)} \cr where \code{beta}
+ is a \code{K x 1} vector of factor exposures. The return
+ variance is then \cr \code{var(R(i,t) =
+ t(beta)*var(F(t))*beta + sig(i)^2}, \cr and the \code{N x
+ N} covariance matrix of the return vector \code{R} is \cr
+ \code{var(R) = B*var(F(t))*t(B) + D} \cr where B is the
+ \code{N x K} matrix of asset betas and \code{D} is a
+ diagonal matrix with \code{sig(i)^2} values along the
+ diagonal.
}
\examples{
\dontrun{
Modified: pkg/FactorAnalytics/man/factorModelEsDecomposition.Rd
===================================================================
--- pkg/FactorAnalytics/man/factorModelEsDecomposition.Rd 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/man/factorModelEsDecomposition.Rd 2013-09-11 19:36:06 UTC (rev 3063)
@@ -1,6 +1,6 @@
\name{factorModelEsDecomposition}
\alias{factorModelEsDecomposition}
-\title{Compute Factor Model Factor ES Decomposition}
+\title{Compute Factor Model ES Decomposition}
\usage{
factorModelEsDecomposition(Data, beta.vec, sig2.e,
tail.prob = 0.05,
@@ -33,14 +33,13 @@
\item{VaR} {Scalar, nonparametric VaR value for fund
reported as a positive number.} \item{n.exceed} Scalar,
number of observations beyond VaR. \item{idx.exceed}
- \code{n.exceed x 1} vector giving index values of
- exceedences. \item{ES.fm} Scalar. nonparametric ES value
- for fund reported as a positive number. \item{mES.fm}
- \code{(K+1) x 1} vector of factor marginal contributions
- to ES. \item{cES.fm} \code{(K+1) x 1} vector of factor
- component contributions to ES. \item{pcES.fm} \code{(K+1)
- x 1} vector of factor percentage component contributions
- to ES. }
+ n.exceed x 1 vector giving index values of exceedences.
+ \item{ES.fm} Scalar. nonparametric ES value for fund
+ reported as a positive number. \item{mES.fm} (K+1) x 1
+ vector of factor marginal contributions to ES.
+ \item{cES.fm} (K+1) x 1 vector of factor component
+ contributions to ES. \item{pcES.fm} (K+1) x 1 vector of
+ factor percentage component contributions to ES. }
}
\description{
Compute the factor model factor expected shortfall (ES)
Modified: pkg/FactorAnalytics/man/factorModelMonteCarlo.Rd
===================================================================
--- pkg/FactorAnalytics/man/factorModelMonteCarlo.Rd 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/man/factorModelMonteCarlo.Rd 2013-09-11 19:36:06 UTC (rev 3063)
@@ -56,11 +56,11 @@
return simulated residuals in output list object.}
}
\value{
- A list with the following components: \itemize{ \item
- returns \code{n.boot x n.funds} matrix of simulated fund
- returns. \item factors \code{n.boot x n.factors} matrix
- of resampled factor returns. Returned only if
- \code{return.factors = TRUE}. \item residuals
+ A list with the following components: \itemize{
+ \item{returns} \code{n.boot x n.funds} matrix of
+ simulated fund returns. \item{factors} \code{n.boot x
+ n.factors} matrix of resampled factor returns. Returned
+ only if \code{return.factors = TRUE}. \item{residuals}
\code{n.boot x n.funds} matrix of simulated fund
residuals. Returned only if \code{return.residuals =
TRUE}. }
@@ -69,7 +69,7 @@
Simulate returns using factor model Monte Carlo method.
Parametric method like normal distribution,
Cornish-Fisher and skew-t distribution for residuals can
- be selected. Resampling method like non-parametric
+ be selected. Resampling method such as non-parametric
bootstrap or stationary bootstrap can be selected.
}
\details{
Modified: pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd
===================================================================
--- pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd 2013-09-11 19:36:06 UTC (rev 3063)
@@ -19,19 +19,18 @@
attributed returns for every portfolio. }
}
\description{
- Decompose total returns or active returns into returns
- attributed to factors and specific returns. Class of
- FM.attribution is generated and generic function
- \code{plot()} and \code{summary()},\code{print()} can be
- used.
+ Decompose total returns into returns attributed to
+ factors and specific returns. Class of FM.attribution is
+ generated and generic function \code{plot()} and
+ \code{summary()},\code{print()} can be applied.
}
\details{
- total returns can be decomposed into returns attributed
- to factors and specific returns. \eqn{R_t = \sum_j b_{j}
- * f_{jt} + u_t},t=1..T,\eqn{b_{j}} is exposure to factor
- j and \eqn{f_{jt}} is factor j. The returns attributed to
- factor j is \eqn{b_{j} * f_{jt}} and specific returns is
- \eqn{u_t}.
+ Total returns can be decomposed into returns attributed
+ to factors and specific returns. \cr \eqn{R_t = \sum b_j
+ * f_jt + u_t,t=1...T} \cr \code{b_j} is exposure to
+ factor j and \code{f_jt} is factor j. The returns
+ attributed to factor j is \code{b_j * f_jt} and specific
+ returns is \code{u_t}.
}
\examples{
\dontrun{
Modified: pkg/FactorAnalytics/man/factorModelSdDecomposition.Rd
===================================================================
--- pkg/FactorAnalytics/man/factorModelSdDecomposition.Rd 2013-09-11 19:30:24 UTC (rev 3062)
+++ pkg/FactorAnalytics/man/factorModelSdDecomposition.Rd 2013-09-11 19:36:06 UTC (rev 3063)
@@ -1,6 +1,6 @@
\name{factorModelSdDecomposition}
\alias{factorModelSdDecomposition}
-\title{Compute factor model factor risk (sd) decomposition for individual fund.}
+\title{Compute factor model standard deviation decomposition}
\usage{
factorModelSdDecomposition(beta.vec, factor.cov, sig2.e)
}
@@ -24,8 +24,9 @@
}
}
\description{
- Compute factor model factor risk (sd) decomposition for
- individual fund.
+ Compute the factor model factor standard deviation
+ decomposition for an asset based on Euler's theorem given
+ factor model parameters.
}
\examples{
# load data from the database
More information about the Returnanalytics-commits
mailing list