[Returnanalytics-commits] r2702 - in pkg/FactorAnalytics: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 2 21:14:57 CEST 2013


Author: chenyian
Date: 2013-08-02 21:14:57 +0200 (Fri, 02 Aug 2013)
New Revision: 2702

Removed:
   pkg/FactorAnalytics/R/plot.FM.attribution.r
   pkg/FactorAnalytics/R/summary.FM.attribution.r
   pkg/FactorAnalytics/man/Style.Rd
   pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd
   pkg/FactorAnalytics/man/impliedFactorReturns.Rd
   pkg/FactorAnalytics/man/modifiedEsReport.Rd
   pkg/FactorAnalytics/man/modifiedIncrementalES.Rd
   pkg/FactorAnalytics/man/modifiedIncrementalVaR.Rd
   pkg/FactorAnalytics/man/modifiedPortfolioEsDecomposition.Rd
   pkg/FactorAnalytics/man/modifiedPortfolioVaRDecomposition.Rd
   pkg/FactorAnalytics/man/modifiedVaRReport.Rd
   pkg/FactorAnalytics/man/nonparametricEsReport.Rd
   pkg/FactorAnalytics/man/nonparametricIncrementalES.Rd
   pkg/FactorAnalytics/man/nonparametricIncrementalVaR.Rd
   pkg/FactorAnalytics/man/nonparametricPortfolioEsDecomposition.Rd
   pkg/FactorAnalytics/man/nonparametricPortfolioVaRDecomposition.Rd
   pkg/FactorAnalytics/man/nonparametricVaRReport.Rd
   pkg/FactorAnalytics/man/normalEsReport.Rd
   pkg/FactorAnalytics/man/normalIncrementalES.Rd
   pkg/FactorAnalytics/man/normalIncrementalVaR.Rd
   pkg/FactorAnalytics/man/normalPortfolioEsDecomposition.Rd
   pkg/FactorAnalytics/man/normalPortfolioVaRDecomposition.Rd
   pkg/FactorAnalytics/man/normalVaRReport.Rd
   pkg/FactorAnalytics/man/plot.FM.attribution.Rd
   pkg/FactorAnalytics/man/scenarioPredictions.Rd
   pkg/FactorAnalytics/man/scenarioPredictionsPortfolio.Rd
   pkg/FactorAnalytics/man/summary.FM.attribution.Rd
Modified:
   pkg/FactorAnalytics/R/
   pkg/FactorAnalytics/man/
Log:
temporally remove .r and Rd files to implement R CMD check 


Property changes on: pkg/FactorAnalytics/R
___________________________________________________________________
Modified: svn:ignore
   - FactorAnalytics-package.R
bootstrapFactorESdecomposition.r
bootstrapFactorVaRdecomposition.r
chart.RollingStyle.R
chart.Style.R
covEWMA.R
dCornishFisher.R
factorModelFactorRiskDecomposition.r
factorModelGroupRiskDecomposition.r
factorModelPerformanceAttribution.r
factorModelPortfolioRiskDecomposition.r
factorModelRiskAttribution.r
factorModelRiskDecomposition.r
factorModelSimulation.r
impliedFactorReturns.R
modifiedEsReport.R
modifiedIncrementalES.R
modifiedIncrementalVaR.R
modifiedPortfolioEsDecomposition.R
modifiedPortfolioVaRDecomposition.R
modifiedVaRReport.R
nonparametricEsReport.R
nonparametricIncrementalES.R
nonparametricIncrementalVaR.R
nonparametricPortfolioEsDecomposition.R
nonparametricPortfolioVaRDecomposition.R
nonparametricVaRReport.R
normalEsReport.R
normalIncrementalES.R
normalIncrementalVaR.R
normalPortfolioEsDecomposition.R
normalPortfolioVaRDecomposition.R
normalVaRReport.R
pCornishFisher.R
plot.MacroFactorModel.r
print.MacroFactorModel.r
qCornishFisher.R
rCornishFisher.R
scenarioPredictions.r
scenarioPredictionsPortfolio.r
style.QPfit.R
style.fit.R
summary.MacroFactorModel.r
table.RollingStyle.R

   + FactorAnalytics-package.R
bootstrapFactorESdecomposition.r
bootstrapFactorVaRdecomposition.r
chart.RollingStyle.R
chart.Style.R
covEWMA.R
dCornishFisher.R
factorModelFactorRiskDecomposition.r
factorModelGroupRiskDecomposition.r
factorModelPerformanceAttribution.r
factorModelPortfolioRiskDecomposition.r
factorModelRiskAttribution.r
factorModelRiskDecomposition.r
factorModelSimulation.r
impliedFactorReturns.R
modifiedEsReport.R
modifiedIncrementalES.R
modifiedIncrementalVaR.R
modifiedPortfolioEsDecomposition.R
modifiedPortfolioVaRDecomposition.R
modifiedVaRReport.R
nonparametricEsReport.R
nonparametricIncrementalES.R
nonparametricIncrementalVaR.R
nonparametricPortfolioEsDecomposition.R
nonparametricPortfolioVaRDecomposition.R
nonparametricVaRReport.R
normalEsReport.R
normalIncrementalES.R
normalIncrementalVaR.R
normalPortfolioEsDecomposition.R
normalPortfolioVaRDecomposition.R
normalVaRReport.R
pCornishFisher.R
plot.FM.attribution.r
plot.MacroFactorModel.r
print.MacroFactorModel.r
qCornishFisher.R
rCornishFisher.R
scenarioPredictions.r
scenarioPredictionsPortfolio.r
style.QPfit.R
style.fit.R
summary.FM.attribution.r
summary.MacroFactorModel.r
table.RollingStyle.R


