Skip to content

Commit

Permalink
DOC: Improve doc build
Browse files Browse the repository at this point in the history
Ensure version ends up in doc build
Clarify variable types
  • Loading branch information
bashtage committed Nov 10, 2017
1 parent 28d8ca6 commit 2db76fa
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ script:
- set -e
- pytest --cov-config .coveragerc --cov=arch arch --durations=10
- python ci/performance.py
- if [[ ${DOCBUILD} = true ]]; then cd doc && make html && cd .. ; fi
- if [[ ${DOCBUILD} = true ]]; then python setup.py install && cd doc && make html && cd .. ; fi
- if [[ ${DOCBUILD} = true && ${TRAVIS_BRANCH} = "master" ]]; then doctr deploy doc; fi
- flake8 arch

Expand Down
22 changes: 11 additions & 11 deletions arch/unitroot/unitroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def _autolag_ols(endog, exog, startlag, maxlag, method, modargs=(), regresults=F
Parameters
----------
endog : array-like
endog : {ndarray, Series}
nobs array containing endogenous variable
exog : array-like
exog : {ndarray, DataFrame}
nobs by (startlag + maxlag) array containing lags and possibly other
variables
startlag : int
Expand Down Expand Up @@ -123,7 +123,7 @@ def _df_select_lags(y, trend, max_lags, method):
Parameters
----------
y : array
y : ndarray
The data for the lag selection exercise
trend : {'nc','c','ct','ctt'}
The trend order
Expand Down Expand Up @@ -172,7 +172,7 @@ def _estimate_df_regression(y, trend, lags):
Parameters
----------
y : array
y : ndarray
The data for the lag selection
trend : {'nc','c','ct','ctt'}
The trend order
Expand Down Expand Up @@ -384,7 +384,7 @@ class ADF(UnitRootTest):
Parameters
----------
y : array
y : {ndarray, Series}
The data to test for a unit root
lags : int, optional
The number of lags to use in the ADF regression. If omitted or None,
Expand Down Expand Up @@ -529,7 +529,7 @@ class DFGLS(UnitRootTest):
Parameters
----------
y : array
y : {ndarray, Series}
The data to test for a unit root
lags : int, optional
The number of lags to use in the ADF regression. If omitted or None,
Expand Down Expand Up @@ -692,7 +692,7 @@ class PhillipsPerron(UnitRootTest):
Parameters
----------
y : array
y : {ndarray, Series}
The data to test for a unit root
lags : int, optional
The number of lags to use in the Newey-West estimator of the long-run
Expand Down Expand Up @@ -870,7 +870,7 @@ class KPSS(UnitRootTest):
Parameters
----------
y : array
y : {ndarray, Series}
The data to test for stationarity
lags : int, optional
The number of lags to use in the Newey-West estimator of the long-run
Expand Down Expand Up @@ -963,7 +963,7 @@ class VarianceRatio(UnitRootTest):
Parameters
----------
y : array
y : {ndarray, Series}
The data to test for a random walk
lags : int
The number of periods to used in the multi-period variance, which is
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def mackinnoncrit(num_unit_roots=1, regression="c", nobs=inf,
Returns
-------
crit_vals : array
crit_vals : ndarray
Three critical values corresponding to 1%, 5% and 10% cut-offs.
Notes
Expand Down Expand Up @@ -1311,7 +1311,7 @@ def kpss_crit(stat, trend='c'):
-------
pvalue : float
The interpolated p-value
crit_val : array
crit_val : ndarray
Three element array containing the 10%, 5% and 1% critical values,
in order
Expand Down
72 changes: 36 additions & 36 deletions arch/univariate/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _callback(*args):
Parameters
----------
parameters : np.ndarray
parameters : : ndarray
Parameter value (not used by function)
Notes
Expand All @@ -60,9 +60,9 @@ def constraint(a, b):
Parameters
----------
a : np.ndarray
a : ndarray
Parameter loadings
b : np.ndarray
b : ndarray
Constraint bounds
Returns
Expand Down Expand Up @@ -113,7 +113,7 @@ def implicit_constant(x):
Parameters
----------
x : np.ndarray
x : ndarray
Array to be tested
Returns
Expand Down Expand Up @@ -178,9 +178,9 @@ def constraints(self):
Returns
-------
a : np.ndarray
a : ndarray
Number of constraints by number of parameters loading array
b : np.ndarray
b : ndarray
Number of constraints array of lower bounds
Notes
Expand Down Expand Up @@ -387,7 +387,7 @@ def fit(self, update_freq=1, disp='final', starting_values=None,
disp : str
Either 'final' to print optimization result or 'off' to display
nothing
starting_values : np.ndarray, optional
starting_values : ndarray, optional
Array of starting values to use. If not provided, starting values
are constructed by the model components.
cov_type : str, optional
Expand Down Expand Up @@ -572,7 +572,7 @@ def starting_values(self):
Returns
-------
sv : np.ndarray
sv : ndarray
Starting values
"""
params = np.asarray(self._fit_no_arch_normal_errors().params)
Expand All @@ -599,16 +599,16 @@ def resids(self, params, y=None, regressors=None):
Parameters
----------
params : np.ndarray
params : ndarray
Model parameters
y : np.ndarray, optional
y : ndarray, optional
Alternative values to use when computing model residuals
regressors : np.ndarray, optional
regressors : ndarray, optional
Alternative regressor values to use when computing model residuals
Returns
-------
resids : np.ndarray
resids : ndarray
Model residuals
"""
raise NotImplementedError('Subclasses must implement')
Expand All @@ -619,7 +619,7 @@ def compute_param_cov(self, params, backcast=None, robust=True):
Parameters
----------
params : np.ndarray
params : ndarray
Model parameters
backcast : float
Value to use for pre-sample observations
Expand Down Expand Up @@ -660,7 +660,7 @@ def forecast(self, params, horizon=1, start=None, align='origin', method='analyt
Parameters
----------
params : np.ndarray, optional
params : ndarray, optional
Alternative parameters to use. If not provided, the parameters
estimated when fitting the model are used. Must be identical in
shape to the parameters computed by fitting the model.
Expand Down Expand Up @@ -751,12 +751,12 @@ class ARCHModelFixedResult(_SummaryRepr):
Parameters
----------
params : np.ndarray
params : ndarray
Estimated parameters
resid : np.ndarray
resid : ndarray
Residuals from model. Residuals have same shape as original data and
contain nan-values in locations not used in estimation
volatility : np.ndarray
volatility : ndarray
Conditional volatility from model
dep_var: Series
Dependent variable
Expand Down Expand Up @@ -786,7 +786,7 @@ class ARCHModelFixedResult(_SummaryRepr):
Akaike information criteria
bic : float
Schwarz/Bayes information criteria
conditional_volatility : {np.ndarray, Series}
conditional_volatility : {ndarray, Series}
nobs element array containing the conditional volatility (square root
of conditional variance). The values are aligned with the input data
so that the value in the t-th position is the variance of t-th error,
Expand All @@ -797,7 +797,7 @@ class ARCHModelFixedResult(_SummaryRepr):
Number of observations used in the estimation
num_params : int
Number of parameters in the model
resid : {np.ndarray, Series}
resid : {ndarray, Series}
nobs element array containing model residuals
model : ARCHModel
Model instance used to produce the fit
Expand Down Expand Up @@ -1056,7 +1056,7 @@ def forecast(self, params=None, horizon=1, start=None, align='origin', method='a
Parameters
----------
params : np.ndarray, optional
params : ndarray, optional
Alternative parameters to use. If not provided, the parameters
estimated when fitting the model are used. Must be identical in
shape to the parameters computed by fitting the model.
Expand Down Expand Up @@ -1126,7 +1126,7 @@ def hedgehog_plot(self, params=None, horizon=10, step=10, start=None,
Parameters
----------
params : {np.ndarray, Series}
params : {ndarray, Series}
Alternative parameters to use. If not provided, the parameters
computed by fitting the model are used. Must be 1-d and identical
in shape to the parameters computed by fitting the model.
Expand Down Expand Up @@ -1225,18 +1225,18 @@ class ARCHModelResult(ARCHModelFixedResult):
Parameters
----------
params : np.ndarray
params : ndarray
Estimated parameters
param_cov : {np.ndarray, None}
param_cov : {ndarray, None}
Estimated variance-covariance matrix of params. If none, calls method
to compute variance from model when parameter covariance is first used
from result
r2 : float
Model R-squared
resid : np.ndarray
resid : ndarray
Residuals from model. Residuals have same shape as original data and
contain nan-values in locations not used in estimation
volatility : np.ndarray
volatility : ndarray
Conditional volatility from model
cov_type : str
String describing the covariance estimator used
Expand Down Expand Up @@ -1273,7 +1273,7 @@ class ARCHModelResult(ARCHModelFixedResult):
Akaike information criteria
bic : float
Schwarz/Bayes information criteria
conditional_volatility : {np.ndarray, Series}
conditional_volatility : {ndarray, Series}
nobs element array containing the conditional volatility (square root
of conditional variance). The values are aligned with the input data
so that the value in the t-th position is the variance of t-th error,
Expand All @@ -1296,7 +1296,7 @@ class ARCHModelResult(ARCHModelFixedResult):
Array of parameter standard errors
pvalues : Series
Array of p-values for the t-statistics
resid : {np.ndarray, Series}
resid : {ndarray, Series}
nobs element array containing model residuals
model : ARCHModel
Model instance used to produce the fit
Expand Down Expand Up @@ -1324,7 +1324,7 @@ def conf_int(self, alpha=0.05):
Returns
-------
ci : np.ndarray
ci : ndarray
Array where the ith row contains the confidence interval for the
ith parameter
"""
Expand Down Expand Up @@ -1598,14 +1598,14 @@ class ARCHModelForecast(object):
Parameters
----------
index : {list, np.ndarray}
mean : np.ndarray
variance : np.ndarray
residual_variance : np.ndarray
simulated_paths : np.ndarray, optional
simulated_variances : np.ndarray, optional
simulated_residual_variances : np.ndarray, optional
simulated_residuals : np.ndarray, optional
index : {list, ndarray}
mean : ndarray
variance : ndarray
residual_variance : ndarray
simulated_paths : ndarray, optional
simulated_variances : ndarray, optional
simulated_residual_variances : ndarray, optional
simulated_residuals : ndarray, optional
align : {'origin', 'target'}
Attributes
Expand Down
Loading

0 comments on commit 2db76fa

Please sign in to comment.