make_linear_allocation_path: Create an allocation path with linear interpolation

Description Usage Arguments Value

View source: R/allocations.R

Description

Give a list of n asset_names, a list of k dates, and k+1 lists of n percents, will return an allocation function that changes by linear interpolation from one percent to the next on the specified dates. If a date is given before the first change or after the last change, it returns a constant allocation.

Usage

1
make_linear_allocation_path(asset_names, change_dates, asset_percents)

Arguments

asset_names

a vector of strings identifying each holding

change_dates

a vector of dates indicating when to change target allocations; these function as the "knots" of the interpolation

asset_percents

a list of vectors of numbers between 0 and 1 identifying the percentage desired of each holding. See above for structure.

Value

an allocation path object#' @param asset_names names of holdings


ryanholbrook/investmentsim documentation built on Nov. 5, 2019, 5:10 a.m.