Commit 19944898 authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 0.10-40

parent 83a9e466
2017-04-19 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* R/finance.R (get.hist.quote):
* man/get.hist.quote.Rd:
* man/plotOHLC.Rd:
http://quote.yahoo.com now redirects to https.
2017-04-18 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION: New version is 0.10-39.
......
Package: tseries
Version: 0.10-39
Version: 0.10-40
Title: Time Series Analysis and Computational Finance
Authors@R: c(person("Adrian", "Trapletti", role = "aut",
email = "adrian@trapletti.org"),
......@@ -12,10 +12,10 @@ Depends: R (>= 2.10.0)
Imports: graphics, stats, utils, quadprog, zoo
License: GPL-2
NeedsCompilation: yes
Packaged: 2017-04-18 10:57:09 UTC; hornik
Packaged: 2017-04-19 07:58:47 UTC; hornik
Author: Adrian Trapletti [aut],
Kurt Hornik [aut, cre],
Blake LeBaron [ctb] (BDS test code)
Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
Repository: CRAN
Date/Publication: 2017-04-18 11:22:27 UTC
Date/Publication: 2017-04-19 08:29:57 UTC
75ec489f3ade18ce825fe8e6b2f7be5d *ChangeLog
5bedaa6d98dcf6861d2ef686ad8f21d3 *DESCRIPTION
350b26da285cf21c7a0f63096a9d5de0 *ChangeLog
5fed6f8a7fe3df4a669b5c0eedd468f5 *DESCRIPTION
5f5a43a566e6cdf8f6f13199c78b399a *NAMESPACE
c5a452ce3d1b330e8f92670ac8f0de83 *R/arma.R
1355a604f955d083efb33d1751cc19d4 *R/finance.R
85884205bb0d37fbcd9e74ff661d2afc *R/finance.R
72ee630e802dbee4b151d9d1efd31ca3 *R/garch.R
decf4a3134c069cf9d2dbc79b1b60706 *R/irts.R
0ce6494a5006b2e8c4cc5e87e00993f7 *R/test.R
......@@ -28,7 +28,7 @@ af95a59d763942cc81ad5d3f60a8394c *man/bds.test.Rd
89173da2154e0d28b27bd2e9d00c983b *man/camp.Rd
35c28a6707e4e01f789be2117c646664 *man/garch-methods.Rd
6e9e94d717f01d4208a8fa29e0ea28d2 *man/garch.Rd
efb2aed4190d74738049b0c4194808fa *man/get.hist.quote.Rd
8259b9b4397915ab701374d8b3373428 *man/get.hist.quote.Rd
d78ea694dcc885f7a4df3e89efff2788 *man/ice.river.Rd
d1b8f7e9d68bae68eea050d9efedb11b *man/irts-functions.Rd
82628e1b908072d5572db16d8d4fd2fa *man/irts-methods.Rd
......@@ -38,7 +38,7 @@ ebbc531e16bbbbf4ce7e6851456d0d83 *man/jarque.bera.test.Rd
8694b77930d8f87608e74cb3a098ffdb *man/maxdrawdown.Rd
df57497fe0c4420af39d4372edbd0e4a *man/na.remove.Rd
7da4c7325e0856a6dd73b0b3bc245d11 *man/nino.Rd
7a304ac702560d8c6b661b71d3dc9aa2 *man/plotOHLC.Rd
32d4b5b2e3866dddb511432a5fa82082 *man/plotOHLC.Rd
28de929d9cd77e7668189e1d566ee781 *man/po.test.Rd
085dbd437c66034802b1950a62353a4b *man/portfolio.optim.Rd
069ec663f7f2bb9ca51b230efff6783f *man/pp.test.Rd
......
......@@ -163,7 +163,7 @@ function (instrument = "^gdax", start, end,
if(provider == "yahoo") {
url <-
paste("http://chart.yahoo.com/table.csv?s=",
paste("https://ichart.finance.yahoo.com/table.csv?s=",
instrument,
format(start,
paste("&a=",
......
......@@ -33,7 +33,7 @@ get.hist.quote(instrument = "^gdax", start, end,
this argument is ignored. Abbreviations are allowed.}
\item{provider}{a character string with the name of the data
provider. Currently, \code{"yahoo"} is implemented, see
\url{http://quote.yahoo.com/} for more information. Provider
\url{https://finance.yahoo.com/} for more information. Provider
\code{"oanda"} is no longer available.}
\item{method}{tool to be used for downloading the data. See
\code{\link{download.file}} for the available download methods and
......@@ -69,10 +69,10 @@ get.hist.quote(instrument = "^gdax", start, end,
\code{\link{as.Date}},
\code{\link{as.POSIXct}},
\code{\link{download.file}};
\url{http://quote.yahoo.com/}
\url{https://finance.yahoo.com/}
}
\examples{
con <- url("http://quote.yahoo.com")
con <- url("https://finance.yahoo.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
close(con)
x <- get.hist.quote(instrument = "^gspc", start = "1998-01-01",
......
......@@ -45,15 +45,16 @@ plotOHLC(x, xlim = NULL, ylim = NULL, xlab = "Time", ylab, col = par("col"),
\code{\link{get.hist.quote}}
}
\examples{
if(!inherits(try(open(url("http://quote.yahoo.com")), silent = TRUE),
"try-error")) {
con <- url("https://finance.yahoo.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
close(con)
## Plot OHLC bar chart for the last 'nDays' days of the instrument
## 'instrument'
nDays <- 50
instrument <- "^gspc"
start <- strftime(as.POSIXlt(Sys.time() - nDays*24*3600),
start <- strftime(as.POSIXlt(Sys.time() - nDays * 24 * 3600),
format="\%Y-\%m-\%d")
end <- strftime(as.POSIXlt(Sys.time()), format = "\%Y-\%m-\%d")
x <- get.hist.quote(instrument = instrument, start = start, end = end,
......
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