Skip to content

Commit

Permalink
Merge 614c966 into ccbb460
Browse files Browse the repository at this point in the history
  • Loading branch information
bashtage committed Feb 14, 2020
2 parents ccbb460 + 614c966 commit 89d462e
Show file tree
Hide file tree
Showing 21 changed files with 1,079 additions and 74 deletions.
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -27,6 +27,7 @@ to improve performance)
- [Unit Root Tests](#unit-root)
- [Bootstrapping](#bootstrap)
- [Multiple Comparison Tests](#multiple-comparison)
- [Long-run Covariance Estimation](#long-run-covariance)

### Python 3

Expand Down Expand Up @@ -159,6 +160,27 @@ ci = bs.conf_int(sharpe_ratio, 1000, method='percentile')
See the [multiple comparison example notebook](http://nbviewer.ipython.org/github/bashtage/arch/blob/master/examples/multiple-comparison_examples.ipynb)
for examples of the multiple comparison procedures.


<a id="long-run-covariance"></a>

### Long-run Covariance Estimation

Kernel-based estimators of long-run covariance including the
Bartlett kernel which is known as Newey-West in econometrics.
Automatic bandwidth selection is available for all of the
covariance estimators.

```python
from arch.covariance.kernel import Bartlett
from arch.data import nasdaq
data = nasdaq.load()
returns = data[["Adj Close"]].pct_change().dropna()

cov_est = Bartlett(returns ** 2)
# Get the long-run covariance
cov_est.cov.long_run
```

## Requirements

These requirements reflect the testing environment. It is possible
Expand Down
2 changes: 1 addition & 1 deletion arch/compat/numba.py
Expand Up @@ -3,7 +3,7 @@


class PerformanceWarning(UserWarning):
pass
"""Warning issued if recursions are run in CPython"""


performance_warning = """
Expand Down
Empty file added arch/covariance/__init__.py
Empty file.

0 comments on commit 89d462e

Please sign in to comment.