cal_period_attr: Calculcate portfolio Attribution over time

Description Usage Arguments Author(s) Examples

View source: R/cal_period_attr.R

Description

This function allows you to calculate attribution overtime based on the Bloomberg Performance Attribution method

Usage

1
cal_period_attr(df, df_benchmark, classify_file, now_date, period, output_file)

Arguments

df

portfolio dataframe ("Date", "Ticker", "Return", "Weight")

df_benchmark

benchmark portfolio dataframe

classify_file

name of csv file contains ticker label (file saved in Code/Data)

now_date

character, end day for the period (eg. "2017-08-12")

period

character, lookback period for contribution calculations

output_file

output csv file name (file saved in Output File)

Author(s)

Alfred

Examples

1
cal_period_attr(iccix, "ICCIX_Classifiy", "2017-05-31", "Year", "ICCIX")

Alfred-Zhang/ResearchTools documentation built on Nov. 23, 2017, 1:54 a.m.