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

View source: R/rutils.R

adjust_ohlcR Documentation

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

Description

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

Usage

adjust_ohlc(ohlc)

Arguments

ohlc

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

# Adjust VTI prices
VTI <- rutils::adjust_ohlc(rutils::etfenv$VTI)

algoquant/rutils documentation built on April 18, 2024, 12:05 a.m.