Markets and trading · Edition No. 48 · 12 Oct 2026

cuemacro/finmarketpy

A Python library for backtesting trading strategies, with seasonality and event studies built in.

← Markets and tradingRead the whole edition →
finmarketpy: testing trading ideas. Backtests, seasonality and event studies.

3,810 stars · Apache-2.0, 'Copyright (c) 2016 Cuemacro'. THE FILE IS SPELLED LICENCE, the British spelling, and LICENSE, LICENSE.md, LICENSE.txt and COPYING all fail; /blob/master/LICENCE returned a server error on every attempt and raw.githubusercontent.com served it. ADD BOTH THE SPELLING AND THE RAW FALLBACK TO THE CHAIN. · v0.11.19 of 2025-03-10 — NINETEEN MONTHS. The release page reads '10 Mar 17:58' with no year; PyPI dates 0.11.19 to 10 March 2025 and ungh's releases endpoint gives 2025-03-10T17:58:01Z, matching to the second. THE METHOD POINT: this proves GitHub renders a bare date for OLD releases too, so the past-date heuristic is unsafe in both directions. The README's own text dates the same release one day earlier, 9 March 2025, and is wrong. · Track this in Scout

A Python library for backtesting trading strategies, with seasonality and event studies built in.

▶Repo detailsthe review · specs · pros & cons · install

What it does

It pulls market data through a companion library called findatapy, which knows how to talk to several data sources. You then define a backtest using one of its strategy templates, in an object-oriented style rather than by writing a loop. It reports historical and cumulative returns, how leverage changed over time, and the return of each trade. Beyond the backtest it has two study modes: seasonality, which asks whether an instrument behaves differently at particular times of year, and event studies, which line up price behaviour around repeated scheduled announcements. Position sizing can target a chosen level of volatility. Charts come from a third companion library called chartpy, which can draw through matplotlib, Plotly or Bokeh. What it does not do is supply data — some of the sources it supports need a paid licence — and it no longer bundles FinancePy, which became optional in March 2025.

Why it matters

Who it suits. Anyone doing research on currencies, rates or commodities who wants seasonality and event studies alongside an ordinary backtest, and who is comfortable assembling a small stack of libraries to get there. The event-study machinery is the distinctive part; most backtesting libraries have nothing like it. Skip it if you want to install one package and start — the three-library setup is a genuine barrier.

Verdict. Good research tooling behind an awkward front door, and the front door is the honest warning. You install three of the author's libraries, the versions on GitHub and on PyPI differ, and credentials have to be configured in Python files before any data will download. The project is also slow-moving: the last release was 10 March 2025, nineteen months ago, although code landed in April 2026, so it is quiet rather than finished. If you want a backtester and nothing else, kernc/backtesting.py at 9,035 stars is much simpler and was updated in August 2026. Come here for the studies, not for the backtest.

Stars3,810
LicenceApache-2.0, 'Copyright (c) 2016 Cuemacro'. THE FILE IS SPELLED LICENCE, the British spelling, and LICENSE, LICENSE.md, LICENSE.txt and COPYING all fail; /blob/master/LICENCE returned a server error on every attempt and raw.githubusercontent.com served it. ADD BOTH THE SPELLING AND THE RAW FALLBACK TO THE CHAIN.
Latestv0.11.19 of 2025-03-10 — NINETEEN MONTHS. The release page reads '10 Mar 17:58' with no year; PyPI dates 0.11.19 to 10 March 2025 and ungh's releases endpoint gives 2025-03-10T17:58:01Z, matching to the second. THE METHOD POINT: this proves GitHub renders a bare date for OLD releases too, so the past-date heuristic is unsafe in both directions. The README's own text dates the same release one day earlier, 9 March 2025, and is wrong.
Good
  • Seasonality and event studies are built in, which is unusual and hard to write yourself.
  • Volatility-targeted position sizing is included rather than left as an exercise.
  • Charts can be drawn through three different libraries without changing the calling code.
Watch for
  • Three libraries to install, and the GitHub and PyPI versions diverge, so mixing sources breaks things.
  • Credentials must be configured in Python files before any data download, and the examples need a third-party API key.
  • Last release 10 March 2025; code landed 16 April 2026, so it is slow-moving. Its own README dates that release one day wrong.
Similar repositories
Install
python3 -m venv venv
source venv/bin/activate
pip install git+https://github.com/cuemacro/chartpy.git
pip install git+https://github.com/cuemacro/findatapy.git
pip install git+https://github.com/cuemacro/finmarketpy.git
Screenshots
cuemacro/finmarketpy: GitHub preview cardcuemacro/finmarketpy: Screenshot 1cuemacro/finmarketpy: Screenshot 2cuemacro/finmarketpy: Screenshot 3cuemacro/finmarketpy: Screenshot 4

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.