| SpecialDailySeries {timeSeries} | R Documentation |
Special daily 'timeSeries' functions.
dummyDailySeries | Creates a dummy daily 'timeSeries' object, |
alignDailySeries | Aligns a daily 'timeSeries' to new positions, |
rollDailySeries | Rolls daily a 'timeSeries' on a given period, |
ohlcDailyPlot | Plots open high low close bar chart, |
dummySeries | Creates a dummy monthly 'timeSeries' object |
dummyDailySeries(x = rnorm(365), units = NULL, zone = "",
FinCenter = "")
alignDailySeries(x, method = c("before", "after", "interp", "fillNA"),
include.weekends = FALSE, units = NULL, zone = "",
FinCenter = "")
rollDailySeries(x, period = "7d", FUN, ...)
ohlcDailyPlot(x, volume = TRUE, colOrder = c(1:5), units = 1e6,
xlab = c("Date", "Date"), ylab = c("Price", "Volume"),
main = c("O-H-L-C", "Volume"), grid.nx = 7, grid.lty = "solid", ...)
colOrder |
[ohlcDailyPlot] - |
FinCenter |
a character with the the location of the financial center named as "continent/city". |
FUN |
the function to be applied. |
grid.lty, grid.nx |
[ohlcDailyPlot] - |
include.weekends |
[alignDailySeries] - |
main |
[ohlcDailyPlot] - |
method |
[alignDailySeries] - |
period |
[rollDailySeries] - |
units |
[allignDailySeries] - |
volume |
[ohlcDailyPlot] - |
x |
an object of class |
xlab, ylab |
[ohlcDailyPlot] - |
zone |
the time zone or financial center where the data were recorded. |
... |
arguments passed to other methods. |
dummyDailySeries
creates from a numeric matrix with daily records of unknown dates a
timeSeries object with dummy daily dates.
alignDailySeries
returns from a daily time series with missing holidays a weekly
aligned daily timeSeries object
rollDailySeries
returns an object of class timeSeries with rolling values,
computed from the function FUN.
ohlcDailyPlot
displays a Open-High-Low-Close Plot of daily data records.
## Load Microsoft Data -
setRmetricsOptions(myFinCenter = "GMT")
data(MSFT)
head(MSFT)
## Cut out April Data from 2001 -
Close = MSFT[, "Close"]
tsApril01 = window(Close, "2001-04-01", "2001-04-30")
tsApril01
## Align with NA -
tsRet = returns(tsApril01, trim = TRUE)
GoodFriday(2001)
EasterMonday(2001)
alignDailySeries(tsRet, method = "fillNA", include.weekends = FALSE)
alignDailySeries(tsRet, method = "fillNA", include.weekends = TRUE)
## Interpolate -
alignDailySeries(tsRet, method = "interp", include.weekend = FALSE)
alignDailySeries(tsRet, method = "interp", include.weekend = TRUE)