Deleted: pkg/FactorAnalytics/R/plot.FM.attribution.r
===================================================================
--- pkg/FactorAnalytics/R/plot.FM.attribution.r	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/R/plot.FM.attribution.r	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,125 +0,0 @@
-# plot.FM.attribution.r 
-# Yi-An Chen
-# 8/1/2012 
-
-
-
-#' plot FM.attribution class
-#' 
-#' Generic function of plot method for factorModelPerformanceAttribution.
-#' Either plot all fit models or choose a single asset to plot.
-#' 
-#' 
-#' @param fm.attr FM.attribution object created by
-#' factorModelPerformanceAttribution.
-#' @param which.plot integer indicating which plot to create: "none" will
-#' create a menu to choose. Defualt is none. 1 = attributed cumulative returns,
-#' 2 = attributed returns on date selected by user, 3 = time series of
-#' attributed returns
-#' @param max.show Maximum assets to plot. Default is 6.
-#' @param date date indicates for attributed returns, the date format should be
-#' the same as data.
-#' @param plot.single Plot a single asset of lm class. Defualt is FALSE.
-#' @param fundName Name of the portfolio to be plotted.
-#' @param which.plot.single integer indicating which plot to create: "none"
-#' will create a menu to choose. Defualt is none. 1 = attributed cumulative
-#' returns, 2 = attributed returns on date selected by user, 3 = time series of
-#' attributed returns
-#' @param ...  more arguements for \code{chart.TimeSeries} used for plotting
-#' time series
-#' @author Yi-An Chen.
-#' @examples
-#' 
-#' \dontrun{
-#' # load data from the database
-#' data(managers.df)
-#' ret.assets = managers.df[,(1:6)]
-#' factors    = managers.df[,(7:9)]
-#' # fit the factor model with OLS
-#' fit <- fitMacroeconomicFactorModel(ret.assets,factors,fit.method="OLS",
-#'                                  variable.selection="all subsets")
-#' fm.attr <- factorModelPerformanceAttribution(fit.macro)
-#' # group plot
-#' plot(fm.attr,date="2006-12-30")
-#' # single portfolio plot
-#' plot(fm.attr,date="2006-12-30")
-#' }
-#' 
-plot.FM.attribution <- function(fm.attr, which.plot=c("none","1L","2L","3L"),max.show=6,
-                                date,plot.single=FALSE,fundName,
-                                which.plot.single=c("none","1L","2L","3L"),...) {
-  # ... for  chart.TimeSeries
-  require(PerformanceAnalytics)
- # plot single assets
-  if (plot.single==TRUE){
-    
-    which.plot.single<-which.plot.single[1]
-    
-    if (which.plot.single=="none")
-      which.plot.single<-menu(c("attributed cumulative returns",
-                                paste("attributed returns","on",date,sep=" "),
-                                "Time series of attributed returns"),
-                              title="performance attribution plot \nMake a plot selection (or 0 to exit):\n")
-    switch(which.plot.single,
-           "1L" =  {  
-    bar <- c(fm.attr$cum.spec.ret[fundName],fm.attr$cum.ret.attr.f[fundName,])
-    names(bar)[1] <- "specific.returns"
-    barplot(bar,horiz=TRUE,main="cumulative attributed returns",las=1)
-           },
-           "2L" ={
-             bar <- coredata(fm.attr$attr.list[[fundName]][as.Date(date)])
-             barplot(bar,horiz=TRUE,main=fundName,las=1)    
-           },
-           "3L" = {
-             chart.TimeSeries(fm.attr$attr.list[[fundName]],
-                              main=paste("Time series of attributed returns of ",fundName,sep=""),... )
-           },
-    invisible())
-    }
-  # plot all assets 
-  else {
-  which.plot<-which.plot[1]
-  fundnames <- rownames(fm.attr$cum.ret.attr.f) 
-    n <- length(fundnames)
-     
-  if(which.plot=='none') 
-    which.plot<-menu(c("attributed cumulative returns",
-                       paste("attributed returns","on",date,sep=" "),
-                       "time series of attributed returns"),
-                        title="performance attribution plot \nMake a plot selection (or 0 to exit):\n") 
-  if (n >= max.show) {
-    cat(paste("numbers of assets are greater than",max.show,", show only first",
-              max.show,"assets",sep=" "))
-    n <- max.show 
-  }
-  switch(which.plot,
-  
-  "1L" = {
-    par(mfrow=c(2,n/2))
-    for (i in fundnames[1:n]) {
-    bar <- c(fm.attr$cum.spec.ret[i],fm.attr$cum.ret.attr.f[i,])
-    names(bar)[1] <- "specific.returns"
-    barplot(bar,horiz=TRUE,main=i,las=1)  
-    }
-    par(mfrow=c(1,1))
-    },
-  "2L" ={
-    par(mfrow=c(2,n/2))
-    for (i in fundnames[1:n]) {
-      bar <- coredata(fm.attr$attr.list[[i]][as.Date(date)])
-      barplot(bar,horiz=TRUE,main=i,las=1)  
-    }
-    par(mfrow=c(1,1))
-  }, 
-  "3L" = {
-    par(mfrow=c(2,n/2))
-    for (i in fundnames[1:n]) {
-      chart.TimeSeries(fm.attr$attr.list[[i]],main=i)
-    }
-    par(mfrow=c(1,1))
-  },     
-         invisible()
-  )
-
-   }
-         }

