Description Usage Arguments Details Value Note Author(s) See Also Examples
Create a lagged series from Open and Close price data
1 | LagOC(TS, k=1)
|
TS |
xts Time Series containing Open, High, Low and Close Prices |
k |
periods to lag |
shift series k-periods down, prepending NAs to front of series
A xts object containing lagged Open and Close columns. The original column names are appended with '.Lag.k'
, with k
being the periods to lag.
The returned series maintains the number of observations of the original.
This function uses the Lag function of the quantmod package.
Andreas Voellenklee
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.