createIndex: Create a benchmark index

Description Usage Arguments Details Author(s) Examples

View source: R/createIndex.R

Description

This function will return a time series of either monthly rebalanced or quarterly rebalanced benchmark

Usage

1
createIndex(dt, weight, fix = F, window = 21, frequence = "Quarterly")

Arguments

dt

portfolio data table or data frame

weight

portfolio weight, vector of numeric

fix

boolean, use fixed rebalancing window, true or false

window

numeric, rebalancing window

frequence

character, options: monthly or quarterly

Details

The first col should be date. And if fix is T, then frequence is ignored

Author(s)

Alfred

Examples

1
2
createIndex(df, c(0.7, 0.3), "monthly")
createIndex(df, c(0.7, 0.3), fix=T, window=21)

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