AddFactor: Add a Factor

Description Usage Arguments Details Value Examples

View source: R/massageData.r

Description

Adds a column of returns to an existing table. Optionally subtracts the returns from each column of the existing table.

Usage

1
AddFactor(factorReturns, newFactorReturns, calcExcess = FALSE)

Arguments

factorReturns

Tibble of existing returns with date in first column.

newFactorReturns

Vector of new returns with date in first column.

calcExcess

If FALSE, no adjustments are made. If TRUE, the newFactorReturns are subtracted from each column of the factorReturns creating excess returns.

Details

If the date columns do not align, the returning table will have the maximum common date range. The first column of both tables of returns be date.

Value

Tibble with new column

Examples

1

rexmacey/factorModel documentation built on Oct. 2, 2019, 1:25 a.m.