stitch_statfolio: Create statistical equity curves by randomly stitching a...

Description Usage Arguments Value See Also

View source: R/stitch_statfolio.R

Description

This function assumes that wfodata has been created using function wfo_statfolio. This latter function runs a portfolio optimization multiple times at each rebalance dates, creating a set of slightly different weights at each WFO rebalance date. Function stitch_statfolio then randonly picks a set of these weights at each WFO rebalance date to build N equity curves. The resulting equity curves therefore show slightly different paths to help portray how sensitive a portfolio rebalance strategy may be with respect to asset weights.

Usage

1
2
stitch_statfolio(wfodata, Ncurves = 10, max_offset = 0,
  offset_type = "none", norm_weights = TRUE)

Arguments

wfodata

A statfolio with class optimize.portfolio.rebalancing, with the additional items related to statfolio within element $opt_rebalancing. A statfolio is created by calling function wfo_statfolio.

Ncurves

The number of equity curves created and returned.

max_offset

The maximum trading delay (in days) from the ideal rebalancing date.

offset_type

The type of trading delay offset to perform, if any. If set to "none", then no trading delay are performed, meaning that the rebalancing is done on the day specified in the wfodata list, at the market's close. If "random" is specified, then a random trading delay offset is performed from 0 to max_offset days. If "fixed" is specified, then rebalancing is performed exactly max_offset days after the day specified in the wfodata list.

Value

Returns an xts matrix of equity curves. Each equity curve in the matrix corresponds to a selected path from randomly choosing one set of weight at each rebalance date, and with the rebalancing possibly delayed as specified by arguments max_offset and offset_type.

See Also

wfo_statfolio


jeanmarcgp/ResilientPortfolio documentation built on April 8, 2018, 5:43 p.m.