Deleted: pkg/FactorAnalytics/R/summary.FM.attribution.r
===================================================================
--- pkg/FactorAnalytics/R/summary.FM.attribution.r	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/R/summary.FM.attribution.r	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,25 +0,0 @@
-# summary.FM.attribution.r 
-# Yi-An Chen
-# 8/1/2012 
-
-
-
-#' summary FM.attribution object.
-#' 
-#' Generic function of summary method for factorModelPerformanceAttribution.
-#' 
-#' 
-#' @param fm.attr FM.attribution object created by
-#' factorModelPerformanceAttribution.
-#' @author Yi-An Chen.
-#' @examples
-#' 
-#'   \dontrun{
-#'   fm.attr <- factorModelPerformanceAttribution(fit.macro)
-#'   summary(fm.attr)
-#'   }
-#'   
-#' 
-summary.FM.attribution <- function(fm.attr) {
-   lapply(fm.attr[[3]],summary) 
-}


Property changes on: pkg/FactorAnalytics/man
___________________________________________________________________
Modified: svn:ignore
   - CornishFisher.Rd
covEWMA.Rd
plot.MacroFactorModel.Rd
print.MacroFactorModel.Rd
summary.MacroFactorModel.Rd
summary.TimeSeriesModel.Rd

   + CornishFisher.Rd
Style.Rd
covEWMA.Rd
factorModelPerformanceAttribution.Rd
impliedFactorReturns.Rd
modifiedEsReport.Rd
modifiedIncrementalES.Rd
modifiedIncrementalVaR.Rd
modifiedPortfolioEsDecomposition.Rd
modifiedPortfolioVaRDecomposition.Rd
modifiedVaRReport.Rd
nonparametricEsReport.Rd
nonparametricIncrementalES.Rd
nonparametricIncrementalVaR.Rd
nonparametricPortfolioEsDecomposition.Rd
nonparametricPortfolioVaRDecomposition.Rd
nonparametricVaRReport.Rd
normalEsReport.Rd
normalIncrementalES.Rd
normalIncrementalVaR.Rd
normalPortfolioEsDecomposition.Rd
normalPortfolioVaRDecomposition.Rd
normalVaRReport.Rd
plot.FM.attribution.Rd
plot.MacroFactorModel.Rd
print.MacroFactorModel.Rd
scenarioPredictions.Rd
scenarioPredictionsPortfolio.Rd
summary.FM.attribution.Rd
summary.MacroFactorModel.Rd
summary.TimeSeriesModel.Rd


