save_rets_ohlc: Load _OHLC_ time series data for a single symbol, calculate...

View source: R/HighFreq.R

save_rets_ohlcR Documentation

Load OHLC time series data for a single symbol, calculate its returns, and save them to a single ‘*.RData’ file, without aggregation.

Description

Load OHLC time series data for a single symbol, calculate its returns, and save them to a single ‘*.RData’ file, without aggregation.

Usage

save_rets_ohlc(
  symbol,
  data_dir = "E:/output/data/",
  output_dir = "E:/output/data/"
)

Details

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’.

Value

A time series of returns and volume in xts format.

Examples

## Not run: 
save_rets_ohlc("SPY")

## End(Not run)


algoquant/HighFreq documentation built on Feb. 9, 2024, 8:15 p.m.