Learn R Programming

quantmod (version 0.2-5)

OHLC.Transformations: Extract and Transform quantmod.OHLC Columns

Description

Extract (transformed) data from an object of class quantmod.OHLC. Column names must contain the complete description - either Open, High, Low, Close, Volume, or Adjusted. This is the default for objects of class quantmod.OHLC In the case of functions consisting of combined Op, Hi, Lo, Cl (e.g. ClCl(x)) the one period transformation will be applied.

For example, to return the Open to Close of a particular quantmod.OHLC object it is necessary to call OpCl(x). If multiple periods are desired a call to the function Delt is necessary.

These functions are merely for speed the model specification process. All columns may also be extracted through standard R methods

Usage

Op(x)
Hi(x)
Lo(x)
Cl(x)
Vo(x)
Ad(x)

OpCl(x) ClCl(x) HiCl(x) LoCl(x) LoHi(x) OpHi(x) OpLo(x) OpOp(x)

Arguments

x
An object of class quantmod.OHLC

Value

  • Returns an object of class zoo

Details

Internally, the code uses grep to locate the appropriate columns. Therefore it is necessary to use inputs with column names matching the requirements in the description section

See Also

specifyModel

Examples

Run this code
getSymbols('IBM',src='yahoo')
Ad(IBM)
Cl(IBM)
ClCl(IBM)
removeSymbols('IBM')

Run the code above in your browser using DataLab