View source: R/construct_rebalance_infrastructure.R
construct_rebalance_infrastructure | R Documentation |
Prepares a snoop_rolling
object before passing it through rebalance_portfolio
.
construct_rebalance_infrastructure( .data, .by = c("day", "week", "month", "year") )
.data |
A tabular (non-tidy) |
.by |
A |
A tibble
of the snoop_rebalance
class. Contains 3 columns:
.date
, .analysis
and .assessment
.
stocks <- tibble::tibble( time = as.Date('2009-01-01') + 0:99, X = rnorm(100, 0, 1), Y = rnorm(100, 0, 2), Z = rnorm(100, 0, 4) ) roll <- construct_rolling_infrastructure(stocks, .initial = 50) const <- construct_rebalance_infrastructure(roll) const # Contains information under the hood: class(const)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.