Skip to content

Commit 34183b4

Browse files
committed
Merge pull request #278 from bashtage/rls-4.8
DOC: Prepare for 4.8 release
2 parents 54fc67e + 5e1645c commit 34183b4

28 files changed

+275
-394
lines changed

.travis.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
dist: trusty
1+
dist: xenial
22
sudo: required
33

44
language: python
55

6+
services:
7+
- xvfb
8+
69
env:
710
global:
811
- COVERAGE=false
@@ -16,25 +19,19 @@ env:
1619
matrix:
1720
fast_finish: true
1821
include:
19-
- python: 2.7
20-
env:
21-
- PYTHON=2.7
22-
- NUMBA=0.35
23-
- NUMPY=1.13
24-
- SCIPY=0.19
25-
- PANDAS=0.21
26-
- COVERAGE=true
27-
- python: 2.7
22+
- python: 3.5
2823
env:
2924
- PYTHON=3.5
3025
- COVERAGE=true
3126
- MATPLOTLIB=2
32-
- python: 2.7
27+
- NUMPY=1.13
28+
- SCIPY=0.19
29+
- python: 3.7
3330
env:
3431
- PYTHON=3.7
3532
- MATPLOTLIB=3
3633
- COVERAGE=true
37-
- python: 2.7
34+
- python: 3.6
3835
env:
3936
- PYTHON=3.6
4037
- NUMBA=0.38
@@ -43,12 +40,7 @@ matrix:
4340
- MATPLOTLIB=2.0
4441
- PANDAS=0.22
4542
- STATSMODELS_MASTER=true
46-
- python: 2.7
47-
env:
48-
- PYTHON=2.7
49-
- USE_NUMBA=false
50-
- MATPLOTLIB=2
51-
- python: 2.7
43+
- python: 3.6
5244
env:
5345
- PYTHON=3.6
5446
- DOCBUILD=true
@@ -64,9 +56,6 @@ before_install:
6456
- export PATH=/home/travis/miniconda3/bin:$PATH
6557
- conda config --set always_yes true
6658
- conda update --all --quiet
67-
# Fix for headless TravisCI
68-
- export DISPLAY=:99.0
69-
- "sh -e /etc/init.d/xvfb start"
7059
# Avoid noise from matplotlib
7160
- mkdir -p $HOME/.config/matplotlib
7261
# Build package list to avoid empty package=versions

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ include arch/bootstrap/_samplers.pyx
55
include arch/univariate/recursions.pyx
66
include versioneer.py
77
include arch/_version.py
8+
recursive-include arch/tests *.csv
9+
recursive-include arch/data *.csv.gz

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ to improve performance)
3434
* [Bootstrapping](#bootstrap)
3535
* [Multiple Comparison Tests](#multiple-comparison)
3636

37+
### Python 2.7 Support
38+
39+
Version 4.8 is the final version that officially supports or is tested on
40+
Python 2.7, and is the final version that has Python 2.7 wheels. It is
41+
time to move to Python 3.5+, and to enjoy the substantial improvement
42+
available in recent Python releases.
43+
3744
## Documentation
3845

3946
Released documentation is hosted on
@@ -100,6 +107,7 @@ res = am.fit()
100107
* Dickey-Fuller GLS
101108
* Phillips-Perron
102109
* KPSS
110+
* Zivot-Andrews
103111
* Variance Ratio tests
104112

105113
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.
@@ -165,7 +173,7 @@ for examples of the multiple comparison procedures.
165173
These requirements reflect the testing environment. It is possible
166174
that arch will work with older versions.
167175

168-
* Python (2.7, 3.5 - 3.7)
176+
* Python (3.5+)
169177
* NumPy (1.13+)
170178
* SciPy (0.19+)
171179
* Pandas (0.21+)
@@ -221,12 +229,10 @@ conda install arch -c bashtage
221229
### Windows
222230

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

231237
### Developing
232238

README.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ Module Contents
3838
- `Bootstrapping <#bootstrap>`__
3939
- `Multiple Comparison Tests <#multiple-comparison>`__
4040

41+
Python 2.7 Support
42+
~~~~~~~~~~~~~~~~~~
43+
44+
Version 4.8 is the final version that officially supports or is tested
45+
on Python 2.7, and is the final version that has Python 2.7 wheels. It
46+
is time to move to Python 3.5+, and to enjoy the substantial improvement
47+
available in recent Python releases.
48+
4149
.. _documentation-1:
4250

4351
Documentation
@@ -117,6 +125,7 @@ Unit Root Tests
117125
- Dickey-Fuller GLS
118126
- Phillips-Perron
119127
- KPSS
128+
- Zivot-Andrews
120129
- Variance Ratio tests
121130

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

191-
- Python (2.7, 3.5 - 3.7)
200+
- Python (3.5+)
192201
- NumPy (1.13+)
193202
- SciPy (0.19+)
194203
- Pandas (0.21+)
@@ -249,12 +258,10 @@ Windows
249258
~~~~~~~
250259

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

259266
Developing
260267
~~~~~~~~~~

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ os: Visual Studio 2015
55

66
environment:
77
matrix:
8-
- PY_MAJOR_VER: 2
9-
PYTHON_ARCH: "x86_64"
108
- PY_MAJOR_VER: 3
119
PYTHON_ARCH: "x86"
1210
- PY_MAJOR_VER: 3

arch/tests/unitroot/data/__init__.py

Whitespace-only changes.

arch/tests/univariate/test_forecast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def test_holdback_ar(self):
497497
res_holdback = mod.fit()
498498
mod = arch_model(y, mean='AR', lags=1)
499499
res = mod.fit()
500-
assert_allclose(res_holdback.params, res.params)
500+
assert_allclose(res_holdback.params, res.params, rtol=1e-4, atol=1e-4)
501501

502502
def test_forecast_exogenous_regressors(self):
503503
y = self.rng.randn(1000, 1)

arch/unitroot/unitroot.py

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ class DFGLS(UnitRootTest):
710710
appears to be a unit root.
711711
712712
DFGLS differs from the ADF test in that an initial GLS detrending step
713-
is used before a trend-less ADF regression is run [1]_.
713+
is used before a trend-less ADF regression is run.
714714
715715
Critical values and p-values when trend is 'c' are identical to
716716
the ADF. When trend is set to 'ct, they are from ...
@@ -737,8 +737,8 @@ class DFGLS(UnitRootTest):
737737
738738
References
739739
----------
740-
.. [1] Elliott, G. R., T. J. Rothenberg, and J. H. Stock. 1996. Efficient
741-
bootstrap for an autoregressive unit root. Econometrica 64: 813-836
740+
.. [*] Elliott, G. R., T. J. Rothenberg, and J. H. Stock. 1996. Efficient
741+
bootstrap for an autoregressive unit root. Econometrica 64: 813-836
742742
"""
743743

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

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

10961096
def __init__(self, y, lags=None, trend='c'):
@@ -1206,8 +1206,8 @@ class ZivotAndrews(UnitRootTest):
12061206
-----
12071207
H0 = unit root with a single structural break
12081208
1209-
Algorithm follows Baum (2004/2015) [1]_ approximation to original
1210-
Zivot-Andrews [2]_ method. Rather than performing an autolag regression at
1209+
Algorithm follows Baum (2004/2015) approximation to original
1210+
Zivot-Andrews method. Rather than performing an autolag regression at
12111211
each candidate break period (as per the original paper), a single
12121212
autolag regression is run up-front on the base model (constant + trend
12131213
with no dummies) to determine the best lag length. This lag length is
@@ -1219,17 +1219,17 @@ class ZivotAndrews(UnitRootTest):
12191219
12201220
References
12211221
----------
1222-
.. [1] Baum, C.F. (2004). ZANDREWS: Stata module to calculate Zivot-Andrews
1223-
unit root test in presence of structural break," Statistical Software
1224-
Components S437301, Boston College Department of Economics, revised
1225-
2015.
1222+
.. [*] Baum, C.F. (2004). ZANDREWS: Stata module to calculate Zivot-Andrews
1223+
unit root test in presence of structural break," Statistical Software
1224+
Components S437301, Boston College Department of Economics, revised
1225+
2015.
12261226
12271227
.. [*] Schwert, G.W. (1989). Tests for unit roots: A Monte Carlo
1228-
investigation. Journal of Business & Economic Statistics, 7: 147-159.
1228+
investigation. Journal of Business & Economic Statistics, 7: 147-159.
12291229
1230-
.. [2] Zivot, E., and Andrews, D.W.K. (1992). Further evidence on the great
1231-
crash, the oil-price shock, and the unit-root hypothesis. Journal of
1232-
Business & Economic Studies, 10: 251-270.
1230+
.. [*] Zivot, E., and Andrews, D.W.K. (1992). Further evidence on the great
1231+
crash, the oil-price shock, and the unit-root hypothesis. Journal of
1232+
Business & Economic Studies, 10: 251-270.
12331233
"""
12341234
def __init__(self, y, lags=None, trend='c', trim=0.15, max_lags=None, method='AIC'):
12351235
super(ZivotAndrews, self).__init__(y, lags, trend, ('c', 't', 'ct'))

building/README.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)