save_rets_ohlc | R Documentation |
*.RData
’ file, without aggregation.Load OHLC time series data for a single symbol, calculate its returns,
and save them to a single ‘*.RData
’ file, without aggregation.
save_rets_ohlc(
symbol,
data_dir = "E:/output/data/",
output_dir = "E:/output/data/"
)
The function save_rets_ohlc()
loads OHLC time series
data from a single file. It then calculates returns using function
ohlc_returns()
, and stores them in a variable named
‘symbol.rets
’, and saves them to a file called
‘symbol.rets.RData
’.
A time series of returns and volume in xts format.
## Not run:
save_rets_ohlc("SPY")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.