[Returnanalytics-commits] r2139 - in pkg/PerformanceAnalytics/sandbox/Meucci: . man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 9 19:44:19 CEST 2012


Author: braverock
Date: 2012-07-09 19:44:19 +0200 (Mon, 09 Jul 2012)
New Revision: 2139

Added:
   pkg/PerformanceAnalytics/sandbox/Meucci/man/pHist.Rd
Modified:
   pkg/PerformanceAnalytics/sandbox/Meucci/DESCRIPTION
   pkg/PerformanceAnalytics/sandbox/Meucci/man/Central2Raw.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/ComputeMVE.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/Cumul2Raw.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/EntropyProg.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/GenerateLogNormalDistribution.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/PartialConfidencePosterior.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/Prior2Posterior.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Central.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Cumul.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/StackedBarChart.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/efficientFrontier.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/linreturn.Rd
   pkg/PerformanceAnalytics/sandbox/Meucci/man/robustBayesianPortfolioOptimization.Rd
Log:
- update roxygen docs
- update DESCRIPTION for easier compilation


Modified: pkg/PerformanceAnalytics/sandbox/Meucci/DESCRIPTION
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/DESCRIPTION	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/DESCRIPTION	2012-07-09 17:44:19 UTC (rev 2139)
@@ -1,23 +1,17 @@
-Package: PerformanceAnalytics
+Package: Meucci
 Type: Package
 Title: Econometric tools for performance and risk analysis.
-Version: 1.0.4.5
+Version: 0.1
 Date: $Date: 2012-06-06 15:18:48 -0500 (Wed, 06 Jun 2012) $
-Author: Peter Carl, Brian G. Peterson
+Author: Ram Ahluwalia, Manan Shah
 Maintainer: Brian G. Peterson <brian at braverock.com>
-Description: Collection of econometric functions for
-    performance and risk analysis. This package aims to aid
-    practitioners and researchers in utilizing the latest
-    research in analysis of non-normal return streams.  In
-    general, it is most tested on return (rather than
-    price) data on a regular scale, but most functions will
-    work with irregular return data as well, and increasing
-    numbers of functions will work with P&L or price data
-    where possible.
+Description: stub for Meucci
 Depends:
     R (>= 2.14.0),
     zoo,
-    xts (>= 0.8)
+    xts (>= 0.8),
+    matlab,
+    ggplot2
 Suggests:
     Hmisc,
     MASS,
@@ -31,8 +25,15 @@
 License: GPL
 URL: http://r-forge.r-project.org/projects/returnanalytics/
 Copyright: (c) 2004-2012
-Contributors: Kris Boudt,  Diethelm Wuertz, Eric Zivot, Matthieu Lestel
-Thanks: A special thanks for additional contributions from
-    Stefan Albrecht, Khahn Nygyen, Jeff Ryan,
-    Josh Ulrich, Sankalp Upadhyay, Tobias Verbeke, 
-    H. Felix Wittmann, Ram Ahluwalia
+Collate:
+    'ButterflyTrading.R'
+    'CmaCopula.R'
+    'DetectOutliersviaMVE.R'
+    'EntropyProg.R'
+    'FullyFlexibleBayesNets.R'
+    'HermiteGrid.R'
+    'InvariantProjection.R'
+    'logToArithmeticCovariance.R'
+    'Prior2Posterior.R'
+    'RankingInformation.R'
+    'RobustBayesianAllocation.R'

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/Central2Raw.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/Central2Raw.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/Central2Raw.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -1,6 +1,6 @@
 \name{Central2Raw}
 \alias{Central2Raw}
-\title{Transforms central moments into raw moments (first central moment defined as expectation)}
+\title{Transforms first n central moments into first n raw moments (first central moment defined as expectation)}
 \usage{
   Central2Raw(mu)
 }
