BLPosterior: Compute the posterior distribution of the market according...

Description Usage Arguments Details Value Author(s) Examples

Description

BLPosterior is a wrapper function that makes it easy to compute the posterior mean and covariance of the returns of an asset set (specified as a matrix ) in one go. It computes the market parameters automatically and then calls posteriorEst. posteriorEst is the "core" function of the model.

Usage

1
2
BLPosterior(returns, views, tau = 1, marketIndex, riskFree = NULL, kappa = 0, covEstimator = "cov")
posteriorEst(views, mu, tau = 0.5, sigma, kappa = 0)

Arguments

returns

A matrix of time series of returns. The columns should correspond to individual assets.

views

An object of class BLViews

tau

The "tau" parameter in the Black-Litterman model.

marketIndex

A set of returns of a market index.

riskFree

A time series of risk-free rates of return. Defaults to 0

mu

A vector of mean equilibrium returns

sigma

The variance-covariance matrix of the returns of the assets

kappa

If greater than 0, the confidences in each view are replaced. See the details section for more information

covEstimator

A string holding the name of the function that should be used to estimate the variance-covariance matrix. This function should simply return a matrix.

Details

Some authors have suggested that the confidences should not be set by the analyst but rather should just be equal to kappa * t(P) %*% Sigma %*% P. Setting kappa > 0 will cause this to happen. In BLPosterior, the equilibrium return means are computed with CAPMList.

Value

An object of class BLResult

Author(s)

Francisco Gochez <fgochez@mango-solutions.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 
## example from Thomas M. Idzorek's paper "A STEP-BY-STEP GUIDE TO THE BLACK-LITTERMAN MODEL"
x <- c(0.001005,0.001328,-0.000579,-0.000675,0.000121,0.000128,-0.000445,-0.000437 ,
     0.001328,0.007277,-0.001307,-0.000610,-0.002237,-0.000989,0.001442,-0.001535 ,
     -0.000579,-0.001307,0.059852,0.027588,0.063497,0.023036,0.032967,0.048039 ,
    -0.000675,-0.000610,0.027588,0.029609,0.026572,0.021465,0.020697,0.029854 ,
     0.000121,-0.002237,0.063497,0.026572,0.102488,0.042744,0.039943,0.065994 ,
     0.000128,-0.000989,0.023036,0.021465,0.042744,0.032056,0.019881,0.032235 ,
    -0.000445,0.001442,0.032967,0.020697,0.039943,0.019881,0.028355,0.035064 ,
    -0.000437,-0.001535,0.048039,0.029854,0.065994,0.032235,0.035064,0.079958 )

    varCov <- matrix(x, ncol = 8, nrow = 8)
    mu <- c(0.08, 0.67,6.41, 4.08, 7.43, 3.70, 4.80, 6.60) / 100
    pick <- matrix(0, ncol = 8, nrow = 3, dimnames = list(NULL, letters[1:8]))
    pick[1,7] <- 1
    pick[2,1] <- -1; pick[2,2] <- 1
    pick[3, 3:6] <- c(0.9, -0.9, .1, -.1)
    confidences <- 1 / c(0.000709, 0.000141, 0.000866)
    myViews <- BLViews(pick, c(0.0525, 0.0025, 0.02), confidences, letters[1:8])
    myPosterior <- posteriorEst(myViews, tau = 0.025, mu, varCov )
    myPosterior

BLCOP documentation built on May 2, 2019, 6:15 p.m.

Related to BLPosterior in BLCOP...