Description Usage Arguments Details Value Author(s) Examples
This generic function generates density plots of the marginal posterior and prior distributions of a set of assets in an object of class BLResult
or
COPResult
for comparative purposes.
1 2 | densityPlots(result, assetsSel = NULL, numSimulations = BLCOPOptions("numSimulations"),
...)
|
result |
Object of class |
assetsSel |
A numeric vector of assets to plot |
numSimulations |
For |
... |
Additional arguments passed to |
For COPResults
objects, density kernel estimates from the samples are used
None
Francisco Gochez, <fgochez@mango-solutions>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
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 <- matrix(0, ncol = 4, nrow = 1, dimnames = list(NULL, c("SP", "FTSE", "CAC", "DAX")))
pick[1,4] <- 1
vdist <- list(distribution("unif", min = -0.02, max = 0))
views <- COPViews(pick, vdist, 0.2, c("SP", "FTSE", "CAC", "DAX"))
posterior <- COPPosterior(marketDistribution, views)
densityPlots(posterior, 4)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.