Deleted: pkg/FactorAnalytics/man/Style.Rd
===================================================================
--- pkg/FactorAnalytics/man/Style.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/Style.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,104 +0,0 @@
-\name{chart.Style}
-\alias{chart.Style}
-\alias{chart.RollingStyle}
-\alias{table.RollingStyle}
-\alias{style.fit}
-\alias{style.QPfit}
-%- Also NEED an '\alias' for EACH other topic documented here.
-\title{ calculate and display effective style weights }
-\description{
-  Functions that calculate effective style weights and display the results in a bar chart.  \code{chart.Style} calculates and displays style weights calculated over a single period.  \code{chart.RollingStyle} calculates and displays those weights in rolling windows through time.  \code{style.fit} manages the calculation of the weights by method.  \code{style.QPfit} calculates the specific constraint case that requires quadratic programming. 
-}
-\usage{
-chart.Style(R.fund, R.style, method = c("constrained", "unconstrained", "normalized"), leverage = FALSE, main = NULL, ylim = NULL, unstacked=TRUE, ...)
-
-chart.RollingStyle(R.fund, R.style, method = c("constrained","unconstrained","normalized"), leverage = FALSE, width = 12, main = NULL, space = 0, ...)
-
-style.fit(R.fund, R.style, model=FALSE, method = c("constrained", "unconstrained", "normalized"), leverage = FALSE, selection = c("none", "AIC"), ...)
-
-style.QPfit(R.fund, R.style, model = FALSE, leverage = FALSE, ...)
-
-}
-%- maybe also 'usage' for other objects documented here.
-\arguments{
-  \item{R.fund}{ matrix, data frame, or zoo object with fund returns to be analyzed }
-  \item{R.style}{ matrix, data frame, or zoo object with style index returns.  Data object must be of the same length and time-aligned with R.fund }
-  \item{method}{ specify the method of calculation of style weights as "constrained", "unconstrained", or "normalized".  For more information, see \code{\link{style.fit}} }
-  \item{leverage}{ logical, defaults to 'FALSE'.  If 'TRUE', the calculation of weights assumes that leverage may be used.  For more information, see \code{\link{style.fit}} }
-  \item{model}{ logical. If 'model' = TRUE in \code{\link{style.QPfit}}, the full result set is shown from the output of \code{solve.QP}. }
-  \item{selection}{ either "none" (default) or "AIC".  If "AIC", then the function uses a stepwise regression to identify find the model with minimum AIC value.  See \code{\link{step}} for more detail.}
-  \item{unstacked}{ logical.  If set to 'TRUE' \emph{and} only one row of data is submitted in 'w', then the chart creates a normal column chart.  If more than one row is submitted, then this is ignored.  See examples below. }
-  \item{space}{ the amount of space (as a fraction of the average bar width) left before each bar, as in \code{\link{barplot}}. Default for \code{chart.RollingStyle} is 0; for \code{chart.Style} the default is 0.2. }
-  \item{main}{ set the chart title, same as in \code{\link{plot}} }
-  \item{width}{ number of periods or window to apply rolling style analysis over }
-  \item{ylim}{ set the y-axis limit, same as in \code{\link{plot}} }
-  \item{\dots}{ for the charting functions, these are arguments to be passed to \code{\link{barplot}}. These can include further arguments (such as 'axes', 'asp' and 'main') and graphical parameters (see 'par') which are passed to 'plot.window()', 'title()' and 'axis'. For the calculation functions, these are ignored. }
-}
-\details{
-These functions calculate style weights using an asset class style model as described in detail in Sharpe (1992).  The use of quadratic programming to determine a fund's exposures to the changes in returns of major asset classes is usually refered to as "style analysis".
-
-The "unconstrained" method implements a simple factor model for style analysis, as in:
-\deqn{Ri = bi1*F1+bi2*F2+...+bin*Fn+ei}{R_i = b_{i1}F_1+b_{i2}F_2+\dots+b_{in}F_n +e_i}
-where \eqn{Ri}{R_i} represents the return on asset i, \eqn{Fj}{F_j} represents each factor, and \eqn{ei}{e_i} represents the "non-factor" component of the return on i.  This is simply a multiple regression analysis with fund returns as the dependent variable and asset class returns as the independent variables.  The resulting slope coefficients are then interpreted as the fund's historic exposures to asset class returns.  In this case, coefficients do not sum to 1.
-
-The "normalized" method reports the results of a multiple regression analysis similar to the first, but with one constraint: the coefficients are required to add to 1.  Coefficients may be negative, indicating short exposures. To enforce the constraint, coefficients are normalized.
-
-The "constrained" method includes the constraint that the coefficients sum to 1, but adds 
-that the coefficients must lie between 0 and 1. These inequality constraints require a 
-quadratic programming algorithm using \code{\link[quadprog]{solve.QP}} from the 'quadprog' package, 
-and the implementation is discussed under \code{\link{style.QPfit}}.  If set to TRUE, 
-"leverage" allows the sum of the coefficients to exceed 1. 
-
-According to Sharpe (1992), the calculation for the constrained case is represented as:
-\deqn{min var(Rf - sum[wi * R.si]) = min var(F - w*S)}{min \sigma(R_f - \sum{w_i * R_s_i}) = min \sigma(F - w*S)}
-\deqn{s.t. sum[wi] = 1; wi > 0}{  s.t. \sum{w_i} = 1; w_i > 0}
-
-Remembering that:
-
-\deqn{\sigma(aX + bY) = a^2 \sigma(X) + b^2 \sigma(Y) + 2ab cov(X,Y) = \sigma(R.f) + w'*V*w - 2*w'*cov(R.f,R.s)}
-
-we can drop \eqn{var(Rf)}{\sigma(R_f)} as it isn't a function of weights, multiply both sides by 1/2:
-
-\deqn{= min (1/2) w'*V*w - C'w}{= min (1/2) w'*V*w - C'w}
-\deqn{  s.t. w'*e = 1, w_i > 0}{  s.t. w'*e = 1, w_i > 0}
-
-Which allows us to use \code{\link[quadprog]{solve.QP}}, which is specified as:
-\deqn{min(-d' b + 1/2 b' D b)}{min(-d' b + 1/2 b' D b)}
-and the constraints
-\deqn{ A' b >= b.0 }{ A' b >= b_0 }
-
-so:
-b is the weight vector,
-D is the variance-covariance matrix of the styles
-d is the covariance vector between the fund and the styles
-
-The chart functions then provide a graphical summary of the results.  The underlying 
-function, \code{\link{style.fit}}, provides the outputs of the analysis and more 
-information about fit, including an R-squared value.
-
-Styles identified in this analysis may be interpreted as an average of potentially 
-changing exposures over the period covered.  The function \code{\link{chart.RollingStyle}} 
-may be useful for examining the behavior of a manager's average exposures to asset classes over time, using a rolling-window analysis.
-
-  The chart functions plot a column chart or stacked column chart of the resulting style weights to the current device.  Both \code{style.fit} and \code{style.QPfit} produce a list of data frames containing 'weights' and 'R.squared' results.   If 'model' = TRUE in \code{style.QPfit}, the full result set is shown from the output of \code{solve.QP}.
-}
-\references{ 
-Sharpe, W. Asset Allocation: Management Style and Performance Measurement Journal of Portfolio Management, 1992, 7-19.  See \url{ http://www.stanford.edu/~wfsharpe/art/sa/sa.htm}
- }
-\author{ Peter Carl }
-\note{ 
-  None of the functions \code{chart.Style}, \code{style.fit}, and \code{style.QPfit} make any attempt to align the two input data series. The \code{chart.RollingStyle}, on the other hand, does merge the two series and manages the calculation over common periods.  
-}
-\seealso{ \code{\link{barplot}}, \code{\link{par}} }
-\examples{
-data(edhec)
-data(managers)
-style.fit(managers[97:132,2,drop=FALSE],edhec[85:120,], method="constrained", leverage=FALSE)
-chart.Style(managers[97:132,2,drop=FALSE],edhec[85:120,], method="constrained", leverage=FALSE, unstack=TRUE, las=3)
-chart.RollingStyle(managers[,2,drop=FALSE],edhec[,1:11], method="constrained", leverage=FALSE, width=36, cex.legend = .7, colorset=rainbow12equal, las=1)
-}
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
-\keyword{ ts }
-\keyword{ multivariate }
-\keyword{ hplot }

Deleted: pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd
===================================================================
--- pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/factorModelPerformanceAttribution.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,53 +0,0 @@
-\name{factorModelPerformanceAttribution}
-\alias{factorModelPerformanceAttribution}
-\title{Compute BARRA-type performance attribution}
-\usage{
-  factorModelPerformanceAttribution(fit, benchmark = NULL,
-    ...)
-}
-\arguments{
-  \item{fit}{Class of "MacroFactorModel",
-  "FundamentalFactorModel" or "statFactorModel".}
-
-  \item{benchmark}{a zoo, vector or data.frame provides
-  benchmark time series returns.}
-
-  \item{...}{Other controled variables for fit methods.}
-}
-\value{
-  an object of class \code{FM.attribution} containing
-}
-\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} can be used.
-}
-\details{
-  total returns can be decomposed into returns attributed
-  to factors and specific returns. \eqn{R_t = \sum_j e_{jt}
-  * f_{jt} + u_t},t=1..T,\eqn{e_{jt}} is exposure to factor
-  j and \eqn{f_{jt}} is factor j. The returns attributed to
-  factor j is \eqn{e_{jt} * f_{jt}} and portfolio specific
-  returns is \eqn{u_t}
-}
-\examples{
-\dontrun{
-data(managers.df)
-ret.assets = managers.df[,(1:6)]
-factors    = managers.df[,(7:9)]
-fit.macro <- fitMacroeconomicFactorModel(ret.assets,factors,fit.method="OLS", factor.set = 3,
-                                         variable.selection="all subsets",decay.factor = 0.95)
-# withoud benchmark
-fm.attr <- factorModelPerformanceAttribution(fit.macro)
-
-}
-}
-\author{
-  Yi-An Chen.
-}
-\references{
-  Grinold,R and Kahn R, \emph{Active Portfolio Management},
-  McGraw-Hill.
-}
-

