Description Usage Arguments Value Author(s) See Also Examples
BLViews
and COPViews
are "constructors" for BLViews and COPViews objects respectively.
addBLViews
and addCOPViews
allow one to easily add more views to a pre-existing views objects.
newPMatrix
is a utility function for creating pick matrices.
1 2 3 4 5 6 |
addBLViews(pickMatrix, q, confidences, views)
addCOPViews(pickMatrix, viewDist, confidences, views)
BLViews(P, q, confidences, assetNames)
COPViews(pickMatrix, viewDist, confidences, assetNames)
newPMatrix(assetNames, numViews, defaultValue = 0)
|
P |
"Pick" matrix with columns named after assets to which views correspond |
pickMatrix |
"Pick" matrix with columns named after assets to which views correspond |
q |
"q" vector of views |
confidences |
Vector of confidences in views. Note that confidences are recipricols of standard deviations |
viewDist |
A list of marginal distributions of the views |
views |
A BLViews object |
assetNames |
Names of the assets in the universe |
numViews |
Number of views in the pick matrix |
defaultValue |
Default value to use to fill the new pick matrix |
A BLViews or COPViews class object as appropriate. newPMatrix
creates a matrix.
Francisco Gochez
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ### example from T. M. Idzorek's paper "A STEP-BY-STEP GUIDE TO THE
### BLACK-LITTERMAN MODEL"
## Not run:
pick <- newPMatrix(letters[1:8], 3)
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.00709, 0.000141, 0.000866)
myViews <- BLViews(pick, q = c(0.0525, 0.0025, 0.02), confidences, letters[1:8])
myViews
### Modified COP example from Meucci's "Beyond Black-Litterman: Views on
### non-normal markets"
dispersion <- c(.376,.253,.360,.333,.360,.600,.397,.396,.578,.775) / 1000
sigma <- BLCOP:::.symmetricMatrix(dispersion, dim = 4)
caps <- rep(1/4, 4)
mu <- 2.5 * sigma
dim(mu) <- NULL
marketDistribution <- mvdistribution("mt", mean = mu, S = sigma, df = 5 )
pick <- newPMatrix(c("SP", "FTSE", "CAC", "DAX"), 1)
pick[1,4] <- 1
vdist <- list(distribution("unif", min = -0.02, max = 0))
views <- COPViews(pick, vdist, 0.2, c("SP", "FTSE", "CAC", "DAX"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.