adjustIntraday.yahoo: Adjust intraday data for dividends and splits

Description Usage Arguments Details Value Note Author(s) See Also

View source: R/adjustIntraday.yahoo.R

Description

Alpha code! Subject to change in the near future! A daily adjustment ratio is calculated using dividend data that is downloaded from yahoo. The ratio is then applied to the data on an intraday basis.

Usage

1
2
3
  adjustIntraday.yahoo(Symbols, adjustVolume = TRUE,
    env = .GlobalEnv, auto.assign = FALSE, store.to = env,
    verbose = TRUE)

Arguments

Symbols

character name of xts object

adjustVolume

if TRUE (default) Volume will be divided by the adjustment ratio

env

the environment where x is stored

auto.assign

assign the adjusted data in the environment named store.to?

store.to

environment in which to store the adjusted data (if auto.assign=TRUE)

verbose

cat progress info to screen?

Details

If the instrument object does not have dividend data in a slot named “div”, the data will be downloaded and put there. Data should be in an xts object. If there is a Volume column, it will be divided by the adjustmet ratio; all other columns will be multiplied by it.

Value

if auto.assign=TRUE (default) the name of the xts object is returned. Otherwise, the adjusted xts object is returned. The Volume column (if there is one) will be moved to become the last column

Note

Currently, adjustBAM will adjust OHLC or BAM data using addition/subtraction of cash flows. Also, it requires that there be a pre-calculated column with Adjusted prices. On the other hand, adjustIntraday.yahoo will multiply the data by an adjustment ratio. Currently, the adjustment ratio does not account for splits. adjustIntraday.yahoo does not require a pre-calculated Adjusted column. I plan to make these functions more similar, and to make the names of the functions more meaningful/representative of what they actually do.

Author(s)

gsee

See Also

qmao:::adjustBAM


qmao documentation built on May 2, 2019, 4:54 p.m.