R/make_rets_xts.R

Defines functions make_rets_xts

Documented in make_rets_xts

#' @title make_rets_xts
#' @description Makes an xts of returns from a string of symbols.
#' @param asset_symbols character, a string of asset_symbols
#' @param n integer, passed to utils::tail(), Default: 430
#' @param ret_periodicity character, the return periodicity which is passed to `xts::endpoints()`, Default: 'days'
#' @return An xts of asset returns.
#' @export 
make_rets_xts <- function(asset_symbols, n = 430, ret_periodicity = 'days')
{
  calculate_returns(make_closes_xts(asset_symbols, n, ret_periodicity))
}
causality-loop/clhelpers documentation built on Aug. 31, 2022, 3:39 a.m.