@@ -17,6 +17,13 @@
   recursively an identity (formula 20)
 }
 \author{
-  Ram Ahluwalia \email{rahluwalia at gmail.com}
+  Ram Ahluwalia \email{rahluwalia at gmail.com} \deqn{ \tilde{
+  \mu }^{ \big(1\big) }_{X} \equiv \mu ^{\big(1\big)}_{X}
+  \\ \tilde{ \mu }^{ \big(n\big) }_{X} \equiv \mu ^{n}_{X}
+  \sum_{k=0}^{n-1} \big(-1\big)^{n-k+1} \mu ^{n-k}_{X}
+  \tilde{ \mu }^{\big(k\big)}_{X} } A. Meucci - "Exercises
+  in Advanced Risk and Portfolio Management". See page 10.
+  Symmys site containing original MATLAB source code
+  \url{http://www.symmys.com}
 }
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/ComputeMVE.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/ComputeMVE.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/ComputeMVE.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -12,22 +12,28 @@
   list a list with MVE_Location a numeric with the location
   parameter of minimum volume ellipsoid MVE_Dispersion a
   numeric with the covariance matrix of the minimum volume
-  ellipsoid
+  ellipsoid \deqn { w_{t} = \frac{1}{T} , t = 1,...,T \\ m
+  \equiv \frac{1}{ \sum_{s=1}^T w_{s} } \sum_{t=1}^T w_{t}
+  x_{t} \\ S \equiv \sum_{t=1}^T w_{t} \big(x_{t} - m\big)
+  \big(x_{t} - m\big)' \\ Ma_{t}^{2} \equiv \big(x-m\big)'
+  S^{-1} \big(x-m\big), t=1,...,T \\ w_{t} \mapsto w_{t}
+  Ma_{t}^{2} \\ U = \big(x_{1}' - \hat{E}',...,x_{T}' -
+  \hat{E}' \big) \\ \hat{Cov} \equiv \frac{1}{T} U'U }
 }
 \description{
   Function computes the minimum volume ellipsoid for a
   given time series via the expectations-minimization
   algorithm The location and scatter parameters that define
   the ellipsoid are multivariate high-breakdown estimators
-  of location and scatter See Sec. 4.6.1 of "Risk and Asset
-  Allocation" - Springer (2005), by A. Meucci for the
-  theory and the routine implemented below
+  of location and scatter
 }
 \author{
   Ram Ahluwalia \email{ram at wingedfootcapital.com}
 }
 \references{
-  \url{http://www.symmys.com} See Meucci script for
-  "ComputeMVE.m"
+  \url{http://www.symmys.com/sites/default/files/Risk%20and%20Asset%20Allocation%20-%20Springer%20Quantitative%20Finance%20-%20Estimation.pdf}
+  See Sec. 4.6.1 of "Risk and Asset Allocation" - Springer
+  (2005), by A. Meucci for the theory and the routine
+  implemented below See Meucci script for "ComputeMVE.m"
 }
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/Cumul2Raw.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/Cumul2Raw.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/Cumul2Raw.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -8,7 +8,10 @@
   \item{ka}{cumulants of Y}
 }
 \value{
-  mu_ the raw non-central moments of Y
+  mu_ the raw non-central moments of Y \deqn {\tilde{ \mu }
+  ^{ \big(n\big) }_{Y} \equiv \kappa^{ \big(n\big) }_{Y} +
+  \sum_{k=1}^{n-1} $^{n-1} C_{k-1}$ \kappa_{Y}^{
+  \big(k\big) } \tilde{ \mu } ^{n-k}_{Y} }
 }
 \description{
   step 5 of the projection process: From the cumulants of Y
@@ -19,4 +22,10 @@
 \author{
   Ram Ahluwalia \email{rahluwalia at gmail.com}
 }
+\references{
+  A. Meucci - "Annualization and General Projection of
+  Skewness, Kurtosis and All Summary Statistics" - formula
+  (24) Symmys site containing original MATLAB source code
+  \url{http://www.symmys.com/node/136}
+}
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/EntropyProg.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/EntropyProg.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/EntropyProg.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -27,7 +27,10 @@
   paper}
 }
 \value{
-  p_ revised probabilities based on entropy pooling
+  a list with p_ revised probabilities based on entropy
+  pooling optimizationPerformance a list with status of
+  optimization, value, number of iterations and sum of
+  probabilities.
 }
 \description{
   Entropy program will change the initial predictive

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/GenerateLogNormalDistribution.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/GenerateLogNormalDistribution.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/GenerateLogNormalDistribution.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -2,8 +2,7 @@
 \alias{GenerateLogNormalDistribution}
 \title{Generate arbitrary distribution of a shifted-lognormal invariant: X-t + a ~ LogN(m,s^2) (formula 14)}
 \usage{
-  GenerateLogNormalDistribution(J = 1e+05, a = -1, m = 0.2,
-    s = 0.4)
+  GenerateLogNormalDistribution(J, a, m, s)
 }
 \arguments{
   \item{J}{a numeric with the number of scenarios}

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/PartialConfidencePosterior.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/PartialConfidencePosterior.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/PartialConfidencePosterior.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -40,9 +40,15 @@
   posterior covariance matrix of asset returns blended from
   the prior and sample covariance matrix
 
-  time_post a numeric with ... TODO:
+  time_post a numeric
 
-  nu_pst a numeric with ... TODO:
+  nu_pst a numeric \deqn { T_{1} \equiv T_{0} + T \\
+  \mu_{1} \equiv \frac{1}{ T_{1} } \big( T_{0} \mu_{0} + T
+  \hat{ \mu } \big) \\ \nu_{1} \equiv \nu_{0} + T \\
+  \Sigma_{1} \equiv \big( \nu_{0} \Sigma_{0} + T \hat{
+  \Sigma } + \frac{ \big(\mu_{0} - \hat{\mu} \big)
+  \big(\mu_{0} - \hat{\mu} \big)' }{ \big( \frac{1}{T} +
+  \frac{1}{T_{0} } \big) }
 }
 \description{
   Constructs the partial confidence posterior based on
@@ -53,4 +59,10 @@
 \author{
   Ram Ahluwalia \email{ram at wingedfootcapital.com}
 }
+\references{
+  A. Meucci - Robust Bayesian Allocation - See formula (11)
+  - (14) \url{
+  http://papers.ssrn.com/sol3/papers.cfm?abstract_id=681553
+  }
+}
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/Prior2Posterior.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/Prior2Posterior.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/Prior2Posterior.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -36,7 +36,16 @@
   Ram Ahluwalia \email{ram at wingedfootcapital.com}
 }
 \references{
-  \url{http://www.symmys.com} See Meucci script
-  Prior2Posterior.m attached to Entropy Pooling Paper
+  \url{http://www.symmys.com}
+  \url{http://ssrn.com/abstract=1213325} \deqn { \tilde{
+  \mu } \equiv \mu + \Sigma Q' {\big(Q \Sigma Q'
+  \big)}^{-1} \big( \tilde{\mu}_{Q} - Q \mu \big), \\
+  \tilde{ \Sigma } \equiv \Sigma + \Sigma G' \big({\big(G
+  \Sigma G' \big)}^{-1} \tilde{ \Sigma }_G {\big(G \Sigma
+  G' \big)}^{-1} - {\big(G \Sigma G' \big)}^{-1} \big) G
+  \Sigma } A. Meucci - "Fully Flexible Views: Theory and
+  Practice". See formula (21) and (22) on page 7 See Meucci
+  script Prior2Posterior.m attached to Entropy Pooling
+  Paper
 }
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Central.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Central.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Central.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -1,6 +1,6 @@
 \name{Raw2Central}
 \alias{Raw2Central}
