matchedPortfolio-class {portfolio} | R Documentation |
An object of the class "matchedPortfolio" that contains an object of class "portfolioBasic" and a matrix of weights for portfolios that have been matched to the "portfolioBasic" according to variables specified in a formula.
Objects can be created by calls of the form new("matchedPortfolio", ...)
.
formula
:formula
specifying
the treatment variable and the covariates on which to match.
original
:"portfolioBasic"
,
the attributes of which will be used for matching.
matches
:"matrix"
with a column
for each matched portfolio.
signature(object = "matchedPortfolio")
: prints basic
information about the original
portfolio and its matches.
signature(object = "matchedPortfolio")
: prints detailed
information about the original
portfolio and its matches.
signature(object = "matchedPortfolio")
:
calculates the mean performance across all matched portfolios.
signature(object = "matchedPortfolio", exp.var
= "character")
: calculates the exposure across each variable
in exp.var
.
signature(object = "matchedPortfolio", contrib.var
= "character")
: calculates the contribution across each variable
in contrib.var
.
signature(x = "matchedPortfolio", y = "missing")
:
graphs exposure
and contribution
.
The matches
matrix contains as many rows as there are stocks in
the data
slot of original
and as many columns as there
are matched portfolios. The row labels of the matrix are the values of
original@data[["id.var"]]
and each column is a matched
portfolio. The cell values are the weights of the stock in the
portfolio.
Daniel Gerlanc dgerlanc@gmail.com
m.p <- new("matchedPortfolio")