Deleted: pkg/FactorAnalytics/man/impliedFactorReturns.Rd
===================================================================
--- pkg/FactorAnalytics/man/impliedFactorReturns.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/impliedFactorReturns.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,53 +0,0 @@
-\name{impliedFactorReturns}
-\alias{impliedFactorReturns}
-\title{Compute Implied Factor Returns Using Covariance Matrix Approach}
-\usage{
-  impliedFactorReturns(factor.scenarios, mu.factors,
-    cov.factors)
-}
-\arguments{
-  \item{factor.scenarios}{m x 1 vector of scenario values
-  for a subset of the n > m risk factors}
-
-  \item{mu.factors}{\code{n x 1} vector of factor mean
-  returns.}
-
-  \item{cov.factors}{\code{n x n} factor covariance
-  matrix.}
-}
-\value{
-  \code{(n - m) x 1} vector of implied factor returns
-}
-\description{
-  Compute risk factor conditional mean returns for a one
-  group of risk factors given specified returns for another
-  group of risk factors based on the assumption that all
-  risk factor returns are multivariately normally
-  distributed.
-}
-\details{
-  Let \code{y} denote the \code{m x 1} vector of factor
-  scenarios and \code{x} denote the \code{(n-m) x 1} vector
-  of other factors. Assume that \code{(y', x')'} has a
-  multivariate normal distribution with mean \code{(mu.y',
-  mu.x')'} and covariance matrix partitioned as
-  \code{(cov.yy, cov.yx, cov.xy, cov.xx)}. Then the implied
-  factor scenarios are computed as \code{E[x|y] = mu.x +
-  cov.xy*cov.xx^-1 * (y - mu.y)}
-}
-\examples{
-# get data
-data(managers.df)
-factors    = managers.df[,(7:9)]
-# make up a factor mean returns scenario for factor SP500.TR
-factor.scenarios <- 0.1
-names(factor.scenarios) <- "SP500.TR"
-mu.factors <- mean(factors)
-cov.factors <- var(factors)
-# implied factor returns
-impliedFactorReturns(factor.scenarios,mu.factors,cov.factors)
-}
-\author{
-  Eric Zivot and Yi-An Chen.
-}
-

Deleted: pkg/FactorAnalytics/man/modifiedEsReport.Rd
===================================================================
--- pkg/FactorAnalytics/man/modifiedEsReport.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/modifiedEsReport.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,71 +0,0 @@
-\name{modifiedEsReport}
-\alias{modifiedEsReport}
-\title{compute ES report via Cornish-Fisher expansion for collection of assets in a
-portfolio given simulated (bootstrapped) return data.}
-\usage{
-  modifiedEsReport(bootData, w, delta.w = 0.001,
-    tail.prob = 0.01, method = c("derivative", "average"),
-    nav, nav.p, fundStrategy, i1, i2)
-}
-\arguments{
-  \item{bootData}{B x n matrix of B bootstrap returns on
-  assets in portfolio.}
-
-  \item{w}{n x 1 vector of portfolio weights.}
-
-  \item{delta.w}{scalar, change in portfolio weight for
-  computing numerical derivative. Default value is 0.010.}
-
-  \item{tail.prob}{scalar tail probability.}
-
-  \item{method}{character, method for computing marginal
-  ES. Valid choices are "derivative" for numerical
-  computation of the derivative of portfolio ES wrt fund
-  portfolio weight; "average" for approximating E[Ri |
-  Rp<=VaR]}
-
-  \item{nav}{n x 1 vector of net asset values in each
-  fund.}
-
-  \item{nav.p}{scalar, net asset value of portfolio
-  percentage.}
-
-  \item{fundStrategy}{n x 1 vector of fund strategies.}
-
-  \item{i1,i2}{if ff object is used, the ffapply functions
-  do apply an EXPRession and provide two indices FROM="i1"
-  and TO="i2", which mark beginning and end of the batch
-  and can be used in the applied expression.}
-}
-\value{
-  dataframe with the following columns: Strategy n x 1
-  strategy. Net.Asset.value n x 1 net asset values.
-  Allocation n x 1 vector of asset weights. Mean n x 1 mean
-  of each funds. Std.Dev n x 1 standard deviation of each
-  funds.  Assets.ES n x 1 vector of asset specific ES
-  values. cES n x 1 vector of asset specific component ES
-  values. cES.dollar n x 1 vector of asset specific
-  component ES values in dollar terms. pcES n x 1 vector of
-  asset specific percent contribution to ES values. iES n x
-  1 vector of asset specific incremental ES values.
-  iES.dollar n x 1 vector of asset specific component ES
-  values in dollar terms. mES n x 1 vector of asset
-  specific marginal ES values. mES.dollar n x 1 vector of
-  asset specific marginal ES values in dollar terms.
-}
-\description{
-  compute ES report via Cornish-Fisher expansion for
-  collection of assets in a portfolio given simulated
-  (bootstrapped) return data. Report format follows that of
-  Excel VaR report.
-}
-\examples{
-data(managers.df)
-ret.assets = managers.df[,(1:6)]
-modifiedEsReport (bootData= ret.assets[,1:3], w=c(1/3,1/3,1/3), delta.w = 0.001, tail.prob = 0.01,
-                 method="derivative",nav=c(100,200,100), nav.p=500, fundStrategy=c("S1","S2","S3"))
-}
-\author{
-  Eric Zivot and Yi-An Chen.
-}
-

Deleted: pkg/FactorAnalytics/man/modifiedIncrementalES.Rd
===================================================================
--- pkg/FactorAnalytics/man/modifiedIncrementalES.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/modifiedIncrementalES.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,44 +0,0 @@
-\name{modifiedIncrementalES}
-\alias{modifiedIncrementalES}
-\title{Compute incremental ES given bootstrap data and portfolio weights.}
-\usage{
-  modifiedIncrementalES(bootData, w, tail.prob = 0.01, i1,
-    i2)
-}
-\arguments{
-  \item{bootData}{B x N matrix of B bootstrap returns on n
-  assets in portfolio.}
-
-  \item{w}{N x 1 vector of portfolio weights}
-
-  \item{tail.prob}{scalar tail probability.}
-
-  \item{i1,i2}{if ff object is used, the ffapply functions
-  do apply an EXPRession and provide two indices FROM="i1"
-  and TO="i2", which mark beginning and end of the batch
-  and can be used in the applied expression.}
-}
-\value{
-  n x 1 matrix of incremental ES values for each asset.
-}
-\description{
-  Compute incremental ES given bootstrap data and portfolio
-  weights. Incremental ES is defined as the change in
-  portfolio ES that occurs when an asset is removed from
-  the portfolio and allocation is spread equally among
-  remaining assets. VaR used in ES computation is computed
-  as an estimated quantile using the Cornish-Fisher
-  expansion.
-}
-\examples{
-data(managers.df)
-ret.assets = managers.df[,(1:6)]
-modifiedIncrementalES(ret.assets[,1:3],w=c(1/3,1/3,1/3),tail.prob = 0.05)
-}
-\author{
-  Eric Zivot and Yi-An Chen.
-}
-\references{
-  Jorian, P. (2007). Value-at-Risk, pg. 168.
-}
-

Deleted: pkg/FactorAnalytics/man/modifiedIncrementalVaR.Rd
===================================================================
--- pkg/FactorAnalytics/man/modifiedIncrementalVaR.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/modifiedIncrementalVaR.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,43 +0,0 @@
-\name{modifiedIncrementalVaR}
-\alias{modifiedIncrementalVaR}
-\title{Compute incremental VaR given bootstrap data and portfolio weights.}
-\usage{
-  modifiedIncrementalVaR(bootData, w, tail.prob = 0.01, i1,
-    i2)
-}
-\arguments{
-  \item{bootData}{B x N matrix of B bootstrap returns on n
-  assets in portfolio.}
-
-  \item{w}{N x 1 vector of portfolio weights}
-
-  \item{tail.prob}{scalar tail probability.}
-
-  \item{i1,i2}{if ff object is used, the ffapply functions
-  do apply an EXPRession and provide two indices FROM="i1"
-  and TO="i2", which mark beginning and end of the batch
-  and can be used in the applied expression.}
-}
-\value{
-  n x 1 matrix of incremental VaR values for each asset.
-}
-\description{
-  Compute incremental VaR given bootstrap data and
-  portfolio weights. Incremental VaR is defined as the
-  change in portfolio VaR that occurs when an asset is
-  removed from the portfolio and allocation is spread
-  equally among remaining assets. VaR is computed as an
-  estimated quantile using the Cornish-Fisher expansion.
-}
-\examples{
-data(managers.df)
-ret.assets = managers.df[,(1:6)]
-modifiedIncrementalVaR(ret.assets[,1:3],w=c(1/3,1/3,1/3),tail.prob = 0.05)
-}
-\author{
-  Eric Zivot and Yi-An Chen.
-}
-\references{
-  Jorian, P. (2007). Value-at-Risk, pg. 168.
-}
-

Deleted: pkg/FactorAnalytics/man/modifiedPortfolioEsDecomposition.Rd
===================================================================
--- pkg/FactorAnalytics/man/modifiedPortfolioEsDecomposition.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/modifiedPortfolioEsDecomposition.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,54 +0,0 @@
-\name{modifiedPortfolioEsDecomposition}
-\alias{modifiedPortfolioEsDecomposition}
-\title{Compute portfolio ES (risk) decomposition by assets.}
-\usage{
-  modifiedPortfolioEsDecomposition(bootData, w,
-    delta.w = 0.001, tail.prob = 0.01,
-    method = c("derivative", "average"))
-}
-\arguments{
-  \item{bootData}{B x N matrix of B bootstrap returns on
-  assets in portfolio.}
-
-  \item{w}{N x 1 vector of portfolio weights}
-
-  \item{delta.w}{Scalar, change in portfolio weight for
-  computing numerical derivative.}
-
-  \item{tail.prob}{Scalar, tail probability.}
-
-  \item{method}{Character, method for computing marginal
-  ES. Valid choices are "derivative" for numerical
-  computation of the derivative of portfolio ES with
-  respect to fund portfolio weight; "average" for
-  approximating E[R_i | R_p<=VaR].}
-}
-\value{
-  an S3 list containing
-}
-\description{
-  Compute portfolio ES decomposition given historical or
-  simulated data and portfolio weights. Marginal ES is
-  computed either as the numerical derivative of ES with
-  respect to portfolio weight or as the expected fund
-  return given portfolio return is less than or equal to
-  portfolio VaR VaR is compute as an estimated quantile
-  using the Cornish-Fisher expansion.
-}
-\examples{
-data(managers.df)
-ret.assets = managers.df[,(1:6)]
-modifiedPortfolioEsDecomposition(ret.assets[,1:3], w=c(1/3,1/3,1/3), delta.w = 0.001,
-                                  tail.prob = 0.01, method=c("derivative"))
-}
-\author{
-  Eric Zivot and Yi-An Chen.
-}
-\references{
-  1. Hallerback (2003), "Decomposing Portfolio
-  Value-at-Risk: A General Analysis", The Journal of Risk
-  5/2. 2. Yamai and Yoshiba (2002). "Comparative Analyses
-  of Expected Shortfall and Value-at-Risk: Their Estimation
-  Error, Decomposition, and Optimization Bank of Japan.
-}
-

Deleted: pkg/FactorAnalytics/man/modifiedPortfolioVaRDecomposition.Rd
===================================================================
--- pkg/FactorAnalytics/man/modifiedPortfolioVaRDecomposition.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/modifiedPortfolioVaRDecomposition.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,57 +0,0 @@
-\name{modifiedPortfolioVaRDecomposition}
-\alias{modifiedPortfolioVaRDecomposition}
-\title{Compute portfolio VaR decomposition given historical or simulated data and
-portfolio weights.}
-\usage{
-  modifiedPortfolioVaRDecomposition(bootData, w,
-    delta.w = 0.001, tail.prob = 0.01,
-    method = c("derivative", "average"))
-}
-\arguments{
-  \item{bootData}{B x N matrix of B bootstrap returns on
-  assets in portfolio.}
-
-  \item{w}{N x 1 vector of portfolio weights}
-
-  \item{delta.w}{Scalar, change in portfolio weight for
-  computing numerical derivative.}
-
-  \item{tail.prob}{Scalar, tail probability.}
-
-  \item{method}{Character, method for computing marginal
-  ES. Valid choices are "derivative" for numerical
-  computation of the derivative of portfolio ES with
-  respect to fund portfolio weight; "average" for
-  approximating E[R_i | R_p =VaR].}
-}
-\value{
-  an S3 list containing
-}
-\description{
-  Compute portfolio VaR decomposition given historical or
-  simulated data and portfolio weights. The partial
-  derivative of VaR wrt factor beta is computed as the
-  expected factor return given fund return is equal to its
-  VaR and approximated by kernel estimator. VaR is compute
-  as an estimated quantile using the Cornish-Fisher
-  expansion.
-}
-\examples{
-data(managers.df)
-ret.assets = managers.df[,(1:6)]
-modifiedPortfolioVaRDecomposition(ret.assets[,1:3], w=c(1/3,1/3,1/3), delta.w = 0.001,
-                                  tail.prob = 0.01, method=c("average"))
-}
-\author{
-  Eric Zivot and Yi-An Chen.
-}
-\references{
-  1. Hallerback (2003), "Decomposing Portfolio
-  Value-at-Risk: A General Analysis", The Journal of Risk
-  5/2. 2. Yamai and Yoshiba (2002). "Comparative Analyses
-  of Expected Shortfall and Value-at-Risk: Their Estimation
-  Error, Decomposition, and Optimization Bank of Japan. 3.
-  Epperlein and Smillie (2006) "Cracking VAR with Kernels,"
-  Risk.
-}
-

Deleted: pkg/FactorAnalytics/man/modifiedVaRReport.Rd
===================================================================
--- pkg/FactorAnalytics/man/modifiedVaRReport.Rd	2013-08-02 19:07:35 UTC (rev 2701)
+++ pkg/FactorAnalytics/man/modifiedVaRReport.Rd	2013-08-02 19:14:57 UTC (rev 2702)
@@ -1,73 +0,0 @@
-\name{modifiedVaRReport}
-\alias{modifiedVaRReport}
-\title{compute VaR report via Cornish-Fisher expansion for collection of assets in
-a portfolio given simulated (bootstrapped) return data.}
-\usage{
-  modifiedVaRReport(bootData, w, delta.w = 0.001,
-    tail.prob = 0.01, method = c("derivative", "average"),
-    nav, nav.p, fundStrategy, i1, i2)
-}
-\arguments{
-  \item{bootData}{B x n matrix of B bootstrap returns on
-  assets in portfolio.}
-
-  \item{w}{n x 1 vector of portfolio weights.}
-
-  \item{delta.w}{scalar, change in portfolio weight for
-  computing numerical derivative. Default value is 0.010.}
-
-  \item{tail.prob}{scalar tail probability.}
-
-  \item{method}{character, method for computing marginal
-  VaR Valid choices are "derivative" for numerical
-  computation of the derivative of portfolio VaR wrt fund
-  portfolio weight; "average" for approximating E[Ri | Rp
-  =VaR]}
-
-  \item{nav}{n x 1 vector of net asset values in each
-  fund.}
-
-  \item{nav.p}{scalar, net asset value of portfolio
-  percentage.}
-
-  \item{fundStrategy}{n x 1 vector of fund strategies.}
-
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/returnanalytics -r 2702


More information about the Returnanalytics-commits mailing list