Description Usage Arguments Details Value Author(s) Examples
At every timestamp, add to the prices the cumulative amount of dividends receieved since the beginning of the dataset.
1 | AddCumDiv(x, name, env = .GlobalEnv)
|
x |
xts or character name of xts object |
name |
name of stock to use when getting dividends |
env |
environment in which to find |
After a series has been adjusted, an "adj" attr of TRUE
is added to the object. If the object already has an
"adj" attr, the original object x
will be returned
and no adjustment will be made.
cumulative dividends will only be added to columns with names that include one of the following terms: Open, High, Low, Close, Bid.Price, Ask.Price, Trade.Price, Mid.Price.
TODO: make a function that does the opposite of this one.
xts object with same dims as x
that is the
original x
with cumulative dividends added. An
attr
called “cumdiv” that contains an xts
of the cumulative dividends will be added to the returned
object
Garrett See
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.