SciPy 1.18.0 (19 Jun 2026) adds scipy.signal.whittaker_henderson (HP-like at penalty order 2) and broader Array API / JAX stats. 1.18.1 (21 Aug 2026) is the first PyPI release with Python 3.15 binaries. Upgrade tonight? Not investment advice.
SciPy 1.18.0 shipped on 19 June 2026. scipy.org/news and the 1.18.0 release notes are the sources of record. The notes call out scipy.signal.whittaker_henderson (Whittaker–Henderson smoothing of a discrete signal; penalty order 2 is the Hodrick–Prescott case in econometrics) and a large Array API / JAX pass in scipy.stats. 1.18.1 followed on 21 August 2026: the first SciPy release with Python 3.15 binaries on PyPI.
This is an after-work “should I upgrade tonight?” note plus one laptop sketch — not a Fortran-to-C changelog dump, not a trading rule, and not investment advice. The only course CTA is Introduction to Python Programming. Related Hub: last week’s statsmodels 0.15 Hamilton filter if you already compare HP-style decompositions.
From the official highlights:
scipy.signal.whittaker_henderson — Whittaker–Henderson smoothing. Different penalties control smoothness; penalty strength can be chosen automatically via restricted maximum likelihood (REML). Documented as an alternative to savgol_filter. Penalty order 2 is also known as the Hodrick–Prescott filter. Read the docstring in your installed 1.18.x before copying kwarg names from a blog.
Array API and JAX in stats (and more). “A large number of scipy.stats functions now support lazy arrays and JAX JIT.” At least 21 functions gained Array API support in this release; 16 scipy.stats functions also gained MArray input. JAX JIT examples in the notes include mannwhitneyu (except method='auto'), wilcoxon (except exact/auto), binomtest (except two-sided), plus several signal helpers (hilbert, oaconvolve). This is for people already on JAX/CuPy — not a reason to rewrite a pandas notebook tonight.
Runtime floor. 1.18.0 requires Python 3.12–3.14 and NumPy ≥ 2.0.0. If you are still on 3.11, this is not an in-place pip bump.
Also real, not tonight’s homework unless you hit them: ILP64 BLAS/LAPACK modes, remaining Fortran→C translations, FFT backend pocketfft → ducc0.fft, FITPACK ported to C.
SciPy news: “SciPy 1.18.1 has been released! This is the first release to include binaries for Python 3.15 on PyPI.” If you already installed 1.18.0 on 3.12–3.14, 1.18.1 is the usual patch-line follow-up plus a reason to upgrade if you just moved the interpreter to 3.15. Confirm on your machine:
python -c "import sys, scipy; print(sys.version.split()[0], scipy.__version__)"
# pip install -U "scipy==1.18.1"
| Your Python | Tonight |
|---|---|
| 3.11 or older | No — 1.18 needs ≥ 3.12. Stay on 1.17.x until you move the interpreter. |
| 3.12–3.14 | Yes, if you want whittaker_henderson or Array API/JAX stats. Prefer 1.18.1. Run tests with python -Wd first (the notes recommend catching DeprecationWarnings). |
| 3.15 | 1.18.1 is the first official PyPI wheel line. Install that, not a source build, unless you already compile SciPy. |
Do not treat an HP-style smoother as a trading signal. Cycle/trend sketches are descriptive.
import numpy as np
from scipy.signal import whittaker_henderson, savgol_filter
rng = np.random.default_rng(0)
t = np.linspace(0, 8 * np.pi, 400)
y = np.sin(t) + 0.08 * t + 0.15 * rng.normal(size=t.size)
# Exact keyword names: print(whittaker_henderson.__doc__) on 1.18.x
try:
trend = whittaker_henderson(y) # may accept order / lam / reml — read the docstring
except TypeError:
trend = whittaker_henderson(y, order=2)
sg = savgol_filter(y, window_length=31, polyorder=3)
print("shapes", y.shape, np.asarray(trend).shape, sg.shape)
print("mean |y-trend|", float(np.mean(np.abs(y - np.asarray(trend).ravel()[: y.size]))))
If you already use statsmodels hpfilter / hamilton_filter, run the same toy series there and compare shapes, not Sharpe ratios.
If pip and Python versions still fight you, use Introduction to Python Programming, then print scipy.__version__ and run the sketch on synthetic data.