Commit bb510d2a authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 0.10-26

parent 4e1a7f34
2011-08-09 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION (Version): New version is 0.10-26.
* R/zzz.R (.onAttach): Improvements.
* R/arma.R (arma.init):
* R/finance.R (portfolio.optim.default:
* R/irts.R (irts, read.irts, plot.irts):
* R/tsutils.R (quadmap):
Use '&&' and '||' in if() conditions.
Suggested by Tim Hesterberg <rocket@google.com>.
2011-02-07 Kurt Hornik <Kurt.Hornik@wu.ac.at>
* DESCRIPTION (Version): New version is 0.10-25.
......
Package: tseries
Version: 0.10-25
Date: 2011-02-07
Version: 0.10-26
Date: 2011-08-09
Title: Time series analysis and computational finance
Author: Compiled by Adrian Trapletti <adrian@trapletti.org>
Maintainer: Kurt Hornik <Kurt.Hornik@R-project.org>
......@@ -9,6 +9,6 @@ Depends: R (>= 2.10.0), quadprog, stats, zoo
Suggests: its
Imports: graphics, stats, utils
License: GPL-2
Packaged: 2011-02-07 17:24:04 UTC; hornik
Packaged: 2011-08-09 09:02:21 UTC; hornik
Repository: CRAN
Date/Publication: 2011-02-07 17:26:59
Date/Publication: 2011-08-09 09:11:46
1f1202a02df46e9f61a9351c6b9f273b *ChangeLog
35203d001078d8aa26bc4557c5b0a730 *DESCRIPTION
cc6f568593cc497e287a13877445f660 *NAMESPACE
434cfb7f2cdc1fe1cab1922e3fb0e3d8 *R/arma.R
28a0c2fa869e52c44f78da7fdf55ba0a *R/finance.R
f3d8df961e5a15c7e356a4566424e175 *R/garch.R
decf4a3134c069cf9d2dbc79b1b60706 *R/irts.R
983c115f3a9894fd4eab6b8892a8171a *R/test.R
ebc29d93799680f40e284960a8cd6950 *R/tsutils.R
b68c0bd5299e7879216a7d64a22fb93e *R/zzz.R
a438e352affac23cc870d81b8fc5d22f *README
d7e1c705c924dba3f006998736e3508b *data/NelPlo.rda
c4e3eedb85cac86f6a0b0bbb54e34d60 *data/USeconomic.rda
a1d960c93ea049ff3f29b6f2b069a5a0 *data/bev.rda
de9cfd6725e4701d532d2acf18823641 *data/camp.rda
6f9cf44016519b8ec4fc1745c0545bc6 *data/ice.river.rda
23d5f11847c1d40b58128fbd04f62614 *data/nino.rda
d028f14a2305aa313ed94047726eee98 *data/tcm.rda
58ababc1888736a08887e05c9a9e1d1b *data/tcmd.rda
ee522e5be7a4a8f15d449a342342c1f2 *inst/CITATION
39c832867f0093af08dba56ed7c89504 *man/NelPlo.Rd
a3fd00105442c79dbe9d8097b5877f40 *man/USeconomic.Rd
92d75e6305fcc13d56aaa716ff489583 *man/adf.test.Rd
f5b98a0cc9d1fc856692cf6f169c1ab5 *man/arma-methods.Rd
51bcd384cff3224af080545728dbf1cf *man/arma.Rd
af95a59d763942cc81ad5d3f60a8394c *man/bds.test.Rd
13d25052f8297ba99eaf53a620d5020a *man/bev.Rd
89173da2154e0d28b27bd2e9d00c983b *man/camp.Rd
35c28a6707e4e01f789be2117c646664 *man/garch-methods.Rd
6e9e94d717f01d4208a8fa29e0ea28d2 *man/garch.Rd
20526a77a6a7ca4db3f1b73c36cb901d *man/get.hist.quote.Rd
d78ea694dcc885f7a4df3e89efff2788 *man/ice.river.Rd
d1b8f7e9d68bae68eea050d9efedb11b *man/irts-functions.Rd
82628e1b908072d5572db16d8d4fd2fa *man/irts-methods.Rd
98a04ff66d5647b616d4957e316b0011 *man/irts.Rd
ebbc531e16bbbbf4ce7e6851456d0d83 *man/jarque.bera.test.Rd
12b6229199d36a5f1af0291f4d324b4e *man/kpss.test.Rd
8694b77930d8f87608e74cb3a098ffdb *man/maxdrawdown.Rd
df57497fe0c4420af39d4372edbd0e4a *man/na.remove.Rd
7da4c7325e0856a6dd73b0b3bc245d11 *man/nino.Rd
7a304ac702560d8c6b661b71d3dc9aa2 *man/plotOHLC.Rd
28de929d9cd77e7668189e1d566ee781 *man/po.test.Rd
957c6874b4c2385489ea049a798bef9f *man/portfolio.optim.Rd
069ec663f7f2bb9ca51b230efff6783f *man/pp.test.Rd
63abbd22859186fe414d4925b07c1f8a *man/quadmap.Rd
45d3e3dba09d59ab456af5ce708cd22d *man/read.matrix.Rd
9e68273b8bf81cd21281578dcd2f4c1f *man/read.ts.Rd
5fbfb899c5ddc2ec5a63a0d141847033 *man/runs.test.Rd
d09cb5b1d2393a7c4322fbbcac08a4ab *man/seqplot.ts.Rd
bfcc917c778c5e7bc20ccd55bef1b2b7 *man/sharpe.Rd
0f0985c9193c6a1abc7d0a95c84fab3b *man/sterling.Rd
f68c9086587b1ef305dabcf0b049c927 *man/summary.arma.Rd
6dab9c77bde3ff53df7ce05d93a5f2c3 *man/summary.garch.Rd
a3c2485d54c24048dafc807b29a8c2d9 *man/surrogate.Rd
bb946b82be69c75f69650c281c82ac5e *man/tcm.Rd
da83545c6306f8b91dd7f1ba6f9e46b5 *man/tcmd.Rd
88f871f36b018e81fc9cc27e51d6c34b *man/terasvirta.test.Rd
345540d936c221018ea0f70147ab8d06 *man/tsbootstrap.Rd
6b89e394a1b8f1d0aedd0ce325dcf28e *man/white.test.Rd
2fa4c7011c2bc0f7449ae151d5cc44ae *src/Makevars
1a35c6e2fa9203b12275182e39fc2ff5 *src/arma.c
f2bf234d2e38601a167e21ced4414add *src/bdstest.c
8baf771b61e1b40e56a60eb8942de9be *src/boot.c
07b2fcda9bc3e1382675cdd8f770e3d9 *src/dsumsl.f
d241de1861aa5c67ba732682d2400e3d *src/formats.c
a4437e1594ccd359073bd5d9dcddf727 *src/garch.c
bb845ffd8e0f71eefb50749eed92f249 *src/ppsum.c
010a7adf9c8df331fa379de1c4a7e4da *src/tsutils.c
......@@ -90,11 +90,11 @@ function(x, order = c(1, 1), lag = NULL, coef = NULL,
return(coef)
}
if(!is.null(order) & !is.null(lag))
if(!is.null(order) && !is.null(lag))
warning("order is ignored")
if(is.null(order) & is.null(lag))
if(is.null(order) && is.null(lag))
stop("order or lag must be given")
if(is.null(lag) & !is.null(order))
if(is.null(lag) && !is.null(order))
lag <- list(ar=seqN(order[1]), ma=seqN(order[2]))
lag$ar <- unique(lag$ar)
lag$ma <- unique(lag$ma)
......@@ -111,7 +111,7 @@ function(x, order = c(1, 1), lag = NULL, coef = NULL,
if(ists) xtsp <- tsp(x)
n <- length(x)
if(!is.null(unlist(lag)))
if(min(unlist(lag)) < 1 | max(unlist(lag)) > (n-1))
if((min(unlist(lag)) < 1) || (max(unlist(lag)) > (n-1)))
stop("invalid lag")
ncoef <- length(unlist(lag))+as.numeric(include.intercept)
if(is.null(coef)) {
......
......@@ -45,16 +45,16 @@ function(x, pm = mean(x), riskless = FALSE, shorts = FALSE,
if(!is.matrix(covmat)) {
stop("covmat is not a matrix")
}
if((dim(covmat)[1] !=k) | (dim(covmat)[2] !=k)) {
if((dim(covmat)[1] !=k) || (dim(covmat)[2] !=k)) {
stop("covmat has not the right dimension")
}
Dmat <- covmat
dvec <- rep.int(0, k)
big <- 1e+100
if(!is.null(reslow) & is.null(reshigh)) {
if(!is.null(reslow) && is.null(reshigh)) {
reshigh <- rep.int(big, k)
}
if(is.null(reslow) & !is.null(reshigh)) {
if(is.null(reslow) && !is.null(reshigh)) {
reslow <- -rep.int(big, k)
}
if(!is.null(reslow)) {
......@@ -84,7 +84,7 @@ function(x, pm = mean(x), riskless = FALSE, shorts = FALSE,
diag(a2) <- 1
b2 <- rep.int(0, k)
}
if(!is.null(reslow) & !is.null(reshigh)) {
if(!is.null(reslow) && !is.null(reshigh)) {
a3 <- matrix(0, k, k)
diag(a3) <- 1
Amat <- t(rbind(a1, a2, a3, -a3))
......@@ -100,7 +100,7 @@ function(x, pm = mean(x), riskless = FALSE, shorts = FALSE,
a1 <- rep.int(1, k)
a2 <- colMeans(x)
if(shorts) {
if(!is.null(reslow) & !is.null(reshigh)) {
if(!is.null(reslow) && !is.null(reshigh)) {
a3 <- matrix(0, k, k)
diag(a3) <- 1
Amat <- t(rbind(a1, a2, a3, -a3))
......@@ -115,7 +115,7 @@ function(x, pm = mean(x), riskless = FALSE, shorts = FALSE,
a3 <- matrix(0, k, k)
diag(a3) <- 1
b3 <- rep.int(0, k)
if(!is.null(reslow) & !is.null(reshigh)) {
if(!is.null(reslow) && !is.null(reshigh)) {
Amat <- t(rbind(a1, a2, a3, a3, -a3))
b0 <- c(1, pm, b3, reslow, -reshigh)
}
......@@ -208,9 +208,9 @@ function (instrument = "^gdax", start, end,
## Yahoo now seems to format dates as %Y-%m-%d.
dat <- as.Date(as.character(x[, 1]), "%Y-%m-%d")
if(!quiet && dat[n] != start)
if(!quiet && (dat[n] != start))
cat(format(dat[n], "time series starts %Y-%m-%d\n"))
if(!quiet && dat[1] != end)
if(!quiet && (dat[1] != end))
cat(format(dat[1], "time series ends %Y-%m-%d\n"))
if(retclass == "ts") {
......@@ -294,9 +294,9 @@ function (instrument = "^gdax", start, end,
dat <- as.Date(x[[1]], format = "%m/%d/%Y")
n <- length(dat)
if(!quiet && dat[1] != start)
if(!quiet && (dat[1] != start))
cat(format(dat[1], "time series starts %Y-%m-%d\n"))
if(!quiet && dat[n] != end)
if(!quiet && (dat[n] != end))
cat(format(dat[n], "time series ends %Y-%m-%d\n"))
if(retclass == "ts") {
......
......@@ -29,7 +29,7 @@ function(time, value)
}
if(!is.vector(time))
stop("time is not a vector")
if(!is.vector(value) & !is.matrix(value))
if(!is.vector(value) && !is.matrix(value))
stop("value is not a vector and not a matrix")
if(length(time) != NROW(value))
stop("time and value have not the same number of rows")
......@@ -101,7 +101,7 @@ read.irts <-
function(file, format = "%Y-%m-%d %H:%M:%S", tz = "GMT", ...)
{
seqN <- function(from, to) {
if((0 == length(from)) | (0 == length(to)))
if((0 == length(from)) || (0 == length(to)))
NULL
else if(to-from+1 <= 0)
NULL
......@@ -224,7 +224,7 @@ function(x, type = "l", plot.type = c("multiple", "single"),
oma = c(6, 0, 5, 0), ...)
{
seqN <- function(from, to) {
if((0 == length(from)) | (0 == length(to)))
if((0 == length(from)) || (0 == length(to)))
NULL
else if(to-from+1 <= 0)
NULL
......
......@@ -123,8 +123,8 @@ quadmap <-
function(xi = 0.2, a = 4.0, n = 1000)
{
if(n < 1) stop("n is not positive")
if((xi < 0) | (xi > 1)) stop("xi is not in [0,1]")
if((a < 0) | (a > 4)) stop("a is not in [0,4]")
if((xi < 0) || (xi > 1)) stop("xi is not in [0,1]")
if((a < 0) || (a > 4)) stop("a is not in [0,4]")
x <- double(n)
res <- .C("R_quad_map",
x = as.vector(x),
......
.onAttach <-
function(lib, pkg)
function(libname, pkgname)
{
mylib <- dirname(system.file(package = "tseries"))
ver <- packageDescription("tseries", lib.loc = mylib)["Version"]
......@@ -15,5 +15,5 @@ function(lib, pkg)
"for details."),
"\n")
if(interactive() || getOption("verbose"))
writeLines(strwrap(txt, indent = 4, exdent = 4))
packageStartupMessage(strwrap(txt, indent = 4, exdent = 4))
}
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
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