WeightedPortTest: Weighted Portmanteau Tests for Time Series Goodness-of-fit. This packages contains the Weighted Portmanteau Tests as described in ”New Weighted Portmanteau Statistics for Time Series Goodness-of-Fit Testing’ accepted for publication by the Journal of the American Statistical Association: We exploit ideas from high-dimensional data analysis to derive new portmanteau tests that are based on the trace of the square of the m,th order autocorrelation matrix. The resulting statistics are weighted sums of the squares of the sample autocorrelation coefficients that, unlike many other tests appearing in the literature, are numerically stable even when the number of lags considered is relatively close to the sample size. The statistics behave asymptotically as a linear combination of chi-squared random variables and their asymptotic distribution can be approximated by a gamma distribution. The proposed tests are modified to check for nonlinearity and to check the adequacy of a fitted nonlinear model. Simulation evidence indicates that the proposed goodness of fit tests tend to have higher power than other tests appearing in the literature, particularly in detecting long-memory nonlinear models. The efficacy of the proposed methods is demonstrated by investigating nonlinear effects in Apple, Inc., and Nikkei-300 daily returns during the 2006-2007 calendar years. The supplementary materials for this article are available online.