[Returnanalytics-commits] r2280 - pkg/Meucci/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 7 17:24:54 CEST 2012


Author: braverock
Date: 2012-09-07 17:24:53 +0200 (Fri, 07 Sep 2012)
New Revision: 2280

Added:
   pkg/Meucci/man/RIEfficientFrontier.Rd
   pkg/Meucci/man/gaussHermiteMesh.Rd
   pkg/Meucci/man/hermitePolynomial.Rd
   pkg/Meucci/man/integrateSubIntervals.Rd
   pkg/Meucci/man/kernelbw.Rd
   pkg/Meucci/man/kernelcdf.Rd
   pkg/Meucci/man/kernelinv.Rd
   pkg/Meucci/man/kernelpdf.Rd
   pkg/Meucci/man/normalizeProb.Rd
   pkg/Meucci/man/pHist.Rd
   pkg/Meucci/man/private_fun.Rd
   pkg/Meucci/man/subIntervals.Rd
Log:
- add roxygen docs for previously undocumented functions 


Added: pkg/Meucci/man/RIEfficientFrontier.Rd
===================================================================
--- pkg/Meucci/man/RIEfficientFrontier.Rd	                        (rev 0)
+++ pkg/Meucci/man/RIEfficientFrontier.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,33 @@
+\name{RIEfficientFrontier}
+\alias{RIEfficientFrontier}
+\title{Generates an efficient frontier based on Meucci's Ranking Information version with the following inputs}
+\usage{
+  RIEfficientFrontier(X, p, Options)
+}
+\arguments{
+  \item{X}{a matrix with the joint-scenario probabilities
+  by asset (rows are joint-scenarios, columns are assets)}
+
+  \item{p}{a vector of probabilities associated with each
+  scenario in matrix X}
+
+  \item{Options}{a list of options....TBD}
+}
+\value{
+  A list with NumPortf efficient portfolios whos returns
+  are equally spaced along the whole range of the efficient
+  frontier Exps the NumPortf x 1 vector of expected returns
+  for each asset Covs the NumPortf x N vector of security
+  volatilities along the efficient frontier w the NumPortf
+  x N matrix of compositions (security weights) for each
+  portfolio along the efficient frontier e the NumPortf x 1
+  matrix of expected returns for each portfolio along the
+  efficient frontier s the NumPortf x 1 matrix of standard
+  deviation of returns for each portfolio along the
+  efficient frontier
+}
+\description{
+  Generates an efficient frontier based on Meucci's Ranking
+  Information version with the following inputs
+}
+

Added: pkg/Meucci/man/gaussHermiteMesh.Rd
===================================================================
--- pkg/Meucci/man/gaussHermiteMesh.Rd	                        (rev 0)
+++ pkg/Meucci/man/gaussHermiteMesh.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,40 @@
+\name{gaussHermiteMesh}
+\alias{gaussHermiteMesh}
+\title{Generates grid reprensentation of a distribution according to the method suggested by Meucci and inspired from
+Gauss-Hermite quadratures.}
+\usage{
+  gaussHermiteMesh(J)
+}
+\arguments{
+  \item{J}{a numeric containing the number of points on the
+  grid}
+}
+\value{
+  x a matrix containing the zeroes of Hermite polynomials
+  as a function of polynomial degree
+}
+\description{
+  Grid representation by this method is an alternative to
+  representing distribution of the market, such as
+  importance sampling or stratified sampling.However, these
+  techniques focus on sub-domains of the distribution, and
+  thus, in order to apply such methods, we must forego the
+  full flexibility on the specification of the views. A
+  different approach, which preserves the generality of the
+  views specification, consists in selecting the scenarios
+  x_j deterministically as a grid and then associate with
+  each of them the suitable probability p_j ( integrated
+  over I_j ). The the generic interval _j contains the j-th
+  point of the grid. Once the grid is defined, the entropy
+  optimization can be applied to replace p_j with the new
+  posterior probabilities to reflect the views. We generate
+  the grid here using the Gauss-Hermite quadrature method.
+}
+\author{
+  Ram Ahluwalia \email{ram at wingedfootcapital.com}
+}
+\references{
+  A. Meucci - "Fully Flexible Extreme Views".
+  \url{http://ssrn.com/abstract=1542083}
+}
+

Added: pkg/Meucci/man/hermitePolynomial.Rd
===================================================================
--- pkg/Meucci/man/hermitePolynomial.Rd	                        (rev 0)
+++ pkg/Meucci/man/hermitePolynomial.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,26 @@
+\name{hermitePolynomial}
+\alias{hermitePolynomial}
+\title{Generate a Hermite Polynomial of order n}
+\usage{
+  hermitePolynomial(n)
+}
+\arguments{
+  \item{n}{A numeric defining the order of the Hermite
+  Polynomial}
+}
+\value{
+  p A vector containing the Hermite Polynomial of order n
+  \deqn{ H_{j} (x) \equiv (-1)^{J} e^{ \frac{ -x^{2} }{2} }
+  \frac{ d^{J} e^{ \frac{ -x^{2} }{2} }}{ dx^{J} } }
+}
+\description{
+  Generate a Hermite Polynomial of order n
+}
+\author{
+  Ram Ahluwalia \email{ram at wingedfootcapital.com}
+}
+\references{
+  A. Meucci - "Fully Flexible Extreme Views" - See formula
+  (20) \url{http://ssrn.com/abstract=1542083}
+}
+

Added: pkg/Meucci/man/integrateSubIntervals.Rd
===================================================================
--- pkg/Meucci/man/integrateSubIntervals.Rd	                        (rev 0)
+++ pkg/Meucci/man/integrateSubIntervals.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,23 @@
+\name{integrateSubIntervals}
+\alias{integrateSubIntervals}
+\title{Integrate the subinterval for the given cumulative distribution function to get the equivalent probability}
+\usage{
+  integrateSubIntervals(x, cdf)
+}
+\arguments{
+  \item{x}{a vector containing the data points}
+
+  \item{cdf}{the cumulative distribution function}
+}
+\value{
+  p a vector containing the cdf evaluated for each of the
+  subintervals
+}
+\description{
+  Integrate the subinterval for the given cumulative
+  distribution function to get the equivalent probability
+}
+\author{
+  Ram Ahluwalia \email{ram at wingedfootcapital.com}
+}
+

Added: pkg/Meucci/man/kernelbw.Rd
===================================================================
--- pkg/Meucci/man/kernelbw.Rd	                        (rev 0)
+++ pkg/Meucci/man/kernelbw.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,21 @@
+\name{kernelbw}
+\alias{kernelbw}
+\title{Generates bandwidth of a Gaussian Kernel Density Estimator based on Silverman's rule of thumb}
+\usage{
+  kernelbw(xi)
+}
+\arguments{
+  \item{xi}{a vector containing the data set for which the
+  bandwidth has to be calculated}
+}
+\value{
+  bw a numeric signifying the bandwidth
+}
+\description{
+  Generates bandwidth of a Gaussian Kernel Density
+  Estimator based on Silverman's rule of thumb
+}
+\author{
+  Manan Shah \email{mkshah at tepper.cmu.edu}
+}
+

Added: pkg/Meucci/man/kernelcdf.Rd
===================================================================
--- pkg/Meucci/man/kernelcdf.Rd	                        (rev 0)
+++ pkg/Meucci/man/kernelcdf.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,29 @@
+\name{kernelcdf}
+\alias{kernelcdf}
+\title{Evaluates cumulative distribution function for the input numeric value}
+\usage{
+  kernelcdf(x, xi, bw, wi)
+}
+\arguments{
+  \item{x}{a vector containing the numeric values for which
+  cumulative distribution function has to be evaluated}
+
+  \item{xi}{a vector containing the data set}
+
+  \item{bw}{a numeric value containing Silverman bandwidth
+  of the given data set}
+
+  \item{wi}{a vector containing weights}
+}
+\value{
+  p a numeric containing the cumulative probability
+  distribution value of length equal to x
+}
+\description{
+  Evaluates cumulative distribution function for the input
+  numeric value
+}
+\author{
+  Manan Shah \email{mkshah at tepper.cmu.edu}
+}
+

Added: pkg/Meucci/man/kernelinv.Rd
===================================================================
--- pkg/Meucci/man/kernelinv.Rd	                        (rev 0)
+++ pkg/Meucci/man/kernelinv.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,30 @@
+\name{kernelinv}
+\alias{kernelinv}
+\title{Evaluates inverse probability distribution function for the input probability in order to get the data point}
+\usage{
+  kernelinv(p, xi, bw, wi)
+}
+\arguments{
+  \item{p}{a vector containing the probabilities
+  corresponding to which the data points have to be
+  evaluated}
+
+  \item{xi}{a vector containing the data set}
+
+  \item{bw}{a numeric value containing Silverman bandwidth
+  of the given data set}
+
+  \item{wi}{a vector containing weights}
+}
+\value{
+  x a vector containing the evaluated numeric values of
+  length equal to p
+}
+\description{
+  Evaluates inverse probability distribution function for
+  the input probability in order to get the data point
+}
+\author{
+  Manan Shah \email{mkshah at tepper.cmu.edu}
+}
+

Added: pkg/Meucci/man/kernelpdf.Rd
===================================================================
--- pkg/Meucci/man/kernelpdf.Rd	                        (rev 0)
+++ pkg/Meucci/man/kernelpdf.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,29 @@
+\name{kernelpdf}
+\alias{kernelpdf}
+\title{Evaluates probability distribution function for the input numeric value}
+\usage{
+  kernelpdf(x, xi, bw, wi)
+}
+\arguments{
+  \item{x}{a vector containing the numeric values for which
+  probability distribution function has to be evaluated}
+
+  \item{xi}{a vector containing the data set}
+
+  \item{bw}{a numeric value containing Silverman bandwidth
+  of the given data set}
+
+  \item{wi}{a vector containing weights}
+}
+\value{
+  p a vector containing the probability distribution
+  function value of length equal to x
+}
+\description{
+  Evaluates probability distribution function for the input
+  numeric value
+}
+\author{
+  Manan Shah \email{mkshah at tepper.cmu.edu}
+}
+

Added: pkg/Meucci/man/normalizeProb.Rd
===================================================================
--- pkg/Meucci/man/normalizeProb.Rd	                        (rev 0)
+++ pkg/Meucci/man/normalizeProb.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,22 @@
+\name{normalizeProb}
+\alias{normalizeProb}
+\title{Generates the normalized probability for an input probability value}
+\usage{
+  normalizeProb(p)
+}
+\arguments{
+  \item{p}{a numeric value containing the probability value
+  required to be normalized}
+}
+\value{
+  normalizedp a numeric value containing the normalized
+  probability value
+}
+\description{
+  Generates the normalized probability for an input
+  probability value
+}
+\author{
+  Ram Ahluwalia \email{ram at wingedfootcapital.com}
+}
+

Added: pkg/Meucci/man/pHist.Rd
===================================================================
--- pkg/Meucci/man/pHist.Rd	                        (rev 0)
+++ pkg/Meucci/man/pHist.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -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
+}
+

Added: pkg/Meucci/man/private_fun.Rd
===================================================================
--- pkg/Meucci/man/private_fun.Rd	                        (rev 0)
+++ pkg/Meucci/man/private_fun.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,32 @@
+\name{private_fun}
+\alias{private_fun}
+\title{Evaluates the difference between calculated cumulative distribution function for a data point and the
+true value}
+\usage{
+  private_fun(x, xi, bw, wi, p)
+}
+\arguments{
+  \item{x}{a vector containing the data points for which
+  cdf has to be evaluated}
+
+  \item{xi}{a vector containing the data set}
+
+  \item{bw}{a numeric value containing Silverman bandwidth
+  of the given data set}
+
+  \item{wi}{a vector containing weights}
+
+  \item{p}{a vector containing the true probabilities}
+}
+\value{
+  f a vector containing the difference between x and p
+  which is of length equal to x or p
+}
+\description{
+  Evaluates the difference between calculated cumulative
+  distribution function for a data point and the true value
+}
+\author{
+  Manan Shah \email{mkshah at tepper.cmu.edu}
+}
+

Added: pkg/Meucci/man/subIntervals.Rd
===================================================================
--- pkg/Meucci/man/subIntervals.Rd	                        (rev 0)
+++ pkg/Meucci/man/subIntervals.Rd	2012-09-07 15:24:53 UTC (rev 2280)
@@ -0,0 +1,29 @@
+\name{subIntervals}
+\alias{subIntervals}
+\title{Generate the intervals containing jth point of the grid.}
+\usage{
+  subIntervals(x)
+}
+\arguments{
+  \item{x}{a vector containing the scenarios}
+}
+\value{
+  a list containing
+
+  xLB a vector containing the lower bound of each interval
+
+  xUB a vector containing the upper bound of each interval
+  \deqn{ I_{j} \equiv \big[ x_{j} - \frac{x_{j} - x_{j-1}
+  }{2}, x_{j} + \frac{x_{j+1} - x_{j}}{2} \big) }
+}
+\description{
+  Generate the intervals containing jth point of the grid.
+}
+\author{
+  Ram Ahluwalia \email{ram at wingedfootcapital.com}
+}
+\references{
+  A. Meucci - "Fully Flexible Extreme Views" - See formula
+  (17) \url{http://ssrn.com/abstract=1542083}
+}
+



More information about the Returnanalytics-commits mailing list