[Returnanalytics-commits] r3946 - in pkg/Meucci: R demo man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 12 11:33:02 CEST 2015
Author: xavierv
Date: 2015-08-12 11:33:01 +0200 (Wed, 12 Aug 2015)
New Revision: 3946
Modified:
pkg/Meucci/R/BlackLittermanFormula.R
pkg/Meucci/R/BlackScholesCallPrice.R
pkg/Meucci/R/CentralAndStandardizedStatistics.R
pkg/Meucci/R/ConvertChangeInYield2Price.R
pkg/Meucci/R/CovertCompoundedReturns2Price.R
pkg/Meucci/R/DoubleDecay.R
pkg/Meucci/R/EfficientFrontierPrices.R
pkg/Meucci/R/EfficientFrontierReturns.R
pkg/Meucci/R/EfficientFrontierReturnsBenchmark.R
pkg/Meucci/R/Fit2Moms.R
pkg/Meucci/R/FitExpectationMaximization.R
pkg/Meucci/R/FitMultivariateGarch.R
pkg/Meucci/R/FitOrnsteinUhlenbeck.R
pkg/Meucci/R/GenerateUniformDrawsOnUnitSphere.R
pkg/Meucci/R/InterExtrapolate.R
pkg/Meucci/R/LeastInfoKernel.R
pkg/Meucci/R/Log2Lin.R
pkg/Meucci/R/LognormalCopulaPdf.R
pkg/Meucci/R/LognormalMoments2Parameters.R
pkg/Meucci/R/MaxRsqCS.R
pkg/Meucci/R/MaxRsqTS.R
pkg/Meucci/R/MleRecursionForStudentT.R
pkg/Meucci/R/MvnRnd.R
pkg/Meucci/R/NormalCopulaPdf.R
pkg/Meucci/R/PerformIidAnalysis.R
pkg/Meucci/R/PlotCompositionEfficientFrontier.R
pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R
pkg/Meucci/R/ProjectionStudentT.R
pkg/Meucci/R/QuantileMixture.R
pkg/Meucci/R/SimulateJumpDiffusionMerton.R
pkg/Meucci/R/StudentTCopulaPdf.R
pkg/Meucci/R/TwoDimEllipsoid.R
pkg/Meucci/R/pHistPriorPosterior.R
pkg/Meucci/demo/ButterflyTrading.R
pkg/Meucci/demo/FullFlexProbs.R
pkg/Meucci/demo/S_BivariateSample.R
pkg/Meucci/demo/S_BlackLittermanBasic.R
pkg/Meucci/demo/S_BondProjectionPricingNormal.R
pkg/Meucci/demo/S_BondProjectionPricingStudentT.R
pkg/Meucci/demo/S_BuyNHold.R
pkg/Meucci/demo/S_CPPI.R
pkg/Meucci/demo/S_CallsProjectionPricing.R
pkg/Meucci/demo/S_CornishFisher.R
pkg/Meucci/demo/S_CorrelationPriorUniform.R
pkg/Meucci/demo/S_CrossSectionConstrainedIndustries.R
pkg/Meucci/demo/S_CrossSectionIndustries.R
pkg/Meucci/demo/S_DerivativesInvariants.R
pkg/Meucci/demo/S_DisplayLognormalCopulaPdf.R
pkg/Meucci/demo/S_DisplayNormalCopulaCdf.R
pkg/Meucci/demo/S_DisplayNormalCopulaPdf.R
pkg/Meucci/demo/S_DisplayStudentTCopulaPdf.R
pkg/Meucci/demo/S_ESContributionFactors.R
pkg/Meucci/demo/S_ESContributionsStudentT.R
pkg/Meucci/demo/S_EigenvalueDispersion.R
pkg/Meucci/demo/S_EllipticalNDim.R
pkg/Meucci/demo/S_EntropyView.R
pkg/Meucci/demo/S_EquitiesInvariants.R
pkg/Meucci/demo/S_EquityProjectionPricing.R
pkg/Meucci/demo/S_EstimateExpectedValueEvaluation.R
pkg/Meucci/demo/S_EstimateMomentsComboEvaluation.R
pkg/Meucci/demo/S_EstimateQuantileEvaluation.R
pkg/Meucci/demo/S_Estimator.R
pkg/Meucci/demo/S_EvaluationGeneric.R
pkg/Meucci/demo/S_ExactMeanAndCovariance.R
pkg/Meucci/demo/S_ExpectationMaximizationHighYield.R
pkg/Meucci/demo/S_ExtremeValueTheory.R
pkg/Meucci/demo/S_FactorAnalysisNotOk.R
pkg/Meucci/demo/S_FactorResidualCorrelation.R
pkg/Meucci/demo/S_FitSwapToStudentT.R
pkg/Meucci/demo/S_FixedIncomeInvariants.R
pkg/Meucci/demo/S_FullCodependence.R
pkg/Meucci/demo/S_FxCopulaMarginal.R
pkg/Meucci/demo/S_GenerateMixtureSample.R
pkg/Meucci/demo/S_HedgeOptions.R
pkg/Meucci/demo/S_HorizonEffect.R
pkg/Meucci/demo/S_InvestorsObjective.R
pkg/Meucci/demo/S_JumpDiffusionMerton.R
pkg/Meucci/demo/S_LinVsLogReturn.R
pkg/Meucci/demo/S_LognormalSample.R
pkg/Meucci/demo/S_MarkovChainMonteCarlo.R
pkg/Meucci/demo/S_MaxMinVariance.R
pkg/Meucci/demo/S_MaximumLikelihood.R
pkg/Meucci/demo/S_MeanVarianceBenchmark.R
pkg/Meucci/demo/S_MeanVarianceCalls.R
pkg/Meucci/demo/S_MeanVarianceHorizon.R
pkg/Meucci/demo/S_MeanVarianceOptimization.R
pkg/Meucci/demo/S_MultiVarSqrRootRule.R
pkg/Meucci/demo/S_NonAnalytical.R
pkg/Meucci/demo/S_NormalSample.R
pkg/Meucci/demo/S_OrderStatisticsPdfLognormal.R
pkg/Meucci/demo/S_OrderStatisticsPdfStudentT.R
pkg/Meucci/demo/S_ProjectNPriceMvGarch.R
pkg/Meucci/demo/S_ProjectSummaryStatistics.R
pkg/Meucci/demo/S_PureResidualBonds.R
pkg/Meucci/demo/S_ResidualAnalysisTheory.R
pkg/Meucci/demo/S_SelectionHeuristics.R
pkg/Meucci/demo/S_StatArbSwaps.R
pkg/Meucci/demo/S_StudentTSample.R
pkg/Meucci/demo/S_SwapPca2Dim.R
pkg/Meucci/demo/S_TStatApprox.R
pkg/Meucci/demo/S_TimeSeriesConstrainedIndustries.R
pkg/Meucci/demo/S_TimeSeriesIndustries.R
pkg/Meucci/demo/S_TimeSeriesVsCrossSectionIndustries.R
pkg/Meucci/demo/S_Toeplitz.R
pkg/Meucci/demo/S_UtilityMax.R
pkg/Meucci/demo/S_VaRContributionsUniform.R
pkg/Meucci/demo/S_VolatilityClustering.R
pkg/Meucci/demo/S_Wishart.R
pkg/Meucci/demo/S_WishartCorrelation.R
pkg/Meucci/demo/S_WishartLocationDispersion.R
pkg/Meucci/man/BlackLittermanFormula.Rd
pkg/Meucci/man/BlackScholesCallPrice.Rd
pkg/Meucci/man/CentralAndStandardizedStatistics.Rd
pkg/Meucci/man/ConvertChangeInYield2Price.Rd
pkg/Meucci/man/ConvertCompoundedReturns2Price.Rd
pkg/Meucci/man/DoubleDecay.Rd
pkg/Meucci/man/EfficientFrontierPrices.Rd
pkg/Meucci/man/EfficientFrontierReturns.Rd
pkg/Meucci/man/EfficientFrontierReturnsBenchmark.Rd
pkg/Meucci/man/Fit2Moms.Rd
pkg/Meucci/man/FitExpectationMaximization.Rd
pkg/Meucci/man/FitMultivariateGarch.Rd
pkg/Meucci/man/FitOrnsteinUhlenbeck.Rd
pkg/Meucci/man/GenerateUniformDrawsOnUnitSphere.Rd
pkg/Meucci/man/InterExtrapolate.Rd
pkg/Meucci/man/LeastInfoKernel.Rd
pkg/Meucci/man/Log2Lin.Rd
pkg/Meucci/man/LognormalCopulaPdf.Rd
pkg/Meucci/man/LognormalMoments2Parameters.Rd
pkg/Meucci/man/MaxRsqCS.Rd
pkg/Meucci/man/MaxRsqTS.Rd
pkg/Meucci/man/MleRecursionForStudentT.Rd
pkg/Meucci/man/MvnRnd.Rd
pkg/Meucci/man/NormalCopulaPdf.Rd
pkg/Meucci/man/PerformIidAnalysis.Rd
pkg/Meucci/man/PlotCompositionEfficientFrontier.Rd
pkg/Meucci/man/PlotVolVsCompositionEfficientFrontier.Rd
pkg/Meucci/man/ProjectionStudentT.Rd
pkg/Meucci/man/QuantileMixture.Rd
pkg/Meucci/man/SimulateJumpDiffusionMerton.Rd
pkg/Meucci/man/StudentTCopulaPdf.Rd
pkg/Meucci/man/TwoDimEllipsoid.Rd
pkg/Meucci/man/garch1f4.Rd
pkg/Meucci/man/garch2f8.Rd
pkg/Meucci/man/pHistPriorPosterior.Rd
Log:
Replacement of email and formatted demoscripts and relating functions up to S_BlackLittermanBasic
Modified: pkg/Meucci/R/BlackLittermanFormula.R
===================================================================
--- pkg/Meucci/R/BlackLittermanFormula.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/BlackLittermanFormula.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -1,7 +1,9 @@
-#' @title Computes the Black-Litterman formula for the moments of the posterior normal.
+#' @title Computes the Black-Litterman formula for the moments of the posterior
+#' normal.
#'
-#' @description This function computes the Black-Litterman formula for the moments of the posterior normal, as described in
-#' A. Meucci, "Risk and Asset Allocation", Springer, 2005.
+#' @description This function computes the Black-Litterman formula for the
+#' moments of the posterior normal, as described in A. Meucci, "Risk and Asset
+#' Allocation", Springer, 2005.
#'
#' @param Mu [vector] (N x 1) prior expected values.
#' @param Sigma [matrix] (N x N) prior covariance matrix.
@@ -13,18 +15,17 @@
#' @return BLSigma [matrix] (N x N) posterior covariance matrix.
#'
#' @references
-#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170}.
+#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management"
+#' \url{http://symmys.com/node/170}. See Meucci's script for
+#' "BlackLittermanFormula.m"
#'
-#' See Meucci's script for "BlackLittermanFormula.m"
-#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
-BlackLittermanFormula = function( Mu, Sigma, P, v, Omega)
-{
- BLMu = Mu + Sigma %*% t( P ) %*% ( solve( P %*% Sigma %*% t( P ) + Omega ) %*% ( v - P %*% Mu ) );
- BLSigma = Sigma - Sigma %*% t( P ) %*% ( solve( P %*% Sigma %*% t( P ) + Omega ) %*% ( P %*% Sigma ) );
-
- return( list( BLMu = BLMu , BLSigma = BLSigma ) );
-
-}
\ No newline at end of file
+BlackLittermanFormula <- function(Mu, Sigma, P, v, Omega) {
+ BLMu <- Mu + Sigma %*% t(P) %*% (solve(P %*% Sigma %*% t(P) + Omega)
+ %*% (v - P %*% Mu))
+ BLSigma <- Sigma - Sigma %*% t(P) %*% (solve(P %*% Sigma %*% t(P) + Omega)
+ %*% (P %*% Sigma))
+ return(list(BLMu = BLMu, BLSigma = BLSigma))
+}
Modified: pkg/Meucci/R/BlackScholesCallPrice.R
===================================================================
--- pkg/Meucci/R/BlackScholesCallPrice.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/BlackScholesCallPrice.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -22,7 +22,7 @@
#'
#' See Meucci's script for "BlackScholesCallPrice.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
BlackScholesCallPrice = function( spot, K, r, vol, T )
Modified: pkg/Meucci/R/CentralAndStandardizedStatistics.R
===================================================================
--- pkg/Meucci/R/CentralAndStandardizedStatistics.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/CentralAndStandardizedStatistics.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -22,7 +22,7 @@
#'
#' A. Meucci - "Annualization and general projection of skweness, kurtosis, and all summary statistics",
#' GARP Risk Professional August 2010, 55-56. \url{http://symmys.com/node/136}.
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
CentralAndStandardizedStatistics = function( X, N )
Modified: pkg/Meucci/R/ConvertChangeInYield2Price.R
===================================================================
--- pkg/Meucci/R/ConvertChangeInYield2Price.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/ConvertChangeInYield2Price.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -17,7 +17,7 @@
#'
#' A. Meucci - "Risk and Asset Allocation"-Springer (2005). See (6.77)-(6.79).
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
ConvertChangeInYield2Price = function( Exp_DY, Cov_DY, Times2Mat, CurrentPrices )
Modified: pkg/Meucci/R/CovertCompoundedReturns2Price.R
===================================================================
--- pkg/Meucci/R/CovertCompoundedReturns2Price.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/CovertCompoundedReturns2Price.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -16,7 +16,7 @@
#'
#' A. Meucci - "Risk and Asset Allocation"-Springer (2005). See (6.77)-(6.79).
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
ConvertCompoundedReturns2Price = function(Exp_Comp_Rets, Cov_Comp_Rets, Starting_Prices)
Modified: pkg/Meucci/R/DoubleDecay.R
===================================================================
--- pkg/Meucci/R/DoubleDecay.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/DoubleDecay.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -14,7 +14,7 @@
#' \url{http://www.symmys.com/node/150}
#' See Meucci script for "DoubleDecay.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
DoubleDecay = function( X, lmd_c, lmd_s)
Modified: pkg/Meucci/R/EfficientFrontierPrices.R
===================================================================
--- pkg/Meucci/R/EfficientFrontierPrices.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/EfficientFrontierPrices.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -18,7 +18,7 @@
#'
#' See Meucci's script for "EfficientFrontierReturns.m".
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
EfficientFrontierPrices = function( NumPortf, Covariance, ExpectedValues, Current_Prices, Budget )
Modified: pkg/Meucci/R/EfficientFrontierReturns.R
===================================================================
--- pkg/Meucci/R/EfficientFrontierReturns.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/EfficientFrontierReturns.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -17,7 +17,7 @@
#'
#' See Meucci's script for "EfficientFrontierReturns.m".
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
EfficientFrontierReturns = function(NumPortf, Covariance, ExpectedValues, Constraints = NULL)
Modified: pkg/Meucci/R/EfficientFrontierReturnsBenchmark.R
===================================================================
--- pkg/Meucci/R/EfficientFrontierReturnsBenchmark.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/EfficientFrontierReturnsBenchmark.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -18,7 +18,7 @@
#'
#' See Meucci's script for "EfficientFrontierReturnsBenchmark.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
EfficientFrontierReturnsBenchmark = function(NumPortf, Covariance, ExpectedValues, Benchmark, Constraints = NULL)
Modified: pkg/Meucci/R/Fit2Moms.R
===================================================================
--- pkg/Meucci/R/Fit2Moms.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/Fit2Moms.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -13,7 +13,7 @@
#' \url{http://www.symmys.com/node/150}
#' See Meucci script for "S_MainFullFlexProbs.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
Fit2Moms = function( X, m, S)
Modified: pkg/Meucci/R/FitExpectationMaximization.R
===================================================================
--- pkg/Meucci/R/FitExpectationMaximization.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/FitExpectationMaximization.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -20,7 +20,7 @@
#'
#' Bilmes, J. A.- "A Gentle Tutorial of the EM Algorithm and its Application to Parameter Estimation for Gaussian Mixture
#' and Hidden Markov Models", 1998.
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
FitExpectationMaximization = function(X)
Modified: pkg/Meucci/R/FitMultivariateGarch.R
===================================================================
--- pkg/Meucci/R/FitMultivariateGarch.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/FitMultivariateGarch.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -19,7 +19,7 @@
#'
#' See Meucci's script for "FitMultivariateGarch.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
FitMultivariateGarch = function( returns, demean = 1, eps = 0, df = 500 )
@@ -135,7 +135,7 @@
#'
#' See Meucci's script for "FitMultivariateGarch.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
@@ -401,7 +401,7 @@
#'
#' See Meucci's script for "FitMultivariateGarch.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
garch2f8 = function( y, c1, a1, b1, y1, h1, c2, a2, b2, y2, h2, df )
@@ -696,7 +696,7 @@
#
# See Meucci's script for "FitMultivariateGarch.m"
#
-# @author Xavier Valls \email{flamejat@@gmail.com}
+# @author Xavier Valls \email{xaviervallspla@@gmail.com}
minfro = function( A )
{
Modified: pkg/Meucci/R/FitOrnsteinUhlenbeck.R
===================================================================
--- pkg/Meucci/R/FitOrnsteinUhlenbeck.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/FitOrnsteinUhlenbeck.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -19,7 +19,7 @@
#'
#' See Meucci's script for "FitOrnsteinUhlenbeck.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
FitOrnsteinUhlenbeck = function( Y, tau )
Modified: pkg/Meucci/R/GenerateUniformDrawsOnUnitSphere.R
===================================================================
--- pkg/Meucci/R/GenerateUniformDrawsOnUnitSphere.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/GenerateUniformDrawsOnUnitSphere.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -18,7 +18,7 @@
#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170}.
#' See Meucci's script for "GenerateUniformDrawsOnUnitSphere.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
GenerateUniformDrawsOnUnitSphere = function(J, N)
Modified: pkg/Meucci/R/InterExtrapolate.R
===================================================================
--- pkg/Meucci/R/InterExtrapolate.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/InterExtrapolate.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -24,7 +24,7 @@
#'
#' See Meucci's script for "InterExtrapolate.R"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
# examples (MATLAB)
Modified: pkg/Meucci/R/LeastInfoKernel.R
===================================================================
--- pkg/Meucci/R/LeastInfoKernel.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/LeastInfoKernel.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -14,7 +14,7 @@
#' \url{http://www.symmys.com/node/150}
#' See Meucci script for "LeastInfoKernel.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
LeastInfoKernel = function( Y, y, h2 )
Modified: pkg/Meucci/R/Log2Lin.R
===================================================================
--- pkg/Meucci/R/Log2Lin.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/Log2Lin.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -14,7 +14,7 @@
#'
#' See Meucci's script for "Log2Lin.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
Log2Lin = function( Mu, Sigma )
Modified: pkg/Meucci/R/LognormalCopulaPdf.R
===================================================================
--- pkg/Meucci/R/LognormalCopulaPdf.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/LognormalCopulaPdf.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -15,7 +15,7 @@
#'
#' See Meucci's script for "LognormalCopulaPdf.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
LognormalCopulaPdf = function( u, Mu, Sigma )
Modified: pkg/Meucci/R/LognormalMoments2Parameters.R
===================================================================
--- pkg/Meucci/R/LognormalMoments2Parameters.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/LognormalMoments2Parameters.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -20,7 +20,7 @@
#'
#' See Meucci's script for "LognormalMoments2Parameters.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
#determines $\mu$ and $\sigma^2$ from $\Expect\{X\}$ and $\Var\{X\}$, and uses it to determine $\mu$
Modified: pkg/Meucci/R/MaxRsqCS.R
===================================================================
--- pkg/Meucci/R/MaxRsqCS.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/MaxRsqCS.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -26,7 +26,7 @@
#'
#' See Meucci's script for "MaxRsqCS.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
MaxRsqCS = function(X, B, W, A = NULL, D = NULL, Aeq = NULL, Deq, lb = NULL, ub = NULL)
Modified: pkg/Meucci/R/MaxRsqTS.R
===================================================================
--- pkg/Meucci/R/MaxRsqTS.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/MaxRsqTS.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -21,7 +21,7 @@
#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170}.
#' See Meucci's script for "MaxRsqTS.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
MaxRsqTS = function(X, F, W, A = NULL, D = NULL, Aeq = NULL, Deq, lb = NULL, ub = NULL)
Modified: pkg/Meucci/R/MleRecursionForStudentT.R
===================================================================
--- pkg/Meucci/R/MleRecursionForStudentT.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/MleRecursionForStudentT.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -22,7 +22,7 @@
#'
#' See Meucci's script for "MleRecursionForStudentT.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
MleRecursionForStudentT = function(x, Nu, Tolerance = 10^(-10) )
Modified: pkg/Meucci/R/MvnRnd.R
===================================================================
--- pkg/Meucci/R/MvnRnd.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/MvnRnd.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -15,7 +15,7 @@
#'
#' See Meucci's script for "MvnRnd.m".
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
MvnRnd = function( M, S, J )
Modified: pkg/Meucci/R/NormalCopulaPdf.R
===================================================================
--- pkg/Meucci/R/NormalCopulaPdf.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/NormalCopulaPdf.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -15,7 +15,7 @@
#'
#' See Meucci's script for "NormalCopulaPdf.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
NormalCopulaPdf = function( u, Mu, Sigma )
Modified: pkg/Meucci/R/PerformIidAnalysis.R
===================================================================
--- pkg/Meucci/R/PerformIidAnalysis.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/PerformIidAnalysis.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -20,7 +20,7 @@
#'
#' See Meucci's script for "PerformIidAnalysis.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
PerformIidAnalysis = function( Dates = dim( Data)[1], Data, Str = "")
Modified: pkg/Meucci/R/PlotCompositionEfficientFrontier.R
===================================================================
--- pkg/Meucci/R/PlotCompositionEfficientFrontier.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/PlotCompositionEfficientFrontier.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -6,28 +6,27 @@
#' @param Portfolios : [matrix] (M x N) M portfolios of size N (weights)
#'
#' @references
-#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170}.
+#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management"
+#' \url{http://symmys.com/node/170}. See Meucci's script for
+#' "PlotCompositionEfficientFrontier.m"
#'
-#' See Meucci's script for "PlotCompositionEfficientFrontier.m"
-#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
-PlotCompositionEfficientFrontier = function( Portfolios )
-{
- dev.new();
+PlotCompositionEfficientFrontier <- function (Portfolios) {
+ dev.new()
- xx = dim( Portfolios )[ 1 ];
- N = dim( Portfolios )[ 2 ];
- Data = t( apply( Portfolios, 1, cumsum ) );
+ xx <- dim(Portfolios)[1]
+ N <- dim(Portfolios)[2]
+ Data <- t(apply(Portfolios, 1, cumsum))
- plot( c(2000, 2000), xlim= c( 1, xx ), ylim = c( 0, max(Data) ), xlab = " Portfolio # risk propensity", ylab = "Portfolio composition" );
-
- for( n in 1 : N )
- {
- x = rbind( 1, matrix(1 : xx), xx );
- y = rbind( 0, matrix( Data[ , N-n+1 ] ), 0 );
- polygon( x, y, col = rgb( 0.9 - mod(n,3)*0.2, 0.9 - mod(n,3)*0.2, 0.9 - mod(n,3)*0.2) );
- }
+ plot(c(2000, 2000), xlim = c(1, xx), ylim = c(0, max(Data)),
+ xlab = " Portfolio # risk propensity", ylab = "Portfolio composition")
-}
\ No newline at end of file
+ for(n in 1:N) {
+ x <- rbind(1, matrix(1:xx), xx)
+ y <- rbind(0, matrix(Data[, N - n + 1]), 0)
+ polygon(x, y, col = rgb(0.9 - mod(n, 3) * 0.2, 0.9 - mod(n, 3) * 0.2,
+ 0.9 - mod(n , 3) * 0.2))
+ }
+}
Modified: pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R
===================================================================
--- pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/PlotVolVsCompositionEfficientFrontier.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -8,7 +8,7 @@
#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170}.
#' See Meucci's script for "PlotVolVsCompositionEfficientFrontier.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
PlotVolVsCompositionEfficientFrontier = function( Portfolios, vol )
Modified: pkg/Meucci/R/ProjectionStudentT.R
===================================================================
--- pkg/Meucci/R/ProjectionStudentT.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/ProjectionStudentT.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -18,7 +18,7 @@
#'
#' See Meucci's script for "ProjectionStudentT.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
ProjectionStudentT = function(nu, m, s, T)
Modified: pkg/Meucci/R/QuantileMixture.R
===================================================================
--- pkg/Meucci/R/QuantileMixture.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/QuantileMixture.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -19,7 +19,7 @@
#'
#'See Meucci's script for "QuantileMixture.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
QuantileMixture = function( p, a, m_Y, s_Y, m_Z, s_Z )
Modified: pkg/Meucci/R/SimulateJumpDiffusionMerton.R
===================================================================
--- pkg/Meucci/R/SimulateJumpDiffusionMerton.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/SimulateJumpDiffusionMerton.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -22,7 +22,7 @@
#' Merton, R. C., 1976. "Option pricing when underlying stocks are discontinuous". Journal of Financial
#' Economics 3, 125-144.
#'
-#'@author Xavier Valls \email{flamejat@@gmail.com}
+#'@author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
SimulateJumpDiffusionMerton = function( m, s, l, a, D, ts, J )
Modified: pkg/Meucci/R/StudentTCopulaPdf.R
===================================================================
--- pkg/Meucci/R/StudentTCopulaPdf.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/StudentTCopulaPdf.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -17,7 +17,7 @@
#'
#' See Meucci's script for "StudentTCopulaPdf.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
StudentTCopulaPdf = function( u, nu, Mu, Sigma )
Modified: pkg/Meucci/R/TwoDimEllipsoid.R
===================================================================
--- pkg/Meucci/R/TwoDimEllipsoid.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/TwoDimEllipsoid.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -18,7 +18,7 @@
#'
#' See Meucci's script for "TwoDimEllipsoid.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
Modified: pkg/Meucci/R/pHistPriorPosterior.R
===================================================================
--- pkg/Meucci/R/pHistPriorPosterior.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/R/pHistPriorPosterior.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -12,7 +12,7 @@
#'
#' See Meucci's script for "pHistPriorPosterior.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
#' @export
pHistPriorPosterior = function( X, p, p_)
Modified: pkg/Meucci/demo/ButterflyTrading.R
===================================================================
--- pkg/Meucci/demo/ButterflyTrading.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/demo/ButterflyTrading.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -12,7 +12,7 @@
#' "ButterflyTrading/S_MAIN.m"
#'
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com} and Ram Ahluwalia
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com} and Ram Ahluwalia
#' \email{ram@@wingedfootcapital.com}
################################################################################
Modified: pkg/Meucci/demo/FullFlexProbs.R
===================================================================
--- pkg/Meucci/demo/FullFlexProbs.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/demo/FullFlexProbs.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -17,7 +17,7 @@
#' \url{http://www.symmys.com/node/150}
#' See Meucci script for "CallPrice.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
CallPrice <- function(P, K, r, t, s) {
d_1 <- log(P / K) + (r + s * s / 2) * t
@@ -42,7 +42,7 @@
#' \url{http://www.symmys.com/node/150},
#' See Meucci script for "DoubleDecay.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
##########################################################################
# risk drivers scenarios
Modified: pkg/Meucci/demo/S_BivariateSample.R
===================================================================
--- pkg/Meucci/demo/S_BivariateSample.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/demo/S_BivariateSample.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -1,123 +1,128 @@
-#' This script generates draws from a bivariate distribution with different marginals,
-#' as described in A. Meucci, "Risk and Asset Allocation", Springer, 2005, Chapter 2.
+#' This script generates draws from a bivariate distribution with different
+#' marginals, as described in A. Meucci, "Risk and Asset Allocation", Springer,
+#' 2005, Chapter 2.
#'
#' @references
-#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170},
-#' "E 38 - Normal copula and given marginals".
+#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management"
+#' \url{http://symmys.com/node/170}, "E 38 - Normal copula and given marginals".
#'
#' See Meucci's script for "S_BivariateSample.m"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
-if ( !require( "latticeExtra" ) ) stop("latticeExtra package installation required for this script")
+if (!require("latticeExtra"))
+ stop("latticeExtra package installation required for this script")
-###################################################################################################################
+################################################################################
### input parameters
-nSim = 10000;
+nSim <- 10000
# input for bivariate normal distribution
-NormCorr = -0.8;
-NormStDev = rbind( 1, 3 ); # NOTE: this input plays no role in the final output
-NormExpVal = rbind( -2, 5 ); # NOTE: this input plays no role in the final output
+NormCorr <- -0.8
+NormStDev <- rbind(1, 3) # NOTE: this input plays no role in the final output
+NormExpVal <- rbind(-2, 5) # NOTE: this input plays no role in the final output
# input for first marginal
-nu_1 = 9;
-sigmasq_1 = 2;
+nu_1 <- 9
+sigmasq_1 <- 2
-mu_2 = 0;
-sigmasq_2 = 0.04;
+mu_2 <- 0
+sigmasq_2 <- 0.04
# input for second marginal
-nu_2 = 7;
+nu_2 <- 7
-###################################################################################################################
+################################################################################
### Generate draws from a bivariate normal distribution
-NormCorrMatrix = rbind( c( 1, NormCorr ), c( NormCorr, 1 ));
-NormCovMatrix = diag( c( NormStDev ) ) %*% NormCorrMatrix %*% diag( c( NormStDev) );
+NormCorrMatrix <- rbind(c(1, NormCorr), c(NormCorr, 1))
+NormCovMatrix <- diag(c(NormStDev)) %*% NormCorrMatrix %*% diag(c(NormStDev))
-Z = rmvnorm( nSim, NormExpVal, NormCovMatrix );
+Z <- rmvnorm(nSim, NormExpVal, NormCovMatrix)
-Z_1 = Z[, 1];
-Z_2 = Z[, 2];
+Z_1 <- Z[, 1]
+Z_2 <- Z[, 2]
# display marginals: as expected, they are normal
-dev.new();
-NumBins = round(10 * log(nSim));
-par( mfrow = c( 2, 1) );
-hist( Z_1, NumBins, xlab = "normal 1", ylab = "" );
-hist( Z_2, NumBins, xlab = "normal 2", ylab = "" );
+dev.new()
+NumBins <- round(10 * log(nSim))
+par(mfrow <- c(2, 1))
+hist(Z_1, NumBins, xlab <- "normal 1", ylab <- "")
+hist(Z_2, NumBins, xlab <- "normal 2", ylab <- "")
-dev.new();
-plot( Z_1, Z_2, type = "p", xlab = "normal 1", ylab = "normal 2" );
+dev.new()
+plot(Z_1, Z_2, type <- "p", xlab <- "normal 1", ylab <- "normal 2")
# 3d histograms
-NumBins2D = round(sqrt(100 * log(nSim)));
-Z_3 = table( cut (Z_1, NumBins2D ), cut ( Z_2, NumBins2D));
-dev.new();
-cloud( Z_3, panel.3d.cloud = panel.3dbars, scales = list( arrows = FALSE, just = "right" ),
- xlab = "normal 1", ylab = "normal 2", zlab="", main = "pdf normal" );
+NumBins2D <- round(sqrt(100 * log(nSim)))
+Z_3 <- table(cut (Z_1, NumBins2D), cut (Z_2, NumBins2D))
+dev.new()
+cloud(Z_3, panel.3d.cloud <- panel.3dbars, scales <- list(arrows <- FALSE,
+ just <- "right"), xlab <- "normal 1", ylab <- "normal 2", zlab = "",
+ main <- "pdf normal")
-###################################################################################################################
+################################################################################
### Generate draws from the copula
-U_1 = pnorm( Z[ , 1 ], NormExpVal[ 1 ], NormStDev[ 1 ]); # grade 1
-U_2 = pnorm( Z[ , 2 ], NormExpVal[ 2 ], NormStDev[ 2 ]); # grade 2
-U = c( U_1, U_2 ); # joint realizations from the required copula
+U_1 <- pnorm(Z[, 1], NormExpVal[1], NormStDev[1]) # grade 1
+U_2 <- pnorm(Z[, 2], NormExpVal[2], NormStDev[2]) # grade 2
+U <- c(U_1, U_2) # joint realizations from the required copula
# plot copula
-NumBins = round(10 * log(nSim));
-dev.new();
-par( mfrow = c( 2, 1) );
-hist( U_1, NumBins, xlab = "grade 1", ylab = "", main = "" );
-hist( U_2, NumBins, xlab = "grade 2", ylab = "", main = "" );
+NumBins <- round(10 * log(nSim))
+dev.new()
+par(mfrow <- c(2, 1))
+hist(U_1, NumBins, xlab <- "grade 1", ylab <- "", main <- "")
+hist(U_2, NumBins, xlab <- "grade 2", ylab <- "", main <- "")
# joint sample
-dev.new();
-plot(U_1, U_2, xlab="grade 1", ylab="grade 2" );
+dev.new()
+plot(U_1, U_2, xlab = "grade 1", ylab = "grade 2")
# 3d histogram
-NumBins2D = round(sqrt(100 * log(nSim)));
-dev.new();
-U_3 = table( cut (U_1, NumBins2D ), cut ( U_2, NumBins2D ));
-cloud( U_3, panel.3d.cloud = panel.3dbars, scales = list( arrows = FALSE, just = "right" ),
- xlab = "grade 1", ylab = "grade 2", zlab="", main = "pdf copula" );
+NumBins2D <- round(sqrt(100 * log(nSim)))
+dev.new()
+U_3 <- table(cut (U_1, NumBins2D), cut (U_2, NumBins2D))
+cloud(U_3, panel.3d.cloud <- panel.3dbars, scales <- list(arrows <- FALSE,
+ just <- "right"), xlab <- "grade 1", ylab <- "grade 2", zlab = "",
+ main <- "pdf copula")
-###################################################################################################################
+################################################################################
### Generate draws from the joint distribution
-a = nu_1 / 2;
-b = 2 * sigmasq_1;
-X_1 = qgamma( U_1, a, b );
+a <- nu_1 / 2
+b <- 2 * sigmasq_1
+X_1 <- qgamma(U_1, a, b)
-sigma_2 = sqrt( sigmasq_2 );
-X_2 = qlnorm( U_2, mu_2, sigma_2 );
+sigma_2 <- sqrt(sigmasq_2)
+X_2 <- qlnorm(U_2, mu_2, sigma_2)
-X = C(X_1, X_2); # joint realizations from the required distribution
+X <- C(X_1, X_2) # joint realizations from the required distribution
-###################################################################################################################
+################################################################################
### Plot joint distribution
-# marginals: as expected, the histograms (pdf's) do NOT change as NormCorr varies
+# marginals: as expected, the histograms (pdf) do NOT change as NormCorr varies
-NumBins = round(10 * log(nSim));
+NumBins <- round(10 * log(nSim))
-dev.new();
-par( mfrow = c( 2, 1) );
+dev.new()
+par(mfrow <- c(2, 1))
# Student t distribution
-hist( X_1, NumBins, xlab = "gamma", ylab = "", main = "" );
+hist(X_1, NumBins, xlab <- "gamma", ylab <- "", main <- "")
# chi-square distribution
-hist( X_2, NumBins, xlab = "lognormal", ylab = "", main = "" );
+hist(X_2, NumBins, xlab <- "lognormal", ylab <- "", main <- "")
# joint sample
-dev.new();
-plot(X_1, X_2, xlab="gamma", ylab="lognormal" );
+dev.new()
+plot(X_1, X_2, xlab = "gamma", ylab = "lognormal")
# 3d histogram
-NumBins2D = round(sqrt(100 * log(nSim)));
-dev.new();
-X_3 = table( cut (X_1, NumBins2D ), cut ( X_2, NumBins2D ));
-cloud( X_3, panel.3d.cloud = panel.3dbars, scales = list( arrows = FALSE, just = "right" ),
- xlab = "gamma", ylab = "lognormal", zlab="", main = "pdf joint distribution" );
\ No newline at end of file
+NumBins2D <- round(sqrt(100 * log(nSim)))
+dev.new()
+X_3 <- table(cut (X_1, NumBins2D), cut (X_2, NumBins2D))
+cloud(X_3, panel.3d.cloud <- panel.3dbars, scales <- list(arrows <- FALSE,
+ just <- "right"), xlab <- "gamma", ylab <- "lognormal", zlab = "",
+ main <- "pdf joint distribution")
Modified: pkg/Meucci/demo/S_BlackLittermanBasic.R
===================================================================
--- pkg/Meucci/demo/S_BlackLittermanBasic.R 2015-08-12 08:50:54 UTC (rev 3945)
+++ pkg/Meucci/demo/S_BlackLittermanBasic.R 2015-08-12 09:33:01 UTC (rev 3946)
@@ -1,36 +1,39 @@
-#' This script describes to basic market-based Black-Litterman approach in particular:
-#' - full confidence = conditional
-#' - no confidence = reference model
+#' This script describes to basic market-based Black-Litterman approach in
+#' particular:
+#' - full confidence<- conditional
+#' - no confidence <- reference model
#' Described in A. Meucci, "Risk and Asset Allocation",
#' Springer, 2005, Chapter 9.
#'
#' @references
-#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management" \url{http://symmys.com/node/170},
-#' "E 303 - Black-Litterman and beyond II".
+#' A. Meucci - "Exercises in Advanced Risk and Portfolio Management"
+#' \url{http://symmys.com/node/170}, "E 303 - Black-Litterman and beyond II".
#'
-#' See Meucci's script for "S_BlackLittermanBasic.m" and "E 302 - Black-Litterman and beyond I"
+#' See Meucci's script for "S_BlackLittermanBasic.m" and
+#' "E 302-\Black-Litterman and beyond I"
#'
-#' @author Xavier Valls \email{flamejat@@gmail.com}
+#' @author Xavier Valls \email{xaviervallspla@@gmail.com}
-##################################################################################################################
+################################################################################
### Load inputs
-data("covNRets");
+data("covNRets")
-##################################################################################################################
+################################################################################
### Compute efficient frontier
-NumPortf = 40; # number of MV-efficient portfolios
-L2L = Log2Lin( covNRets$Mu, covNRets$Sigma );
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/returnanalytics -r 3946
More information about the Returnanalytics-commits
mailing list