Commit 35f2228f authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 0.10-34

parent 6dfa7d0e
2015-02-20 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION (Version): New version is 0.10-34.
* R/finance.R (get.hist.quote): Fix problems with new oanda format
reported by Bert Tijhuis <bert.tijhuis@xs4all.nl>.
2015-02-10 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION (Version): New version is 0.10-33.
......
Package: tseries
Version: 0.10-33
Version: 0.10-34
Title: Time Series Analysis and Computational Finance
Authors@R: c(person("Adrian", "Trapletti", role = "aut",
email = "adrian@trapletti.org"),
......@@ -12,11 +12,11 @@ Depends: R (>= 2.10.0)
Suggests: its
Imports: graphics, stats, utils, quadprog, zoo
License: GPL-2
Packaged: 2015-02-10 17:08:32 UTC; hornik
Packaged: 2015-02-20 12:43:13 UTC; hornik
Author: Adrian Trapletti [aut],
Kurt Hornik [aut, cre],
Blake LeBaron [ctb] (BDS test code)
Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2015-02-10 18:36:00
Date/Publication: 2015-02-20 14:16:24
3ae2c49c0af60b42d01326ac5ca7494a *ChangeLog
5d1beb0908b7a8f1a427b8ccfb852791 *DESCRIPTION
1f7df3bbc28b1e4560b1934e013fa966 *ChangeLog
b16d17e1178d7c3d195e9e17b5d8434e *DESCRIPTION
2b3f182ac38fa94b06b0950bda63e2a1 *NAMESPACE
434cfb7f2cdc1fe1cab1922e3fb0e3d8 *R/arma.R
07854a9470314f8e61d437c7949db01a *R/finance.R
f281a3ee8caaea857833bc77bad1e44a *R/finance.R
f3d8df961e5a15c7e356a4566424e175 *R/garch.R
decf4a3134c069cf9d2dbc79b1b60706 *R/irts.R
d8a4828240a6352c63178d67daa65578 *R/test.R
......
......@@ -303,26 +303,29 @@ function (instrument = "^gdax", start, end,
unlink(destfile)
stop(paste("download error, status", status))
}
x <- read.csv(destfile, skip = 4, as.is = TRUE, header = TRUE)
unlink(destfile)
x <- head(x, -3)
dat <- as.Date(x[[1]])
dat <- rev(as.Date(x[[1]]))
n <- length(dat)
if(!quiet && (dat[1] != start))
cat(format(dat[1], "time series starts %Y-%m-%d\n"))
if(!quiet && (dat[n] != end))
cat(format(dat[n], "time series ends %Y-%m-%d\n"))
val <- rev(x[[2]])
if(is.character(val))
val <- as.numeric(sub(",", "", val, fixed = TRUE))
if(retclass == "ts") {
jdat <- unclass(julian(dat, origin = as.Date(origin)))
ind <- jdat - jdat[1] + 1
y <- rep.int(NA, max(ind))
y[ind] <- x[[2]]
y[ind] <- val
return(ts(y, start = jdat[1], end = jdat[n]))
} else {
y <- zoo(x[[2]], dat)
y <- zoo(val, dat)
if(retclass == "its") {
if(inherits(tryCatch(getNamespace("its"), error = identity),
"error"))
......
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