Commit 6a30f2e6 authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 0.10-3

parent 72ba37ed
2006-06-04 G. Grothendieck <ggrothendieck@gmail.com>
* R/finance.R (get.hist.quote)
* man/get.hist.quote.Rd:
added 'drop=' argument to get.hist.quote. Defaults to FALSE
(i.e., previous behavior).
2006-06-26 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> 2006-06-26 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
* DESCRIPTION (Version): New version is 0.10-2. * DESCRIPTION (Version): New version is 0.10-2.
......
Package: tseries Package: tseries
Version: 0.10-2 Version: 0.10-3
Date: 2006-06-26 Date: 2006-06-26
Title: Time series analysis and computational finance Title: Time series analysis and computational finance
Author: Compiled by Adrian Trapletti <a.trapletti@swissonline.ch> Author: Compiled by Adrian Trapletti <a.trapletti@swissonline.ch>
...@@ -8,4 +8,4 @@ Description: Package for time series analysis and computational finance ...@@ -8,4 +8,4 @@ Description: Package for time series analysis and computational finance
Depends: R (>= 2.2.0), quadprog, zoo Depends: R (>= 2.2.0), quadprog, zoo
Suggests: its Suggests: its
License: GPL (see file COPYING) License: GPL (see file COPYING)
Packaged: Mon Jun 26 10:08:37 2006; hornik Packaged: Mon Jun 26 21:48:01 2006; hornik
...@@ -139,13 +139,14 @@ function (instrument = "^gdax", start, end, ...@@ -139,13 +139,14 @@ function (instrument = "^gdax", start, end,
provider = c("yahoo", "oanda"), method = NULL, provider = c("yahoo", "oanda"), method = NULL,
origin = "1899-12-30", compression = "d", origin = "1899-12-30", compression = "d",
retclass = c("zoo", "its", "ts"), retclass = c("zoo", "its", "ts"),
quiet = FALSE) quiet = FALSE, drop = FALSE)
## Added new argument 'compression'. ## Added new argument 'compression'.
## May be "d", "w" or "m", for daily weekly or monthly. ## May be "d", "w" or "m", for daily weekly or monthly.
## Defaults to "d". ## Defaults to "d".
## John Bollinger, 2004-10-27, www.BollingerBands.com, bbands@yahoo.com ## John Bollinger, 2004-10-27, www.BollingerBands.com, bbands@yahoo.com
## ##
## Changed POSIXct class to Date class, 2005-03-31 ## Changed POSIXct class to Date class, 2005-03-31
## Added drop= arg, 2006-06-04
{ {
if(missing(start)) start <- "1991-01-02" if(missing(start)) start <- "1991-01-02"
if(missing(end)) end <- format(Sys.Date() - 1, "%Y-%m-%d") if(missing(end)) end <- format(Sys.Date() - 1, "%Y-%m-%d")
...@@ -237,11 +238,13 @@ function (instrument = "^gdax", start, end, ...@@ -237,11 +238,13 @@ function (instrument = "^gdax", start, end,
y <- matrix(NA, nr = max(ind), nc = length(nser)) y <- matrix(NA, nr = max(ind), nc = length(nser))
y[ind, ] <- as.matrix(x[, nser, drop = FALSE]) y[ind, ] <- as.matrix(x[, nser, drop = FALSE])
colnames(y) <- names(x)[nser] colnames(y) <- names(x)[nser]
y <- y[, seq(along = nser), drop = drop]
return(ts(y, start = jdat[n], end = jdat[1])) return(ts(y, start = jdat[n], end = jdat[1]))
} else { } else {
x <- as.matrix(x[, nser, drop = FALSE]) x <- as.matrix(x[, nser, drop = FALSE])
rownames(x) <- NULL rownames(x) <- NULL
y <- zoo(x, dat) y <- zoo(x, dat)
y <- y[, seq(along = nser), drop = drop]
if(retclass == "its") { if(retclass == "its") {
if("package:its" %in% search() || require("its", quietly = TRUE)) { if("package:its" %in% search() || require("its", quietly = TRUE)) {
index(y) <- as.POSIXct(index(y)) index(y) <- as.POSIXct(index(y))
......
...@@ -8,10 +8,10 @@ citEntry(entry = "Manual", ...@@ -8,10 +8,10 @@ citEntry(entry = "Manual",
person(first = "Kurt", last = "Hornik", person(first = "Kurt", last = "Hornik",
email = "Kurt.Hornik@R-project.org")), email = "Kurt.Hornik@R-project.org")),
year = 2006, year = 2006,
note = "R package version 0.10-2", note = "R package version 0.10-3",
url = "http://CRAN.R-project.org/", url = "http://CRAN.R-project.org/",
textVersion = { textVersion = {
paste("Adrian Trapletti and Kurt Hornik (2006).", paste("Adrian Trapletti and Kurt Hornik (2006).",
"tseries: Time Series Analysis and Computational Finance.", "tseries: Time Series Analysis and Computational Finance.",
"R package version 0.10-2.") "R package version 0.10-3.")
}) })
...@@ -10,7 +10,7 @@ get.hist.quote(instrument = "^gdax", start, end, ...@@ -10,7 +10,7 @@ get.hist.quote(instrument = "^gdax", start, end,
quote = c("Open", "High", "Low", "Close"), quote = c("Open", "High", "Low", "Close"),
provider = c("yahoo", "oanda"), method = NULL, provider = c("yahoo", "oanda"), method = NULL,
origin = "1899-12-30", compression = "d", origin = "1899-12-30", compression = "d",
retclass = c("zoo", "its", "ts"), quiet = FALSE) retclass = c("zoo", "its", "ts"), quiet = FALSE, drop = FALSE)
} }
\arguments{ \arguments{
\item{instrument}{a character string giving the name of the quote \item{instrument}{a character string giving the name of the quote
...@@ -50,14 +50,17 @@ get.hist.quote(instrument = "^gdax", start, end, ...@@ -50,14 +50,17 @@ get.hist.quote(instrument = "^gdax", start, end,
\code{"its"} (with \code{"POSIXct"} index) or \code{"ts"} (with \code{"its"} (with \code{"POSIXct"} index) or \code{"ts"} (with
numeric index corresponding to days since \code{origin}).} numeric index corresponding to days since \code{origin}).}
\item{quiet}{logical. Should status messages (if any) be suppressed?} \item{quiet}{logical. Should status messages (if any) be suppressed?}
\item{drop}{logical. If \code{TRUE} the result is coerced to the
lowest possible dimension. Default is \code{FALSE}.}
} }
\value{ \value{
A time series containing the data either as a \code{"zoo"} series (default), A time series containing the data either as a \code{"zoo"} series
a \code{"its"} series or \code{"ts"} series. The "zoo" series is created with (default), a \code{"its"} series or \code{"ts"} series. The
\code{\link[zoo]{zoo}} and has an index of class \code{"Date"}. For \code{"zoo"} series is created with \code{\link[zoo]{zoo}} and has an
returning an \code{"its"} series, \code{\link[its]{its}} has to be available. index of class \code{"Date"}. For returning an \code{"its"} series,
\code{"its"} series always have an index of class \code{"POSIXct"}. \code{\link[its]{its}} has to be available. \code{"its"} series
If a \code{"ts"} series is returned, the index is in physical time, i.e., weekends, always have an index of class \code{"POSIXct"}. If a \code{"ts"}
series is returned, the index is in physical time, i.e., weekends,
holidays, and missing days are filled with \code{NA}s if not holidays, and missing days are filled with \code{NA}s if not
available. The time scale is given in Julian dates (days since the available. The time scale is given in Julian dates (days since the
\code{origin}). \code{origin}).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment