Skip to content

Commit 81ceedd

Browse files
committed
DOC: Restructure the docs
Restructure to be simpler to read
1 parent 755ae57 commit 81ceedd

24 files changed

+206
-214
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ __pycache__/
1515
**/.hypothesis/
1616
dist/
1717
doc/build/
18+
doc/source/**/generated/
19+
arch/univariate/recursions.c

arch/bootstrap/multiple_comparison.py

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class MCS(MultipleComparison):
9090
Methods
9191
-------
9292
compute
93+
Compute the set ofmodels in the confidence set.
9394
9495
References
9596
----------

arch/univariate/distribution.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,9 @@ class SkewStudent(Distribution):
429429
430430
References
431431
----------
432-
433432
.. [1] Hansen, B. E. (1994). Autoregressive conditional density estimation.
434-
*International Economic Review*, 35(3), 705–730.
435-
<http://www.ssc.wisc.edu/~bhansen/papers/ier_94.pdf>
433+
*International Economic Review*, 35(3), 705–730.
434+
<http://www.ssc.wisc.edu/~bhansen/papers/ier_94.pdf>
436435
437436
"""
438437

doc/requirements.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
numpy
22
scipy
3-
ipython[notebook]>=3
3+
ipython>=6
44
Cython
55
matplotlib
66
pandas
77
patsy
88
statsmodels
9-
sphinx>=1.5
9+
sphinx>=1.8
1010
seaborn
1111
numpydoc
1212
nbsphinx
1313
sphinx_material
1414
jupyter
1515
property_cached
16+
notebook
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:orphan:
2+
3+
{{ fullname | escape | underline}}
4+
5+
.. currentmodule:: {{ module }}
6+
7+
.. auto{{ objtype }}:: {{ objname }}
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
:exclude-members:
7+
8+
{% block methods %}
9+
{% if methods %}
10+
.. rubric:: Methods
11+
12+
.. autosummary::
13+
:toctree: generated/
14+
15+
{% for item in methods %}
16+
{%- if not item.startswith('_') or item in ['__call__'] %} ~{{ name }}.{{ item }}
17+
{% endif %}
18+
{%- endfor %}
19+
{% endif %}
20+
{% endblock %}
21+
{% block attributes %}
22+
{% if attributes %}
23+
.. rubric:: Properties
24+
25+
.. autosummary::
26+
:toctree: generated/
27+
28+
{% for item in attributes %}
29+
{%- if not item.startswith('_') or item in ['__call__'] %} ~{{ name }}.{{ item }}
30+
{% endif %}
31+
{%- endfor %}
32+
{% endif %}
33+
{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:orphan:
2+
3+
{{ fullname | escape | underline}}
4+
5+
.. currentmodule:: {{ module }}
6+
7+
.. auto{{ objtype }}:: {{ objname }}
8+
9+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:orphan:
2+
3+
{{ fullname | escape | underline}}
4+
5+
.. currentmodule:: {{ module }}
6+
7+
.. auto{{ objtype }}:: {{ objname }}
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. automodule:: {{ fullname }}
4+
5+
{% block docstring %}
6+
{% endblock %}
7+
8+

doc/source/bootstrap/bootstrap.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bootstrapping
33

44
.. module:: arch.bootstrap
55
:synopsis: Bootstrap methods for simulation and parameter inference
6-
.. py:module::arch.bootstrap
6+
.. currentmodule::arch.bootstrap
77
88
The bootstrap module provides both high- and low-level interfaces for
99
bootstrapping data contained in NumPy arrays or pandas Series or DataFrames.
+13-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
.. py:currentmodule:: arch.bootstrap
1+
.. module:: arch.bootstrap
2+
:noindex:
3+
.. currentmodule:: arch.bootstrap
24

35
Independent, Identical Distributed Data (i.i.d.)
46
------------------------------------------------
5-
:py:class:`~arch.bootstrap.IIDBootstrap` is the standard bootstrap that is appropriate for data that is
7+
:class:`~arch.bootstrap.IIDBootstrap` is the standard bootstrap that is appropriate for data that is
68
either i.i.d. or at least not serially dependant.
79

8-
.. autoclass:: IIDBootstrap
9-
:members: conf_int, var, cov, apply, bootstrap, reset, seed, set_state, get_state
10+
.. autosummary::
11+
:toctree: generated/
12+
13+
IIDBootstrap
1014

1115
Independent Samples
1216
-------------------
13-
:py:class:`~arch.bootstrap.IndependentSamplesBootstrap` is a bootstrap that is appropriate for
17+
:class:`~arch.bootstrap.IndependentSamplesBootstrap` is a bootstrap that is appropriate for
1418
data is totally independent, and where each variable may have a different sample size. This
1519
type of data arises naturally in experimental settings, e.g., website A/B testing.
1620

17-
.. autoclass:: IndependentSamplesBootstrap
18-
:members: index, conf_int, var, cov, apply, bootstrap, reset, seed, set_state, get_state
21+
.. autosummary::
22+
:toctree: generated/
23+
24+
~arch.bootstrap.IndependentSamplesBootstrap
+11-20
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
1-
.. py:currentmodule:: arch.bootstrap
1+
.. module:: arch.bootstrap
2+
:noindex:
3+
.. currentmodule:: arch.bootstrap
24

35
Time-series Bootstraps
46
----------------------
57
Bootstraps for time-series data come in a variety of forms. The three contained
68
in this package are the stationary bootstrap
7-
(:py:class:`~arch.bootstrap.StationaryBootstrap`), which uses blocks with an
9+
(:class:`~arch.bootstrap.StationaryBootstrap`), which uses blocks with an
810
exponentially distributed lengths, the circular block bootstrap
9-
(:py:class:`~arch.bootstrap.CircularBlockBootstrap`), which uses
11+
(:class:`~arch.bootstrap.CircularBlockBootstrap`), which uses
1012
fixed length blocks, and the moving block bootstrap which also uses fixed
11-
length blocks (:py:class:`~arch.bootstrap.MovingBlockBootstrap`). The moving
13+
length blocks (:class:`~arch.bootstrap.MovingBlockBootstrap`). The moving
1214
block bootstrap does *not* wrap around and so observations near the start or
1315
end of the series will be systematically under-sampled. It is not recommended
1416
for this reason.
1517

16-
The Stationary Bootstrap
17-
========================
18+
.. autosummary::
19+
:toctree: generated/
1820

19-
.. autoclass:: StationaryBootstrap
20-
:members: conf_int, var, cov, apply, bootstrap, reset, seed, set_state, get_state
21-
22-
The Circular Block Bootstrap
23-
============================
24-
25-
.. autoclass:: CircularBlockBootstrap
26-
:members: conf_int, var, cov, apply, bootstrap, reset, seed, set_state, get_state
27-
28-
The Moving Block Bootstrap
29-
==========================
30-
31-
.. autoclass:: MovingBlockBootstrap
32-
:members: conf_int, var, cov, apply, bootstrap, reset, seed, set_state, get_state
21+
StationaryBootstrap
22+
CircularBlockBootstrap
23+
MovingBlockBootstrap

doc/source/conf.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@
174174
# html_sidebars = {}
175175
if not on_rtd:
176176
html_sidebars = {
177-
"**": ["logo-text.html", "globaltoc.html", "searchbox.html"]
177+
"**": ["logo-text.html", "globaltoc.html", "searchbox.html",
178+
"localtoc.html"]
178179
}
179180

180181
# If false, no module index is generated.
@@ -267,3 +268,10 @@
267268
}
268269

269270
extlinks = {"issue": ("https://github.com/bashtage/arch/issues/%s", "GH")}
271+
272+
napoleon_use_admonition_for_examples = True
273+
napoleon_use_admonition_for_notes = False
274+
napoleon_use_admonition_for_references = True
275+
276+
autosummary_generate = True
277+
autoclass_content = 'class'

doc/source/multiple-comparison/multiple-comparison-reference.rst

+18-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Module Reference
44
.. module:: arch.bootstrap.multiple_comparison
55
:synopsis: Multiple comparison procedures
66

7-
.. py:currentmodule:: arch.bootstrap
7+
.. currentmodule:: arch.bootstrap
88

99
Test of Superior Predictive Ability (SPA), Reality Check
1010
========================================================
@@ -28,23 +28,29 @@ from the benchmark model. The alternative is
2828
This procedure accounts for dependence between the losses and the fact that
2929
there are potentially alternative models being considered.
3030

31-
**Note**: Also callable using :py:class:`~arch.bootstrap.RealityCheck`
31+
**Note**: Also callable using :class:`~arch.bootstrap.RealityCheck`
32+
33+
34+
.. autosummary::
35+
:toctree: generated/
36+
37+
~arch.bootstrap.SPA
3238

33-
.. autoclass:: SPA
34-
:members: compute, pvalues, critical_values
3539

3640
Stepwise Multiple Testing (StepM)
3741
=================================
3842

3943
The Stepwise Multiple Testing procedure (Romano & Wolf (2005)) is closely
4044
related to the SPA, except that it returns a set of models that are superior
4145
to the benchmark model, rather than the p-value from the null. They are
42-
so closely related that :py:class:`~arch.bootstrap.StepM` is essentially
43-
a wrapper around :py:class:`~arch.bootstrap.SPA` with some small modifications
46+
so closely related that :class:`~arch.bootstrap.StepM` is essentially
47+
a wrapper around :class:`~arch.bootstrap.SPA` with some small modifications
4448
to allow multiple calls.
4549

46-
.. autoclass:: StepM
47-
:members: compute, superior_models
50+
.. autosummary::
51+
:toctree: generated/
52+
53+
~arch.bootstrap.StepM
4854

4955
Model Confidence Set (MCS)
5056
==========================
@@ -56,5 +62,7 @@ controlling the probability that a model that is worse than the best model is
5662
in the model confidence set. Like the other MCPs, it controls the
5763
Familywise Error Rate rather than the usual test size.
5864

59-
.. autoclass:: MCS
60-
:members: compute
65+
.. autosummary::
66+
:toctree: generated/
67+
68+
~arch.bootstrap.MCS

doc/source/multiple-comparison/multiple-comparisons.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ These are designed to allow multiple models to be compared while controlling
66
a the `Familywise Error Rate <https://www.google.com/search?q=familywise+error+rate>`_,
77
which is similar to the size of a test.
88

9-
.. py:module::arch.bootstrap
9+
.. module::arch.bootstrap
1010
1111
.. toctree::
1212
:maxdepth: 1

doc/source/unitroot/tests.rst

+13-41
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,22 @@ The Unit Root Tests
44
.. module:: arch.unitroot
55
:synopsis: Unit root tests
66

7-
.. py:currentmodule:: arch.unitroot
7+
.. currentmodule:: arch.unitroot
88

9+
.. autosummary::
10+
:toctree: generated/
911

10-
Augmented-Dickey Fuller Testing
11-
-------------------------------
12-
13-
.. autoclass:: ADF
14-
:members: stat, pvalue, critical_values, summary, regression, trend, lags, null_hypothesis, alternative_hypothesis, valid_trends
15-
16-
17-
Dickey-Fuller GLS Testing
18-
-------------------------
19-
20-
.. autoclass:: DFGLS
21-
:members: summary
22-
23-
24-
Phillips-Perron Testing
25-
-----------------------
26-
27-
.. autoclass:: PhillipsPerron
28-
:members: summary
29-
30-
Zivot-Andrews Testing
31-
---------------------
32-
33-
.. autoclass:: ZivotAndrews
34-
:members: summary
35-
36-
37-
Variance Ratios
38-
---------------
39-
40-
.. autoclass:: VarianceRatio
41-
:members: summary
42-
43-
44-
KPSS Testing
45-
------------
46-
47-
.. autoclass:: KPSS
48-
:members: summary
12+
ADF
13+
DFGLS
14+
PhillipsPerron
15+
ZivotAndrews
16+
VarianceRatio
17+
KPSS
4918

5019
Automatic Bandwidth Selection
5120
-----------------------------
5221

53-
.. autofunction:: auto_bandwidth
22+
.. autosummary::
23+
:toctree: generated/
24+
25+
auto_bandwidth

doc/source/unitroot/unitroot.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
Unit Root Testing
22
-----------------
33

4-
.. py:module::arch.unitroot
4+
.. module::arch.unitroot
55
66
Many time series are highly persistent, and determining whether the data appear
77
to be stationary or contains a unit root is the first step in many analyses.
88
This module contains a number of routines:
99

10-
* Augmented Dickey-Fuller (:py:class:`~arch.unitroot.ADF`)
11-
* Dickey-Fuller GLS (:py:class:`~arch.unitroot.DFGLS`)
12-
* Phillips-Perron (:py:class:`~arch.unitroot.PhillipsPerron`)
13-
* KPSS (:py:class:`~arch.unitroot.KPSS`)
14-
* Zivot-Andrews (:py:class:`~arch.unitroot.ZivotAndrews`)
15-
* Variance Ratio (:py:class:`~arch.unitroot.VarianceRatio`)
16-
* Automatic Bandwidth Selection (:py:func:`arch.unitroot.auto_bandwidth`)
10+
* Augmented Dickey-Fuller (:class:`~arch.unitroot.ADF`)
11+
* Dickey-Fuller GLS (:class:`~arch.unitroot.DFGLS`)
12+
* Phillips-Perron (:class:`~arch.unitroot.PhillipsPerron`)
13+
* KPSS (:class:`~arch.unitroot.KPSS`)
14+
* Zivot-Andrews (:class:`~arch.unitroot.ZivotAndrews`)
15+
* Variance Ratio (:class:`~arch.unitroot.VarianceRatio`)
16+
* Automatic Bandwidth Selection (:func:`arch.unitroot.auto_bandwidth`)
1717

1818
The first four all start with the null of a unit root and have an alternative
1919
of a stationary process. The final test, KPSS, has a null of a stationary

0 commit comments

Comments
 (0)