Learn R Programming

pa (version 1.2-4)

exposure: Calculate and display the sector exposure of a portfolio

Description

Calculate and display the exposure of a portfolio based on any given category. Both the portfolio and benchmark exposures are displayed.

Usage

exposure(object, var, ...)

Value

Return a matrix if the input object is of class brinson with portfolio, benchmark exposures, and their differences, and return a list if the input object is of class brinsonMulti including portfolio, benchmark exposures, and their differences for each period.

If the input var is categorical, it will show exposure of each sub-groups within the category. If the input var is continuous, it will show exposure of the category in quintiles.

Arguments

object

An object of either class brinson or class brinsonMulti.

var

Any user-defined category whose exposure is to be displayed.

...

Other options.

Author

Yang Lu Yang.Lu@williams.edu

Examples

Run this code

## 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")

exposure(p1, var = "size")

## 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")

exposure(p2, var = "sector")

Run the code above in your browser using DataLab