[Returnanalytics-commits] r3007 - in pkg/Meucci: R demo man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 6 09:15:20 CEST 2013
Author: xavierv
Date: 2013-09-06 09:15:20 +0200 (Fri, 06 Sep 2013)
New Revision: 3007
Added:
pkg/Meucci/demo/00Index
Modified:
pkg/Meucci/R/FitMultivariateGarch.R
pkg/Meucci/R/InterExtrapolate.R
pkg/Meucci/R/PerformIidAnalysis.R
pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R
pkg/Meucci/man/InterExtrapolate.Rd
pkg/Meucci/man/PerformIidAnalysis.Rd
pkg/Meucci/man/PlotVolVsCompositionEfficientFrontier.Rd
pkg/Meucci/man/garch1f4.Rd
pkg/Meucci/man/garch2f8.Rd
Log:
-Function documentation errors fixed
Modified: pkg/Meucci/R/FitMultivariateGarch.R
===================================================================
--- pkg/Meucci/R/FitMultivariateGarch.R 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/R/FitMultivariateGarch.R 2013-09-06 07:15:20 UTC (rev 3007)
@@ -113,6 +113,8 @@
#' Fit a GARCH(1,1) model with student-t errors
#'
#' @param x : [vector] (T x 1) data generated by a GARCH(1,1) process
+#' @param eps : [scalar] used in enforcing a_ii + b_ii <= 1 - eps; the default value is zero
+#' @param df : [scalar] degree of freedom for the t-distribution; the default value is 500 to make it, basically, normal
#'
#' @return q : [vector] (4 x 1) parameters of the GARCH(1,1) process
#' @return qerr : [vector] (4 x 1) standard error of parameter estimates
@@ -364,7 +366,18 @@
#' Off-diagonal parameter estimation in bivariate GARCH(1,1) when diagonal parameters are given.
#'
-#' @param x : [vector] (T x 1) data generated by a GARCH(1,1) process
+#' @param y : [vector] (T x 1) data generated by a GARCH(1,1) process
+#' @param c1 : [scalar] diagonal parameter of the GARCH(1,1) process taken from matrix C
+#' @param a1 : [scalar] diagonal parameter of the GARCH(1,1) process taken from matrix A
+#' @param b1 : [scalar] diagonal parameter of the GARCH(1,1) process taken from matrix B
+#' @param y1 : [vector] (T x 1) data generated by a GARCH(1,1) process
+#' @param h1 : [vector] (T x 1) data generated by a GARCH(1,1) process
+#' @param c2 : [scalar] diagonal parameter of the GARCH(1,1) process taken from matrix C
+#' @param a2 : [scalar] diagonal parameter of the GARCH(1,1) process taken from matrix A
+#' @param b2 : [scalar] diagonal parameter of the GARCH(1,1) process taken from matrix B
+#' @param y2 : [vector] (T x 1) data generated by a GARCH(1,1) process
+#' @param h2 : [vector] (T x 1) generated by a GARCH(1,1) process
+#' @param df : [scalar] degree of freedom for the t-distribution; the default value is 500 to make it, basically, normal
#'
#' @return q : [vector] (4 x 1) parameters of the GARCH(1,1) process
#' @return qerr : [vector] (4 x 1) standard error of parameter estimates
Modified: pkg/Meucci/R/InterExtrapolate.R
===================================================================
--- pkg/Meucci/R/InterExtrapolate.R 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/R/InterExtrapolate.R 2013-09-06 07:15:20 UTC (rev 3007)
@@ -21,16 +21,6 @@
#' Vpred = interpne(V,Xi,nodelist,method)
#' Extrapolating long distances outside the support of V is rarely advisable.
#'
-#' @examples
-#'
-#' [x1,x2] = meshgrid(0:.2:1);
-#' z = exp(x1+x2);
-#' Xi = rand(100,2)*2-.5;
-#' Zi = interpne(z,Xi,{0:.2:1, 0:.2:1},'linear');
-#' surf(0:.2:1,0:.2:1,z)
-#' hold on
-#' plot3(Xi(:,1),Xi(:,2),Zi,'ro')
-#'
#' @references
#' \url{http://symmys.com/node/170}
#' See Meucci's script for "InterExtrapolate.R"
@@ -38,7 +28,18 @@
#' @author Xavier Valls \email{flamejat@@gmail.com}
#' @export
-InterExtrapolate = function( V, Xi, nodelist, method, ...)
+# examples
+#
+# [x1,x2] = meshgrid(0:.2:1);
+# z = exp(x1+x2);
+# Xi = rand(100,2)*2-.5;
+# Zi = interpne(z,Xi,{0:.2:1, 0:.2:1},'linear');
+# surf(0:.2:1,0:.2:1,z)
+# hold on
+# plot3(Xi(:,1),Xi(:,2),Zi,'ro')
+#
+
+InterExtrapolate = function( V, Xi, nodelist, method )
{
# get some sizes
Modified: pkg/Meucci/R/PerformIidAnalysis.R
===================================================================
--- pkg/Meucci/R/PerformIidAnalysis.R 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/R/PerformIidAnalysis.R 2013-09-06 07:15:20 UTC (rev 3007)
@@ -3,7 +3,7 @@
#'
#' @param Dates : [vector] (T x 1) dates
#' @param Data : [matrix] (T x N) data
-#' @param Starting_Prices : [vector] (N x 1)
+#' @param Str : [string] title for the plot
#'
#' @note it checks the evolution over time
# it checks that the variables are identically distributed by looking at the histogram of two subsamples
Modified: pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R
===================================================================
--- pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R 2013-09-06 07:15:20 UTC (rev 3007)
@@ -1,8 +1,8 @@
#' Plot the efficient frontier in the plane of portfolio weights versus standard deviation,
#' as described in A. Meucci, "Risk and Asset Allocation", Springer, 2005.
#'
-#' @param Portfolios: [matrix] (M x N) of portfolios weights
-#' @param vol : [vector] (M x 1) of volatilities
+#' @param Portfolios : [matrix] (M x N) of portfolios weights
+#' @param vol : [vector] (M x 1) of volatilities
#'
#' @references
#' \url{http://symmys.com/node/170}
Added: pkg/Meucci/demo/00Index
===================================================================
--- pkg/Meucci/demo/00Index (rev 0)
+++ pkg/Meucci/demo/00Index 2013-09-06 07:15:20 UTC (rev 3007)
@@ -0,0 +1,20 @@
+AnalyticalvsNumerical This example script compares the numerical and the analytical solution of entropy-pooling
+ButterflyTrading This example script performs the butterfly-trading case study for the Entropy-Pooling approach by Attilio Meucci
+DetectOutliersviaMVE This example script detects outliers in two-asset and multi-asset case
+FullyFlexibleBayesNets This case study uses Entropy Pooling to compute Fully Flexible Bayesian networks for risk management
+HermiteGrid_CaseStudy This script estimates the prior of a hedge fund return and processes extreme views on CVaR according to Entropy Pooling
+HermiteGrid_CVaR_Recursion This script illustrates the discrete Newton recursion to process views on CVaR according to Entropy Pooling
+HermiteGrid_demo This script compares the performance of plain Monte Carlo versus grid in applying Entropy Pooling to process extreme views
+InvariantProjection This script projects summary statistics to arbitrary horizons under i.i.d. assumption
+logToArithmeticCovariance This example script generates arithmetric returns and arithmetric covariance matrix given a distribution of log returns
+Prior2Posterior This example script compares the numerical and the analytical solution of entropy-pooling
+RankingInformation This script performs ranking allocation using the Entropy-Pooling approach by Attilio Meucci
+RobustBayesianAllocation This script replicates the example from Meucci's MATLAB script S_SimulationsCaseStudy.M
+S_plotGaussHermite This example script displays mesh points based on Gaussian-Hermite quadrature
+S_SnPCaseStudy This script replicates the example from Meucci's MATLAB script S_SnPCaseStudy.M
+S_ToyExample This toy example illustrates the use of Entropy Pooling to compute Fully Flexible Bayesian networks
+S_FitProjectRates This script fits the swap rates dynamics to a multivariate Ornstein-Uhlenbeck process and computes and plots the estimated future distribution
+S_CheckDiagonalization This script verifies the correctness of the eigenvalue-eigenvector representation in terms of real matrices for the transition matrix of an OU process
+S_CovarianceEvolution This script represents the evolution of the covariance of an OU process in terms of the dispersion ellipsoid
+S_DeterministicEvolution This script animates the evolution of the determinstic component of an OU process
+MeanDiversificationFrontier This script computes the mean-diversification efficient frontier
\ No newline at end of file
Modified: pkg/Meucci/man/InterExtrapolate.Rd
===================================================================
--- pkg/Meucci/man/InterExtrapolate.Rd 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/man/InterExtrapolate.Rd 2013-09-06 07:15:20 UTC (rev 3007)
@@ -2,7 +2,7 @@
\alias{InterExtrapolate}
\title{Interpolate and extrapolate using n-linear interpolation (tensor product linear).}
\usage{
- InterExtrapolate(V, Xi, nodelist, method, ...)
+ InterExtrapolate(V, Xi, nodelist, method)
}
\arguments{
\item{V}{: [array] p-dimensional array to be
@@ -34,15 +34,6 @@
interpne(V,Xi,nodelist,method) Extrapolating long
distances outside the support of V is rarely advisable.
}
-\examples{
-[x1,x2] = meshgrid(0:.2:1);
- z = exp(x1+x2);
- Xi = rand(100,2)*2-.5;
- Zi = interpne(z,Xi,{0:.2:1, 0:.2:1},'linear');
- surf(0:.2:1,0:.2:1,z)
- hold on
- plot3(Xi(:,1),Xi(:,2),Zi,'ro')
-}
\author{
Xavier Valls \email{flamejat at gmail.com}
}
Modified: pkg/Meucci/man/PerformIidAnalysis.Rd
===================================================================
--- pkg/Meucci/man/PerformIidAnalysis.Rd 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/man/PerformIidAnalysis.Rd 2013-09-06 07:15:20 UTC (rev 3007)
@@ -3,14 +3,14 @@
\title{This function performs simple invariance (i.i.d.) tests on a time series, as described in
A. Meucci "Risk and Asset Allocation", Springer, 2005}
\usage{
- PerformIidAnalysis(Dates = dim(Data, 1), Data, Str = "")
+ PerformIidAnalysis(Dates = dim(Data)[1], Data, Str = "")
}
\arguments{
\item{Dates}{: [vector] (T x 1) dates}
\item{Data}{: [matrix] (T x N) data}
- \item{Starting_Prices}{: [vector] (N x 1)}
+ \item{Str}{: [string] title for the plot}
}
\description{
This function performs simple invariance (i.i.d.) tests
Modified: pkg/Meucci/man/PlotVolVsCompositionEfficientFrontier.Rd
===================================================================
--- pkg/Meucci/man/PlotVolVsCompositionEfficientFrontier.Rd 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/man/PlotVolVsCompositionEfficientFrontier.Rd 2013-09-06 07:15:20 UTC (rev 3007)
@@ -6,7 +6,7 @@
PlotVolVsCompositionEfficientFrontier(Portfolios, vol)
}
\arguments{
- \item{Portfolios:}{[matrix] (M x N) of portfolios
+ \item{Portfolios}{: [matrix] (M x N) of portfolios
weights}
\item{vol}{: [vector] (M x 1) of volatilities}
Modified: pkg/Meucci/man/garch1f4.Rd
===================================================================
--- pkg/Meucci/man/garch1f4.Rd 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/man/garch1f4.Rd 2013-09-06 07:15:20 UTC (rev 3007)
@@ -7,6 +7,13 @@
\arguments{
\item{x}{: [vector] (T x 1) data generated by a
GARCH(1,1) process}
+
+ \item{eps}{: [scalar] used in enforcing a_ii + b_ii <= 1
+ - eps; the default value is zero}
+
+ \item{df}{: [scalar] degree of freedom for the
+ t-distribution; the default value is 500 to make it,
+ basically, normal}
}
\value{
q : [vector] (4 x 1) parameters of the GARCH(1,1) process
Modified: pkg/Meucci/man/garch2f8.Rd
===================================================================
--- pkg/Meucci/man/garch2f8.Rd 2013-09-06 00:00:33 UTC (rev 3006)
+++ pkg/Meucci/man/garch2f8.Rd 2013-09-06 07:15:20 UTC (rev 3007)
@@ -5,8 +5,42 @@
garch2f8(y, c1, a1, b1, y1, h1, c2, a2, b2, y2, h2, df)
}
\arguments{
- \item{x}{: [vector] (T x 1) data generated by a
+ \item{y}{: [vector] (T x 1) data generated by a
GARCH(1,1) process}
+
+ \item{c1}{: [scalar] diagonal parameter of the GARCH(1,1)
+ process taken from matrix C}
+
+ \item{a1}{: [scalar] diagonal parameter of the GARCH(1,1)
+ process taken from matrix A}
+
+ \item{b1}{: [scalar] diagonal parameter of the GARCH(1,1)
+ process taken from matrix B}
+
+ \item{y1}{: [vector] (T x 1) data generated by a
+ GARCH(1,1) process}
+
+ \item{h1}{: [vector] (T x 1) data generated by a
+ GARCH(1,1) process}
+
+ \item{c2}{: [scalar] diagonal parameter of the GARCH(1,1)
+ process taken from matrix C}
+
+ \item{a2}{: [scalar] diagonal parameter of the GARCH(1,1)
+ process taken from matrix A}
+
+ \item{b2}{: [scalar] diagonal parameter of the GARCH(1,1)
+ process taken from matrix B}
+
+ \item{y2}{: [vector] (T x 1) data generated by a
+ GARCH(1,1) process}
+
+ \item{h2}{: [vector] (T x 1) generated by a GARCH(1,1)
+ process}
+
+ \item{df}{: [scalar] degree of freedom for the
+ t-distribution; the default value is 500 to make it,
+ basically, normal}
}
\value{
q : [vector] (4 x 1) parameters of the GARCH(1,1) process
More information about the Returnanalytics-commits
mailing list