lib-alphalenslisted
Install: claude install-skill howard-lynn-ye/fin-skills
# alphalens-reloaded
The de-facto factor-evaluation tool. **Its forward-return convention is the single most common source
of overstated factor results**, and it is a default, not a bug.
| | |
|---|---|
| pip / import | `alphalens-reloaded` — **imported as `alphalens`** |
| Version | 0.4.6 (2025-06-02); prior 0.4.5 (2024-09-26); 8 releases total. Repo pushed 2025-12-15 |
| Licence | Apache-2.0 |
| Status | Alive but low-velocity maintenance, not active development. `main` runs ahead of PyPI. 642★ |
**The original is dead.** `quantopian/alphalens` — 4,435★, last push 2024-02-12, last PyPI release
**0.4.0 (2020-04-27)**, classifiers capped at Python 3.5. **Do not `pip install alphalens`.** Note
also the `pandas<3.0,>=1.5.0` pin: on a pandas 3.x environment this holds you back or conflicts.
## The trap that costs you money
**`compute_forward_returns` does `pct_change(period).shift(-period)`.** From `src/alphalens/utils.py`:
```python
for period in sorted(periods):
if cumulative_returns:
returns = prices.pct_change(period)
else:
returns = prices.pct_change()
forward_returns = returns.shift(-period).reindex(factor_dateindex)
```
For a factor observed at date `t` with `period=p`, the forward return is **`P[t+p] / P[t] − 1` — it
starts accruing from the price at date `t` itself.** **alphalens does not lag your factor for you.**
If your factor at `t` comes from `t`'s close — overwhelmingly the common case for any close-based
indicator — the `1D` for