Skip to content

Commit 2db76fa

Browse files
committed
DOC: Improve doc build
Ensure version ends up in doc build Clarify variable types
1 parent 28d8ca6 commit 2db76fa

File tree

9 files changed

+75
-72
lines changed

9 files changed

+75
-72
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ script:
9393
- set -e
9494
- pytest --cov-config .coveragerc --cov=arch arch --durations=10
9595
- python ci/performance.py
96-
- if [[ ${DOCBUILD} = true ]]; then cd doc && make html && cd .. ; fi
96+
- if [[ ${DOCBUILD} = true ]]; then python setup.py install && cd doc && make html && cd .. ; fi
9797
- if [[ ${DOCBUILD} = true && ${TRAVIS_BRANCH} = "master" ]]; then doctr deploy doc; fi
9898
- flake8 arch
9999

arch/unitroot/unitroot.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def _autolag_ols(endog, exog, startlag, maxlag, method, modargs=(), regresults=F
4545
4646
Parameters
4747
----------
48-
endog : array-like
48+
endog : {ndarray, Series}
4949
nobs array containing endogenous variable
50-
exog : array-like
50+
exog : {ndarray, DataFrame}
5151
nobs by (startlag + maxlag) array containing lags and possibly other
5252
variables
5353
startlag : int
@@ -123,7 +123,7 @@ def _df_select_lags(y, trend, max_lags, method):
123123
124124
Parameters
125125
----------
126-
y : array
126+
y : ndarray
127127
The data for the lag selection exercise
128128
trend : {'nc','c','ct','ctt'}
129129
The trend order
@@ -172,7 +172,7 @@ def _estimate_df_regression(y, trend, lags):
172172
173173
Parameters
174174
----------
175-
y : array
175+
y : ndarray
176176
The data for the lag selection
177177
trend : {'nc','c','ct','ctt'}
178178
The trend order
@@ -384,7 +384,7 @@ class ADF(UnitRootTest):
384384
385385
Parameters
386386
----------
387-
y : array
387+
y : {ndarray, Series}
388388
The data to test for a unit root
389389
lags : int, optional
390390
The number of lags to use in the ADF regression. If omitted or None,
@@ -529,7 +529,7 @@ class DFGLS(UnitRootTest):
529529
530530
Parameters
531531
----------
532-
y : array
532+
y : {ndarray, Series}
533533
The data to test for a unit root
534534
lags : int, optional
535535
The number of lags to use in the ADF regression. If omitted or None,
@@ -692,7 +692,7 @@ class PhillipsPerron(UnitRootTest):
692692
693693
Parameters
694694
----------
695-
y : array
695+
y : {ndarray, Series}
696696
The data to test for a unit root
697697
lags : int, optional
698698
The number of lags to use in the Newey-West estimator of the long-run
@@ -870,7 +870,7 @@ class KPSS(UnitRootTest):
870870
871871
Parameters
872872
----------
873-
y : array
873+
y : {ndarray, Series}
874874
The data to test for stationarity
875875
lags : int, optional
876876
The number of lags to use in the Newey-West estimator of the long-run
@@ -963,7 +963,7 @@ class VarianceRatio(UnitRootTest):
963963
964964
Parameters
965965
----------
966-
y : array
966+
y : {ndarray, Series}
967967
The data to test for a random walk
968968
lags : int
969969
The number of periods to used in the multi-period variance, which is
@@ -1252,7 +1252,7 @@ def mackinnoncrit(num_unit_roots=1, regression="c", nobs=inf,
12521252
12531253
Returns
12541254
-------
1255-
crit_vals : array
1255+
crit_vals : ndarray
12561256
Three critical values corresponding to 1%, 5% and 10% cut-offs.
12571257
12581258
Notes
@@ -1311,7 +1311,7 @@ def kpss_crit(stat, trend='c'):
13111311
-------
13121312
pvalue : float
13131313
The interpolated p-value
1314-
crit_val : array
1314+
crit_val : ndarray
13151315
Three element array containing the 10%, 5% and 1% critical values,
13161316
in order
13171317

arch/univariate/base.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _callback(*args):
3737
3838
Parameters
3939
----------
40-
parameters : np.ndarray
40+
parameters : : ndarray
4141
Parameter value (not used by function)
4242
4343
Notes
@@ -60,9 +60,9 @@ def constraint(a, b):
6060
6161
Parameters
6262
----------
63-
a : np.ndarray
63+
a : ndarray
6464
Parameter loadings
65-
b : np.ndarray
65+
b : ndarray
6666
Constraint bounds
6767
6868
Returns
@@ -113,7 +113,7 @@ def implicit_constant(x):
113113
114114
Parameters
115115
----------
116-
x : np.ndarray
116+
x : ndarray
117117
Array to be tested
118118
119119
Returns
@@ -178,9 +178,9 @@ def constraints(self):
178178
179179
Returns
180180
-------
181-
a : np.ndarray
181+
a : ndarray
182182
Number of constraints by number of parameters loading array
183-
b : np.ndarray
183+
b : ndarray
184184
Number of constraints array of lower bounds
185185
186186
Notes
@@ -387,7 +387,7 @@ def fit(self, update_freq=1, disp='final', starting_values=None,
387387
disp : str
388388
Either 'final' to print optimization result or 'off' to display
389389
nothing
390-
starting_values : np.ndarray, optional
390+
starting_values : ndarray, optional
391391
Array of starting values to use. If not provided, starting values
392392
are constructed by the model components.
393393
cov_type : str, optional
@@ -572,7 +572,7 @@ def starting_values(self):
572572
573573
Returns
574574
-------
575-
sv : np.ndarray
575+
sv : ndarray
576576
Starting values
577577
"""
578578
params = np.asarray(self._fit_no_arch_normal_errors().params)
@@ -599,16 +599,16 @@ def resids(self, params, y=None, regressors=None):
599599
600600
Parameters
601601
----------
602-
params : np.ndarray
602+
params : ndarray
603603
Model parameters
604-
y : np.ndarray, optional
604+
y : ndarray, optional
605605
Alternative values to use when computing model residuals
606-
regressors : np.ndarray, optional
606+
regressors : ndarray, optional
607607
Alternative regressor values to use when computing model residuals
608608
609609
Returns
610610
-------
611-
resids : np.ndarray
611+
resids : ndarray
612612
Model residuals
613613
"""
614614
raise NotImplementedError('Subclasses must implement')
@@ -619,7 +619,7 @@ def compute_param_cov(self, params, backcast=None, robust=True):
619619
620620
Parameters
621621
----------
622-
params : np.ndarray
622+
params : ndarray
623623
Model parameters
624624
backcast : float
625625
Value to use for pre-sample observations
@@ -660,7 +660,7 @@ def forecast(self, params, horizon=1, start=None, align='origin', method='analyt
660660
661661
Parameters
662662
----------
663-
params : np.ndarray, optional
663+
params : ndarray, optional
664664
Alternative parameters to use. If not provided, the parameters
665665
estimated when fitting the model are used. Must be identical in
666666
shape to the parameters computed by fitting the model.
@@ -751,12 +751,12 @@ class ARCHModelFixedResult(_SummaryRepr):
751751
752752
Parameters
753753
----------
754-
params : np.ndarray
754+
params : ndarray
755755
Estimated parameters
756-
resid : np.ndarray
756+
resid : ndarray
757757
Residuals from model. Residuals have same shape as original data and
758758
contain nan-values in locations not used in estimation
759-
volatility : np.ndarray
759+
volatility : ndarray
760760
Conditional volatility from model
761761
dep_var: Series
762762
Dependent variable
@@ -786,7 +786,7 @@ class ARCHModelFixedResult(_SummaryRepr):
786786
Akaike information criteria
787787
bic : float
788788
Schwarz/Bayes information criteria
789-
conditional_volatility : {np.ndarray, Series}
789+
conditional_volatility : {ndarray, Series}
790790
nobs element array containing the conditional volatility (square root
791791
of conditional variance). The values are aligned with the input data
792792
so that the value in the t-th position is the variance of t-th error,
@@ -797,7 +797,7 @@ class ARCHModelFixedResult(_SummaryRepr):
797797
Number of observations used in the estimation
798798
num_params : int
799799
Number of parameters in the model
800-
resid : {np.ndarray, Series}
800+
resid : {ndarray, Series}
801801
nobs element array containing model residuals
802802
model : ARCHModel
803803
Model instance used to produce the fit
@@ -1056,7 +1056,7 @@ def forecast(self, params=None, horizon=1, start=None, align='origin', method='a
10561056
10571057
Parameters
10581058
----------
1059-
params : np.ndarray, optional
1059+
params : ndarray, optional
10601060
Alternative parameters to use. If not provided, the parameters
10611061
estimated when fitting the model are used. Must be identical in
10621062
shape to the parameters computed by fitting the model.
@@ -1126,7 +1126,7 @@ def hedgehog_plot(self, params=None, horizon=10, step=10, start=None,
11261126
11271127
Parameters
11281128
----------
1129-
params : {np.ndarray, Series}
1129+
params : {ndarray, Series}
11301130
Alternative parameters to use. If not provided, the parameters
11311131
computed by fitting the model are used. Must be 1-d and identical
11321132
in shape to the parameters computed by fitting the model.
@@ -1225,18 +1225,18 @@ class ARCHModelResult(ARCHModelFixedResult):
12251225
12261226
Parameters
12271227
----------
1228-
params : np.ndarray
1228+
params : ndarray
12291229
Estimated parameters
1230-
param_cov : {np.ndarray, None}
1230+
param_cov : {ndarray, None}
12311231
Estimated variance-covariance matrix of params. If none, calls method
12321232
to compute variance from model when parameter covariance is first used
12331233
from result
12341234
r2 : float
12351235
Model R-squared
1236-
resid : np.ndarray
1236+
resid : ndarray
12371237
Residuals from model. Residuals have same shape as original data and
12381238
contain nan-values in locations not used in estimation
1239-
volatility : np.ndarray
1239+
volatility : ndarray
12401240
Conditional volatility from model
12411241
cov_type : str
12421242
String describing the covariance estimator used
@@ -1273,7 +1273,7 @@ class ARCHModelResult(ARCHModelFixedResult):
12731273
Akaike information criteria
12741274
bic : float
12751275
Schwarz/Bayes information criteria
1276-
conditional_volatility : {np.ndarray, Series}
1276+
conditional_volatility : {ndarray, Series}
12771277
nobs element array containing the conditional volatility (square root
12781278
of conditional variance). The values are aligned with the input data
12791279
so that the value in the t-th position is the variance of t-th error,
@@ -1296,7 +1296,7 @@ class ARCHModelResult(ARCHModelFixedResult):
12961296
Array of parameter standard errors
12971297
pvalues : Series
12981298
Array of p-values for the t-statistics
1299-
resid : {np.ndarray, Series}
1299+
resid : {ndarray, Series}
13001300
nobs element array containing model residuals
13011301
model : ARCHModel
13021302
Model instance used to produce the fit
@@ -1324,7 +1324,7 @@ def conf_int(self, alpha=0.05):
13241324
13251325
Returns
13261326
-------
1327-
ci : np.ndarray
1327+
ci : ndarray
13281328
Array where the ith row contains the confidence interval for the
13291329
ith parameter
13301330
"""
@@ -1598,14 +1598,14 @@ class ARCHModelForecast(object):
15981598
15991599
Parameters
16001600
----------
1601-
index : {list, np.ndarray}
1602-
mean : np.ndarray
1603-
variance : np.ndarray
1604-
residual_variance : np.ndarray
1605-
simulated_paths : np.ndarray, optional
1606-
simulated_variances : np.ndarray, optional
1607-
simulated_residual_variances : np.ndarray, optional
1608-
simulated_residuals : np.ndarray, optional
1601+
index : {list, ndarray}
1602+
mean : ndarray
1603+
variance : ndarray
1604+
residual_variance : ndarray
1605+
simulated_paths : ndarray, optional
1606+
simulated_variances : ndarray, optional
1607+
simulated_residual_variances : ndarray, optional
1608+
simulated_residuals : ndarray, optional
16091609
align : {'origin', 'target'}
16101610
16111611
Attributes

0 commit comments

Comments
 (0)