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
:an object of class formula
specifying
the treatment variable and the covariates on which to match.
original
:an object of class "portfolioBasic"
,
the attributes of which will be used for matching.
matches
:Object of class "matrix"
with a column
for each matched portfolio.
method
:Object of class "character"
specifying
the matching method used to generate the matched portfolio.
omitted.control
:Object of class "numeric"
containing the number of observations omitted from the control.
omitted.treatment
:Object of class "numeric"
containing the number of observations omitted from the treatment.
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
.
Daniel Gerlanc dgerlanc@gmail.com
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.
portfolioBasic-class
m.p <- new("matchedPortfolio")
Run the code above in your browser using DataLab