xtsboot: Uses sample function to construct bootstrap error in xts...

Description Usage Arguments

View source: R/bootstrap.R

Description

Uses sample function to construct bootstrap error in xts objects Caution : DO NOT pass large values as sample is a slow function Replace is set to FALSE for sample as multiple xts objects in the same bootstrap subset cause issues in the metric functions The metric is computed for rep times sizefrac*(size) sized samples and the variance of the metric over these tries is returned This is NOT filtered for NA values outside of filtering in the functions we are passing to. This will be fixed. Can be used as a generalized wrapper for metrics that return numeric values from xts

Usage

1
xtsboot(x, fun = NULL, sizefrac = 0.5, rep = 100, flag = 0)

Arguments

x

the xts object ( note : no benchmark xts implemented yet ) , fun = the function, such as Sharpe Ratio

sizefrac

= the size of each bootstrap sample as a fraction of total size, rep = repetitions, flag - 0,1,2 for var,mean,median resp.


AmurG/PerformanceAnalytics documentation built on May 5, 2019, 4:55 a.m.