Description Usage Arguments Value Details Revision See Also Examples
Takes a variance matrix (or 3dimensional array) and a vector of weights for the benchmark. An object like the input is returned which includes a new asset representing the benchmark.
1 2  var.add.benchmark(variance, benchmark.weights, name = "benchmark",
sum.to.one = TRUE)

variance 
required.
A variance matrix or a threedimensional array
where each slice of the third dimension is a variance matrix.
This must have dimnames which specify the assets, and it must
include all of the assets named in 
benchmark.weights 
required. A named vector giving the weights of the constituents of the benchmark. 
name 
character string to be used as the asset name for the benchmark. 
sum.to.one 
logical vector stating whether to check and enforce that

a matrix or array similar to the input variance
, but including
an additional asset.
The (absolute value of) the weights ideally sum to one. You can give it weights that do not sum to one (perhaps they sum to 100 or the market cap of the benchmark), but you will get a warning that the weights are being adjusted.
If your "benchmark" is something that doesn't sum to 1 (such as
portfolio weights minus benchmark weights), then set the sum.to.one
argument to FALSE
.
This help was last revised 2012 January 20.
var.relative.benchmark
, var.shrink.eqcor
,
factor.model.stat
, threeDarr
.
1 2 3 4 5 6 7 8 9  ## Not run:
varian.ben < var.add.benchmark(varian, ftse.constituents, "ftse100")
## End(Not run)
var.orig < array(c(400, 32, 24, 32, 64, 9.6, 24, 9.6, 144), c(3,3),
list(c("equities", "bonds", "commodities"),
c("equities", "bonds", "commodities")))
var.aa < var.add.benchmark(var.orig, c(equities=.6, bonds=.4), "e60b40")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.