-\title{Transforms raw moments into central moments}
+\title{Transforms the first n raw moments into the first n central moments}
 \usage{
   Raw2Central(mu_)
 }
@@ -9,7 +9,11 @@
   Y-t}
 }
 \value{
-  mu (multi-period) central moment of Y-t
+  mu (multi-period) central moment of Y-t \deqn {\tilde{
+  \mu } ^ {\big(n\big)} _{X} \equiv E \big\{ X^{n} \big\},
+  \\ \mu ^{ \big(n\big) }_{X} \equiv \sum_0^{n-1}
+  \big(-1\big)^{n-k} \mu ^{n-k}_{X} \tilde{ \mu }^{k}_{X} +
+  \tilde{ \mu }_{X}^{n} }
 }
 \description{
   step 6 of projection process: compute multi-period
@@ -17,8 +21,11 @@
   expectation.
 }
 \author{
-  Ram Ahluwalia \email{rahluwalia at gmail.com} TODO FIXME
-  check these against the central moment functions in
-  PerformanceAnalytics
+  Ram Ahluwalia \email{rahluwalia at gmail.com}
 }
+\references{
+  A. Meucci - "Exercises in Advanced Risk and Portfolio
+  Management". See page 9 Symmys site containing original
+  MATLAB source code \url{http://www.symmys.com}
+}
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Cumul.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Cumul.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Cumul.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -8,7 +8,10 @@
   \item{mu_}{non-central moments of the invariant X-t}
 }
 \value{
-  ka cumulants of X-t
+  ka cumulants of X-t \deqn { \kappa^{ \big(n\big) }_{X}
+  \equiv \tilde{ \mu } ^{ \big(n\big) }_{X} -
+  \sum_{k=1}^{n-1} $^{n-1} C_{k-1}$ \kappa_{X}^{
+  \big(k\big) } \tilde{ \mu } ^{n-k}_{X} }
 }
 \description{
   Step 3 of the projection process: From the non-central
@@ -21,4 +24,10 @@
 \author{
   Ram Ahluwalia \email{rahluwalia at gmail.com}
 }
+\references{
+  A. Meucci - "Annualization and General Projection of
+  Skewness, Kurtosis and All Summary Statistics" - formula
+  (21) Symmys site containing original MATLAB source code
+  \url{http://www.symmys.com/node/136}
+}
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/StackedBarChart.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/StackedBarChart.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/StackedBarChart.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -7,9 +7,6 @@
   \item{a}{matrix of weights where rows are efficient
   portfolios summing to one, and columns are assets}
 
-  \item{a}{string indicating the title of the chart TODO
-  FIXME check against function in Performanceanalytics, we
-  probably want to use that one unless there's a reaso to
-  use this}
+  \item{a}{string indicating the title of the chart}
 }
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/efficientFrontier.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/efficientFrontier.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/efficientFrontier.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -19,7 +19,7 @@
 }
 \value{
   a list of portfolios along the frontier from least risky
-  to most risk The indices in each list correspond to each
+  to most risky The indices in each list correspond to each
   other returns the expected portfolio returns along the
   frontier volatility the variance of the portfolio along
   the frontier weights the weights of the portfolio
@@ -33,4 +33,11 @@
 \author{
   Ram Ahluwalia \email{ram at wingedfootcapital.com}
 }
+\references{
+  Attilio Meucci, 2011, Robust Bayesian Allocation
+  \url{http://papers.ssrn.com/sol3/papers.cfm?abstract_id=681553}
+}
+\seealso{
+  \url{http://symmys.com/node/102}
+}
 

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/linreturn.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/linreturn.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/linreturn.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -17,7 +17,11 @@
   returns
 
   arithmeticCovariance a variance-covariance matrix in
-  simple arithmetic return terms
+  simple arithmetic return terms \deqn { M_{ \tau }^{i} =
+  e^{ \mu ^{\tau} _{i} + \frac{1}{2} \Sigma^{ii} _{\tau} },
+  \\ S^{ij} = e^{ \mu ^{\tau} _{i} + \mu ^{\tau} _{j} +
+  \frac{1}{2} \big(\Sigma^{ii} _{\tau} + \Sigma^{jj}
+  _{\tau}\big) } \big(e^{\Sigma^{ij} _{\tau}} - 1\big) }
 }
 \description{
   Generate arithmetric returns and arithmetric covariance
@@ -26,4 +30,9 @@
 \author{
   Ram Ahluwalia \email{ram at wingedfootcapital.com}
 }
+\references{
+  # formula (7) and (8) on page 5 of Appendix to "Meucci -
+  A Common Pitfall in Mean-Variance Estimation"
+  \url{http://www.wilmott.com/pdfs/011119_meucci.pdf}
+}
 

Added: pkg/PerformanceAnalytics/sandbox/Meucci/man/pHist.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/pHist.Rd	                        (rev 0)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/pHist.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -0,0 +1,33 @@
+\name{pHist}
+\alias{pHist}
+\title{Generates histogram}
+\usage{
+  pHist(X, p, nBins, freq = FALSE)
+}
+\arguments{
+  \item{X}{a vector containing the data points}
+
+  \item{p}{a vector containing the probabilities for each
+  of the data points in X}
+
+  \item{nBins}{expected number of Bins the data set is to
+  be broken down into}
+
+  \item{freq}{a boolean variable to indicate whether the
+  graphic is a representation of frequencies}
+}
+\value{
+  a list with f the frequency for each midpoint x the
+  midpoints of the nBins intervals
+}
+\description{
+  Generates histogram
+}
+\author{
+  Ram Ahluwalia \email{ram at wingedfootcapital.com}
+}
+\references{
+  \url{http://www.symmys.com} See Meucci script pHist.m
+  used for plotting
+}
+

Modified: pkg/PerformanceAnalytics/sandbox/Meucci/man/robustBayesianPortfolioOptimization.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Meucci/man/robustBayesianPortfolioOptimization.Rd	2012-07-09 16:54:41 UTC (rev 2138)
+++ pkg/PerformanceAnalytics/sandbox/Meucci/man/robustBayesianPortfolioOptimization.Rd	2012-07-09 17:44:19 UTC (rev 2139)
@@ -51,6 +51,15 @@
   along the Bayesian efficient frontier weights: the
   weights of each portfolo along the Bayesian efficient
   frontier
+
+  \deqn{ w_{rB}^{(i)} = argmax_{w \in C, w' \Sigma_{1} w
+  \leq \gamma_{\Sigma}^{(i)} \big\{w' \mu^{1} - \gamma
+  _{\mu} \sqrt{w' \Sigma_{1} w} \big\} \\ \gamma_{\mu}
+  \equiv \sqrt{ \frac{q_{\mu}^{2}}{T_{1}}
+  \frac{v_{1}}{v_{1} - 2} } \\ \gamma_{\Sigma}^{(i)} \equiv
+  \frac{v^{(i)}{ \frac{ \nu_{1}}{\nu_{1}+N+1} \sqrt{
+  \frac{2\nu_{1}^{2}q_{\Sigma}^{2}}{ (\nu_{1}+N+1)^{3} } }
+  } }
 }
 \description{
   Construct a collection of portfolios along the Bayesian
@@ -62,4 +71,10 @@
 \author{
   Ram Ahluwalia \email{ram at wingedfootcapital.com}
 }
+\references{
+  A. Meucci - Robust Bayesian Allocation - See formula (19)
+  - (21) \url{
+  http://papers.ssrn.com/sol3/papers.cfm?abstract_id=681553
+  }
+}
 



More information about the Returnanalytics-commits mailing list