Commit b2be1b51 authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 0.9.25

parent c3758f6c
2005-04-01 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
* DESCRIPTION (Version): New version is 0.9-25.
* R/finance.R (get.hist.quote): Use Date rather than POSIXct,
suggested by Gabor Grothendieck <ggrothendieck@myway.com>.
2004-11-12 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
* DESCRIPTION (Version): New version is 0.9-24.
......
Package: tseries
Version: 0.9-24
Date: 2004-11-11
Version: 0.9-25
Date: 2005-04-01
Title: Time series analysis and computational finance
Author: Compiled by Adrian Trapletti <a.trapletti@bluewin.ch>
Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
Description: Package for time series analysis and computational finance
Depends: R (>= 1.9.0), quadprog
License: GPL (see file COPYING)
Packaged: Fri Nov 12 08:49:11 2004; hornik
Packaged: Fri Apr 1 09:56:26 2005; hornik
......@@ -142,14 +142,16 @@ function (instrument = "^gdax", start, end,
## May be "d", "w" or "m", for daily weekly or monthly.
## Defaults to "d".
## John Bollinger, 2004-10-27, www.BollingerBands.com, bbands@yahoo.com
##
## Changed POSIXct class to Date class, 2005-03-31
{
if(missing(start)) start <- "1991-01-02"
if(missing(end)) end <- format(Sys.time() - 86400, "%Y-%m-%d")
if(missing(end)) end <- format(Sys.Date() - 1, "%Y-%m-%d")
provider <- match.arg(provider)
start <- as.POSIXct(start, tz = "GMT")
end <- as.POSIXct(end, tz = "GMT")
start <- as.Date(start)
end <- as.Date(end)
if(provider == "yahoo") {
url <-
......@@ -204,13 +206,13 @@ function (instrument = "^gdax", start, end,
on.exit(Sys.setlocale("LC_TIME", lct))
dat <- gsub(" ", "0", as.character(x[, 1])) # Need the gsub?
dat <- as.POSIXct(strptime(dat, "%d-%b-%y"), tz = "GMT")
dat <- as.Date(dat, "%d-%b-%y")
if(dat[n] != start)
cat(format(dat[n], "time series starts %Y-%m-%d\n"))
if(dat[1] != end)
cat(format(dat[1], "time series ends %Y-%m-%d\n"))
jdat <-
unclass(julian(dat, origin = as.POSIXct(origin, tz = "GMT")))
unclass(julian(dat, origin = as.Date(origin)))
## We need unclass() because 1.7.0 does not allow adding a number
## to a "difftime" object.
ind <- jdat - jdat[n] + 1
......
This diff is collapsed.
This diff is collapsed.
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