I would like to extract the returns from the backtest package which are according the to the manual stored within a 5 dimensional array called 'results')
This is the backtest package:
https://cran.r-project.org/web/packages/backtest/backtest.pdf
A simple example looks like this:
library(backtest)
data(starmine)
bt <- backtest(starmine, in.var = c("smi"),
ret.var = "ret.0.1.m", date.var = "date",
id.var = "id", buckets = 10,
natural = TRUE, by.period = TRUE)
summary(bt)
When you run the summary command, it will print out the return series for each decile. I would like to extract those into a dataframe that I can use for further analysis.
Does someone know, how I can access the return series or extract it?