Usage
timeSeries(data, charvec, units = NULL, format = "ISO", zone = "GMT",
FinCenter = myFinCenter, title = NULL, documentation = NULL, ...)
read.timeSeries(file, zone = "GMT", FinCenter = "", title = "",
documentation = "", sep = ";")
as.timeSeries(x, dimnames = TRUE, format = "")
is.timeSeries(object)
## S3 method for class 'timeSeries':
print(x, ...)
## S3 method for class 'timeSeries':
plot(x, reference.grid = TRUE, lty = 1, ...)
## S3 method for class 'timeSeries':
lines(x, ...)
## S3 method for class 'timeSeries':
Ops(e1, e2)
## S3 method for class 'timeSeries':
[(x, i = min(1, nrow(x@Data)):nrow(x@Data),
j = min(1, ncol(x@Data)):ncol(x@Data))
## S3 method for class 'timeSeries':
head(x, \dots)
## S3 method for class 'timeSeries':
tail(x, \dots)
seriesData(object)
seriesPositions(object)
## S3 method for class 'timeSeries':
start(x, \dots)
## S3 method for class 'timeSeries':
end(x, \dots)
## S3 method for class 'timeSeries':
as.vector(x, mode = "any")
## S3 method for class 'timeSeries':
as.matrix(x)
## S3 method for class 'timeSeries':
as.data.frame(x, row.names = NULL, optional = NULL)
applySeries(x, from = NULL, to = NULL, FUN = colAvgs, colNames = NULL, ...)
cutSeries(x, from, to)
diffSeries(x, lag = 1, diff = 1, trim = FALSE, pad = NA)
lagSeries(x, k = 1, trim = FALSE, colNames = NULL)
mergeSeries(x, y, units = NULL)
returnSeries(x, type = c("continuous", "discrete"), percentage = FALSE,
trim = TRUE, digits = 4)
revSeries(x)
alignDailySeries(x, method = c("before", "after", "interp", "fillNA"),
include.weekends = FALSE)
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", ...)
Arguments
charvec
a character vector of dates and times.
colNames
[applySeries][lag] -
a character string, which allows to overwrite the current
column names of a timeSeries
object. By default
NULL
which means that the column names are selected
automatically.
colOrder
[ohlcDailyPlot] -
an integer vector which gives the order of the prices and the
volume in the input object. By default the following order of
columns from 1 to 5 is assumed: Open, high, low, close, and volume.
data
a data.frame
or a matrix
object of numeric data.
diff
[diffSeries] -
an integer indicating the order of the difference. By default 1.
digits
[returnSeries] -
an integer value. The number of digits to be printed in the
output.
dimnames
[as.timeSeries] -
a logical, if TRUE
the dimension names of the
matrix are assigned to the time series object.
documentation
optional documentation string, or a vector of character strings.
e1, e2
[Ops] -
two objects of class timeSeries
.
file
the filename of a spreadsheet data set from which
to import the data records.
FinCenter
a character with the the location of the financial center named
as "continent/city".
format
the format specification of the input character vector,
[as.timeSeries] -
a character string with the format in POSIX notation to be passed
to the time series object.
from, to
starting date and end date, to
must be after from
.
FUN
[applySeries] -
a function to use for aggregation, by default colAvgs
.
grid.lty, grid.nx
[ohlcDailyPlot] -
The type of grid line and the number of grid lines used in the
plot.
i, j
["["] -
index arguments used for subsettings.
include.weekends
[alignDailySeries] -
a logical value. Should weekend dates be included or removed
from the series.
k
[lagSeries] -
an integer value. The number of lags (in units of observations).
By default 1.
lag
[diffSeries] -
an integer indicating which lag to use. By default 1.
lty
[plot] -
an integer value, the typ of line to be drawn. By default 1,
a solid line.
main
[ohlcDailyPlot] -
a character string to title the price and volume plot.
method
[alignDailySeries] -
the method to be used for the alignment. A character string, one
of "before"
, use the data from the row whose position is
just before the unmatched position, or "after"
, use the
d
mode
[as.vector] -
A character string giving an atomic mode, or "any"
.
optional, row.names
[as.data.frame] -
both arguments are currently not used.
object
[is][seriesData][seriesPositions] -
an object of class timeSeries
.
pad
[diffSeries] -
which value should get the padded values? By default NA
.
Another choice often used would be zero.
percentage
[returnSeries] -
a logical value. By default FALSE
, if TRUE
the
series will be expressed in percentage changes.
reference.grid
[plot] -
a logical value. Should a grid be added to the plot? By
default TRUE
.
sep
[read.timeSeries] -
the field seperator used in the spreadsheet file to separate
columns.
title
an optional title string, if not specified the inputs data
name is deparsed.
trim
[diffSeries][returnSeries] -
a logical value. By default TRUE
, the first missing
observation in the return series will be removed.
type
[returnSeries] -
a character string specifying how to compute the returns. Valid
choices are: continuous
and discrete
. For the
default type="continuous"
, the returns are calculated as
t
units
an optional units string, NULL
defaults an empty string.
[mergeSeries] -
an integer string or vector which allows to rename the units
in the units Slot of the timeSeries
object.
[ohlcDailyPlot] -
a
volume
[ohlcDailyPlot] -
a logigical value. Should a volume plot added to the OHLC Plot.
By default TRUE
.
x
[as] -
a matrix
type object to be converted.
[as.vector][as.matrix][as.data.frame] -
[applySeries] -
[cut][end][mergeSeries][plot][print][rev][start] -
an object of class timeSeries
.
xlab, ylab
[ohlcDailyPlot] -
two string vectors to name the x and y axis of the price and
volume plot.
y
[mergeSeries] -
a matrix
type object to be merged with an object of
class timeSeries
. Must have the same number of rows.
zone
the time zone or financial center where the data were recorded.
...
arguments passed to other methods.