adjust_ohlc: Adjust the first four columns of _OHLC_ data using the...

Description Usage Arguments Details Value Examples

View source: R/rutils.R

Description

Adjust the first four columns of OHLC data using the "adjusted" price column.

Usage

1
adjust_ohlc(oh_lc)

Arguments

oh_lc

An OHLC time series of prices in xts format.

Details

Adjusts the first four OHLC price columns by multiplying them by the ratio of the "adjusted" (sixth) price column, divided by the Close (fourth) price column.

Value

An OHLC time series with the same dimensions as the input series.

Examples

1
2
# Adjust VTI prices
VTI <- rutils::adjust_ohlc(rutils::etf_env$VTI)

algoquant/rutils documentation built on Feb. 26, 2021, 1:30 a.m.