Skip to content

Commit

Permalink
Merge pull request #278 from bashtage/rls-4.8
Browse files Browse the repository at this point in the history
DOC: Prepare for 4.8 release
  • Loading branch information
bashtage committed Mar 27, 2019
2 parents 54fc67e + 5e1645c commit 34183b4
Show file tree
Hide file tree
Showing 28 changed files with 275 additions and 394 deletions.
31 changes: 10 additions & 21 deletions .travis.yml
@@ -1,8 +1,11 @@
dist: trusty
dist: xenial
sudo: required

language: python

services:
- xvfb

env:
global:
- COVERAGE=false
Expand All @@ -16,25 +19,19 @@ env:
matrix:
fast_finish: true
include:
- python: 2.7
env:
- PYTHON=2.7
- NUMBA=0.35
- NUMPY=1.13
- SCIPY=0.19
- PANDAS=0.21
- COVERAGE=true
- python: 2.7
- python: 3.5
env:
- PYTHON=3.5
- COVERAGE=true
- MATPLOTLIB=2
- python: 2.7
- NUMPY=1.13
- SCIPY=0.19
- python: 3.7
env:
- PYTHON=3.7
- MATPLOTLIB=3
- COVERAGE=true
- python: 2.7
- python: 3.6
env:
- PYTHON=3.6
- NUMBA=0.38
Expand All @@ -43,12 +40,7 @@ matrix:
- MATPLOTLIB=2.0
- PANDAS=0.22
- STATSMODELS_MASTER=true
- python: 2.7
env:
- PYTHON=2.7
- USE_NUMBA=false
- MATPLOTLIB=2
- python: 2.7
- python: 3.6
env:
- PYTHON=3.6
- DOCBUILD=true
Expand All @@ -64,9 +56,6 @@ before_install:
- export PATH=/home/travis/miniconda3/bin:$PATH
- conda config --set always_yes true
- conda update --all --quiet
# Fix for headless TravisCI
- export DISPLAY=:99.0
- "sh -e /etc/init.d/xvfb start"
# Avoid noise from matplotlib
- mkdir -p $HOME/.config/matplotlib
# Build package list to avoid empty package=versions
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Expand Up @@ -5,3 +5,5 @@ include arch/bootstrap/_samplers.pyx
include arch/univariate/recursions.pyx
include versioneer.py
include arch/_version.py
recursive-include arch/tests *.csv
recursive-include arch/data *.csv.gz
20 changes: 13 additions & 7 deletions README.md
Expand Up @@ -34,6 +34,13 @@ to improve performance)
* [Bootstrapping](#bootstrap)
* [Multiple Comparison Tests](#multiple-comparison)

### Python 2.7 Support

Version 4.8 is the final version that officially supports or is tested on
Python 2.7, and is the final version that has Python 2.7 wheels. It is
time to move to Python 3.5+, and to enjoy the substantial improvement
available in recent Python releases.

## Documentation

Released documentation is hosted on
Expand Down Expand Up @@ -100,6 +107,7 @@ res = am.fit()
* Dickey-Fuller GLS
* Phillips-Perron
* KPSS
* Zivot-Andrews
* Variance Ratio tests

See the [unit root testing example notebook](http://nbviewer.ipython.org/github/bashtage/arch/blob/master/examples/unitroot_examples.ipynb) for examples of testing series for unit roots.
Expand Down Expand Up @@ -165,7 +173,7 @@ for examples of the multiple comparison procedures.
These requirements reflect the testing environment. It is possible
that arch will work with older versions.

* Python (2.7, 3.5 - 3.7)
* Python (3.5+)
* NumPy (1.13+)
* SciPy (0.19+)
* Pandas (0.21+)
Expand Down Expand Up @@ -221,12 +229,10 @@ conda install arch -c bashtage
### Windows

Building extension using the community edition of Visual Studio is
well supported for Python 3.5+. Building extensions for 64-bit Windows
for use in Python 2.7 is also supported using Microsoft Visual C++
Compiler for Python 2.7. Building on other combinations of Python/Windows
is more difficult and is not necessary when Numba is installed since
just-in-time compiled code (Numba) runs as fast as ahead-of-time
compiled extensions.
well supported for Python 3.5+. Building on other combinations of
Python/Windows is more difficult and is not necessary when Numba
is installed since just-in-time compiled code (Numba) runs as fast as
ahead-of-time compiled extensions.

### Developing

Expand Down
21 changes: 14 additions & 7 deletions README.rst
Expand Up @@ -38,6 +38,14 @@ Module Contents
- `Bootstrapping <#bootstrap>`__
- `Multiple Comparison Tests <#multiple-comparison>`__

Python 2.7 Support
~~~~~~~~~~~~~~~~~~

Version 4.8 is the final version that officially supports or is tested
on Python 2.7, and is the final version that has Python 2.7 wheels. It
is time to move to Python 3.5+, and to enjoy the substantial improvement
available in recent Python releases.

.. _documentation-1:

Documentation
Expand Down Expand Up @@ -117,6 +125,7 @@ Unit Root Tests
- Dickey-Fuller GLS
- Phillips-Perron
- KPSS
- Zivot-Andrews
- Variance Ratio tests

See the `unit root testing example
Expand Down Expand Up @@ -188,7 +197,7 @@ Requirements
These requirements reflect the testing environment. It is possible that
arch will work with older versions.

- Python (2.7, 3.5 - 3.7)
- Python (3.5+)
- NumPy (1.13+)
- SciPy (0.19+)
- Pandas (0.21+)
Expand Down Expand Up @@ -249,12 +258,10 @@ Windows
~~~~~~~

Building extension using the community edition of Visual Studio is well
supported for Python 3.5+. Building extensions for 64-bit Windows for
use in Python 2.7 is also supported using Microsoft Visual C++ Compiler
for Python 2.7. Building on other combinations of Python/Windows is more
difficult and is not necessary when Numba is installed since
just-in-time compiled code (Numba) runs as fast as ahead-of-time
compiled extensions.
supported for Python 3.5+. Building on other combinations of
Python/Windows is more difficult and is not necessary when Numba is
installed since just-in-time compiled code (Numba) runs as fast as
ahead-of-time compiled extensions.

Developing
~~~~~~~~~~
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Expand Up @@ -5,8 +5,6 @@ os: Visual Studio 2015

environment:
matrix:
- PY_MAJOR_VER: 2
PYTHON_ARCH: "x86_64"
- PY_MAJOR_VER: 3
PYTHON_ARCH: "x86"
- PY_MAJOR_VER: 3
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion arch/tests/univariate/test_forecast.py
Expand Up @@ -497,7 +497,7 @@ def test_holdback_ar(self):
res_holdback = mod.fit()
mod = arch_model(y, mean='AR', lags=1)
res = mod.fit()
assert_allclose(res_holdback.params, res.params)
assert_allclose(res_holdback.params, res.params, rtol=1e-4, atol=1e-4)

def test_forecast_exogenous_regressors(self):
y = self.rng.randn(1000, 1)
Expand Down
86 changes: 43 additions & 43 deletions arch/unitroot/unitroot.py
Expand Up @@ -710,7 +710,7 @@ class DFGLS(UnitRootTest):
appears to be a unit root.
DFGLS differs from the ADF test in that an initial GLS detrending step
is used before a trend-less ADF regression is run [1]_.
is used before a trend-less ADF regression is run.
Critical values and p-values when trend is 'c' are identical to
the ADF. When trend is set to 'ct, they are from ...
Expand All @@ -737,8 +737,8 @@ class DFGLS(UnitRootTest):
References
----------
.. [1] Elliott, G. R., T. J. Rothenberg, and J. H. Stock. 1996. Efficient
bootstrap for an autoregressive unit root. Econometrica 64: 813-836
.. [*] Elliott, G. R., T. J. Rothenberg, and J. H. Stock. 1996. Efficient
bootstrap for an autoregressive unit root. Econometrica 64: 813-836
"""

def __init__(self, y, lags=None, trend='c',
Expand Down Expand Up @@ -873,17 +873,17 @@ class PhillipsPerron(UnitRootTest):
Notes
-----
The null hypothesis of the Phillips-Perron (PP) test is that there is a
unit root, with the alternative that there is no unit root [1]_. If the pvalue
unit root, with the alternative that there is no unit root. If the pvalue
is above a critical size, then the null cannot be rejected that there
and the series appears to be a unit root.
Unlike the ADF test, the regression estimated includes only one lag of
the dependant variable, in addition to trend terms. Any serial
correlation in the regression errors is accounted for using a long-run
variance estimator (currently Newey-West [2]_).
variance estimator (currently Newey-West).
The p-values are obtained through regression surface approximation from
MacKinnon (1994) using the updated 2010 tables ([3]_, [4]_).
MacKinnon (1994) using the updated 2010 tables.
If the p-value is close to significant, then the critical values should be
used to judge whether to reject the null.
Expand Down Expand Up @@ -915,22 +915,22 @@ class PhillipsPerron(UnitRootTest):
References
----------
.. [*] Hamilton, J. D. 1994. Time Series Analysis. Princeton: Princeton
University Press.
University Press.
.. [2] Newey, W. K., and K. D. West. 1987. "A simple, positive
semidefinite, heteroskedasticity and autocorrelation consistent covariance
matrix". Econometrica 55, 703-708.
.. [*] Newey, W. K., and K. D. West. 1987. "A simple, positive
semidefinite, heteroskedasticity and autocorrelation consistent covariance
matrix". Econometrica 55, 703-708.
.. [1] Phillips, P. C. B., and P. Perron. 1988. "Testing for a unit root in
time series regression". Biometrika 75, 335-346.
.. [*] Phillips, P. C. B., and P. Perron. 1988. "Testing for a unit root in
time series regression". Biometrika 75, 335-346.
.. [3] MacKinnon, J.G. 1994. "Approximate asymptotic distribution
functions for unit-root and cointegration bootstrap". Journal of
Business and Economic Statistics. 12, 167-76.
.. [*] MacKinnon, J.G. 1994. "Approximate asymptotic distribution
functions for unit-root and cointegration bootstrap". Journal of
Business and Economic Statistics. 12, 167-76.
.. [4] MacKinnon, J.G. 2010. "Critical Values for Cointegration Tests."
Queen's University, Dept of Economics, Working Papers. Available at
http://ideas.repec.org/p/qed/wpaper/1227.html
.. [*] MacKinnon, J.G. 2010. "Critical Values for Cointegration Tests."
Queen's University, Dept of Economics, Working Papers. Available at
http://ideas.repec.org/p/qed/wpaper/1227.html
"""

def __init__(self, y, lags=None, trend='c', test_type='tau'):
Expand Down Expand Up @@ -1022,8 +1022,8 @@ class KPSS(UnitRootTest):
lags : int, optional
The number of lags to use in the Newey-West estimator of the long-run
covariance. If omitted or None, the number of lags is calculated
with the data-dependent method of Hobijn et al. (1998) [2]_. See also
Andrews (1991) [3]_, Newey & West (1994) [4]_, and Schwert (1989) [5]_.
with the data-dependent method of Hobijn et al. (1998). See also
Andrews (1991), Newey & West (1994), and Schwert (1989).
Set lags=-1 to use the old method that only depends on the sample
size, 12 * (nobs/100) ** (1/4).
trend : {'c', 'ct'}, optional
Expand All @@ -1047,7 +1047,7 @@ class KPSS(UnitRootTest):
Notes
-----
The null hypothesis of the KPSS test is that the series is weakly
stationary and the alternative is that it is non-stationary [1]_.
stationary and the alternative is that it is non-stationary.
If the p-value is above a critical size, then the null cannot be
rejected that there and the series appears stationary.
Expand Down Expand Up @@ -1075,22 +1075,22 @@ class KPSS(UnitRootTest):
References
----------
.. [3] Andrews, D.W.K. (1991). "Heteroskedasticity and autocorrelation
consistent covariance matrix estimation". Econometrica, 59: 817-858.
.. [*] Andrews, D.W.K. (1991). "Heteroskedasticity and autocorrelation
consistent covariance matrix estimation". Econometrica, 59: 817-858.
.. [2] Hobijn, B., Frances, B.H., & Ooms, M. (2004). Generalizations
of the KPSS-test for stationarity. Statistica Neerlandica, 52: 483-502.
.. [*] Hobijn, B., Frances, B.H., & Ooms, M. (2004). Generalizations
of the KPSS-test for stationarity. Statistica Neerlandica, 52: 483-502.
.. [1] Kwiatkowski, D.; Phillips, P. C. B.; Schmidt, P.; Shin, Y. (1992).
"Testing the null hypothesis of stationarity against the alternative of
a unit root". Journal of Econometrics 54 (1-3), 159-178
.. [*] Kwiatkowski, D.; Phillips, P. C. B.; Schmidt, P.; Shin, Y. (1992).
"Testing the null hypothesis of stationarity against the alternative of
a unit root". Journal of Econometrics 54 (1-3), 159-178
.. [4] Newey, W.K., & West, K.D. (1994). "Automatic lag selection in
covariance matrix estimation". Review of Economic Studies, 61: 631-653.
.. [*] Newey, W.K., & West, K.D. (1994). "Automatic lag selection in
covariance matrix estimation". Review of Economic Studies, 61: 631-653.
.. [5] Schwert, G. W. (1989). "Tests for unit roots: A Monte Carlo
investigation". Journal of Business and Economic Statistics, 7 (2):
147-159.
.. [*] Schwert, G. W. (1989). "Tests for unit roots: A Monte Carlo
investigation". Journal of Business and Economic Statistics, 7 (2):
147-159.
"""

def __init__(self, y, lags=None, trend='c'):
Expand Down Expand Up @@ -1206,8 +1206,8 @@ class ZivotAndrews(UnitRootTest):
-----
H0 = unit root with a single structural break
Algorithm follows Baum (2004/2015) [1]_ approximation to original
Zivot-Andrews [2]_ method. Rather than performing an autolag regression at
Algorithm follows Baum (2004/2015) approximation to original
Zivot-Andrews method. Rather than performing an autolag regression at
each candidate break period (as per the original paper), a single
autolag regression is run up-front on the base model (constant + trend
with no dummies) to determine the best lag length. This lag length is
Expand All @@ -1219,17 +1219,17 @@ class ZivotAndrews(UnitRootTest):
References
----------
.. [1] Baum, C.F. (2004). ZANDREWS: Stata module to calculate Zivot-Andrews
unit root test in presence of structural break," Statistical Software
Components S437301, Boston College Department of Economics, revised
2015.
.. [*] Baum, C.F. (2004). ZANDREWS: Stata module to calculate Zivot-Andrews
unit root test in presence of structural break," Statistical Software
Components S437301, Boston College Department of Economics, revised
2015.
.. [*] Schwert, G.W. (1989). Tests for unit roots: A Monte Carlo
investigation. Journal of Business & Economic Statistics, 7: 147-159.
investigation. Journal of Business & Economic Statistics, 7: 147-159.
.. [2] Zivot, E., and Andrews, D.W.K. (1992). Further evidence on the great
crash, the oil-price shock, and the unit-root hypothesis. Journal of
Business & Economic Studies, 10: 251-270.
.. [*] Zivot, E., and Andrews, D.W.K. (1992). Further evidence on the great
crash, the oil-price shock, and the unit-root hypothesis. Journal of
Business & Economic Studies, 10: 251-270.
"""
def __init__(self, y, lags=None, trend='c', trim=0.15, max_lags=None, method='AIC'):
super(ZivotAndrews, self).__init__(y, lags, trend, ('c', 't', 'ct'))
Expand Down
31 changes: 0 additions & 31 deletions building/README.md

This file was deleted.

0 comments on commit 34183b4

Please sign in to comment.