| regression-class {pa} | R Documentation |
Class "regression"
Description
Class "regression" holds the results of an original portfolio, its benchmark, and the results of regression analysis of a single-period portfolio.
Slots
date.var:Object of class
"character"storing the name of the date column in the class object.ret.var:Object of class
"character"storing the name of the return variable.reg.var:Object of class
"character"storing the name of the regressors.benchmark.weight:Object of class
"character"storing the name of the benchmark weight variable.portfolio.weight:Object of class
"character"storing the name of the portfolio weight variable in the universe dataframe.coefficients:Object of class
"numeric"storing the estimated coefficients of the regression model.benchmark.ret:Object of class
"matrix"storing the benchmark return of the input portfolio.portfolio.ret:Object of class
"matrix"storing the portfolio return of the input portfolio.act.ret:Object of class
"matrix"storing the active return of the input portfolio.act.expo:Object of class
"numeric"storing the active exposure according to the regressors.contrib:Object of class
"numeric"storing the contribution of the regressors according to the input.universe:Object of class
"data.frame"storing the entire input data frame.
Methods
- exposure
signature(object = "regression"): Calculate and display the exposure of the input category of a portfolio.- plot
signature(x = "regression", y = "missing"): Plot the exposure or the return of a regression class object.- returns
signature(object = "regression"): Calculate the contribution of various effects based on the regression analysis.- show
signature(object = "regression"): Summarize the essential information about the portfolio.- summary
signature(object = "regression"): Summarize the portfolio and the regression-based attribution.
Author(s)
Yang Lu yang.lu@williams.edu
Examples
## Single-period regression analysis
data(jan)
r1 <-regress(x = jan, date.var = "date", ret.var = "return", reg.var = c("sector",
"value", "growth"), benchmark.weight = "benchmark", portfolio.weight =
"portfolio")
summary(r1)