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
1 |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.