View source: R/calculate_returns.R
calculate_returns | R Documentation |
Wrapper for TTR:ROC() but with easy periodicity changing.
calculate_returns(closes_xts)
closes_xts |
xts, an xts of closing prices |
An xts of asset returns.
## Not run: if(interactive()){ quantmod::getSymbols('SPY') clhelpers::calculate_returns(SPY[,4]) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.