brinson: Creating an object of either class brinson or class...

Description Usage Arguments Value Author(s) Examples

View source: R/brinson.R

Description

Conduct Brinson analysis for equity portfolio attribution. Create a class object of either brinson for a single-period data set or brinsonMulti for a multi-period data set.

Usage

1
2
brinson(x, date.var = "date", cat.var = "sector", bench.weight =
"benchmark", portfolio.weight = "portfolio", ret.var = "return") 

Arguments

x

A data frame containing the data from which brinson analysis will be conducted.

date.var

A character vector which indicates the name of the column in x to be used as a date for each observation. If the unique number of levels of date.var is one, a class object of brinson will be formed. If it is more than one, a class object of brinsonMulti will be formed.

cat.var

A character vector which indicates the name of the column in x to be used as categorical variables.

bench.weight

A character vector which indicates the name of the column or columns in x to be used as benchmark weight.

portfolio.weight

A character vector which indicates the name of the column or columns in x to be used as portfolio weight.

ret.var

A character vector which indicates the name of the column in x to be used as return variable.

Value

Return an object of class brinson when there is only one unique date in the data frame x. Otherwise, an object of class brinsonMulti is returned.

Author(s)

Yang Lu [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Single-period brinson analysis

data(jan)

p1 <- brinson(x = jan, date.var = "date", cat.var = "sector",
bench.weight = "benchmark", portfolio.weight = "portfolio", ret.var =
"return")

summary(p1)

## Multi-period brinson analysis

data(quarter)

p2 <- brinson(x = quarter, date.var = "date", cat.var = "sector",
bench.weight = "benchmark", portfolio.weight = "portfolio", ret.var =
"return")

summary(p2)

pa documentation built on May 29, 2017, 11:44 a.m.