Why PyMetrix¶
PyMetrix is free, open-source software for applied macroeconometrics. It is meant as a public good: anyone may use it, study it, change it and pass it on, at no cost, under the BSD-3-Clause licence.
This page says who it is for and why it is built the way it is. How PyMetrix works explains the design behind it.
a public good
PyMetrix
free and open source
BSD-3-Clause, no licence fees
Policy institutions
Ministries of finance, central banks and statistics offices: forecast rounds, models, scenarios and reports, with no licence to buy for any seat.
Teachers and students
A course with labs and solutions, exercise packs and case studies. Every dialog shows the Python it runs.
Practitioners
A shared place for models, plugins, exercise packs and case studies. The plugins exist; the community is being built.
Reviewers
Every step recorded and replayable, whether a person or an AI agent took it, and every result saying where it came from.
A public good for economic policy¶
Much of the applied macroeconomics behind budgets and monetary policy is done in commercial packages, EViews and MATLAB with the IRIS toolbox among them. They are capable tools, but each seat needs a licence. For a ministry of finance, a central bank or a statistics office in a lower-income country, those fees compete with salaries and training. They also decide who can take part: an analyst without a licence, a student or a partner institution cannot open the work.
PyMetrix is meant to remove that barrier.
- Free, for every seat.
pip install --pre pymetrixon as many computers as you need, or try it in a browser through GitHub Codespaces with nothing to install. There is no licence server and nothing to renew. - Yours to keep and build on. The BSD-3-Clause licence lets anyone use, change and redistribute it, commercially or not. A ministry can build its own tools on it, a university can teach with it, a trainer can run courses on it.
- The everyday workflow, in one place. Data, estimation and tests, VARs, model solving and scenarios, forecast rounds with judgement, nowcasting and reports. It covers much of what EViews and MATLAB/IRIS are used for, without being a clone of either.
- Existing work comes along. It reads Dynare and IRIS model files. Plugins translate EViews programs and R scripts into readable pymetrix scripts, and the help says where pymetrix's defaults differ from EViews' and Stata's.
- It runs on your own computer. Your data stays there, unless you load it from an online source or choose an online assistant.
Free software still has to earn trust. Where a mature open-source library exists, such as statsmodels, linearmodels, arch or SciPy, pymetrix uses it. Its own code is checked against other programs, published tables and hand calculations, and the validation register lists every check.
A commercial package
- A seat A licence for each analyst, renewed.
- A classroom Licences for every student, or a lab to sit in.
- The engine Proprietary: it cannot be read or changed.
- Sharing the work The receiver needs the same licence.
- Extending it Through the vendor's add-ons.
PyMetrix
- A seat Nothing to pay, on every computer.
- A classroom
pip installon a student's own laptop, or a browser. - The engine Open: read it, check it, change it.
- Sharing the work A project file anyone can open and replay.
- Extending it Plugins anyone can write and share.
Built for teaching¶
Economics is learnt by doing. A tool that needs a licence for each student keeps that practice in the computer lab; PyMetrix runs on every student's own laptop, and it is built to teach.
- A course to start from. Lecture 1 estimates and tests a consumption function. Lab 2 turns the estimates into a model and a fiscal scenario, with the instructor's solution alongside. Lab 3 runs a quarterly forecast round, and Lab 4 uses pymetrix as a library. A forecasting course pack adds six labs. The notebooks run in the test suite, so they keep working as pymetrix changes.
- Every dialog shows its Python. A student who fills in a form sees the line of code it ran, and can rerun it, change it or put it in a script. Working in menus and writing code are one subject, not two.
- Exercise packs. Folders of guided exercises with hints, checks and solutions, opened from Help → Exercises… or shipped as a plugin. A lecturer can write one for their own course (the format).
- Case studies. A trainee works through a task in the app's real dialogs, each step ticked as its result appears (writing a case study).
- Help that teaches. The help explains the econometrics behind each dialog, with worked examples that are themselves tested.
- The course decides about AI. A course can set the assistant to explain without doing the work, or turn it off.
A home for communities of practice¶
Economists in different institutions solve the same problems: the same kinds of model, the same data sources, the same quarterly forecast round. PyMetrix aims to be a place where that work is shared, not rebuilt in every office.
What exists today:
- Plugins. An ordinary Python package can add estimators, tests, solvers, data sources (an institution's own data store or a public API), views, dialogs and course material. Each appears in the dialogs, the help and the generated scripts without further work, and Help → Plugins says what is installed and who maintains it. The EViews and R translators, the finance tools, seasonal adjustment, heterogeneous-agent models, the lab book and the assistant all ship this way (how plugins work).
- Material that travels. Exercise packs and case studies are plain folders. A project file carries its data, its steps and its course material, and anyone with pymetrix can open it and rebuild the results.
- A way to contribute. Contributing says how to send a change, signed off under the Developer Certificate of Origin; there is no contributor licence agreement, and contributors keep their copyright. How to help lists work a collaborator can take on alone: replicate a workflow, use the app for a real task, teach with it, own a plugin.
- Open governance. Governance sets out decisions made in the open by lazy consensus, roles from user to maintainer, and a move to a steering group once there are at least three active maintainers.
The community itself is still to be built. PyMetrix has one developer so far, and its first reviewers are being sought. Until the 0.1 release, broad code contributions wait for the contribution terms to settle; replications, testing notes, course pilots and design feedback are welcome now. There is no shared index of plugins or exchange site yet. The aim is a home where institutions publish their models and data connectors as plugins, lecturers swap exercise packs and case studies, and practitioners compare notes on the same workflow.
Replicable and auditable, by people and by AI¶
Economic advice is only as good as the ability to check it. An estimate or a forecast should lead back to the data, the sample and the method that produced it, and anyone with the project should be able to produce it again. More of that work will be done with AI agents, and the same standard has to hold for them.
- Every step is a command. Every dialog records the Python it runs, as a step in the session's history, and the history exports as a script.
- Projects replay. A project file saves the data and the steps, and rebuilds the results when it opens. Typed code in a project runs only once you trust it.
- Results carry their provenance. An estimate or a model solution keeps the data vintages (release dates, where the source gives them), the sample actually used, the method and backend, the seed, the pymetrix version, a fingerprint of the data and any warnings. Reports end with an appendix of where the numbers come from. Not every kind of result records this yet; Concepts lists which do.
- AI agents use the same commands. pymetrix's MCP server (
pymetrix-mcp, experimental) lets an AI assistant list, describe and run pymetrix's commands. Its steps go into the same history, export as the same script and replay in the same project as a person's. It is closed by default (no Python, no file writes, no network data unless the user allows each), and the assistant's own app asks the user before every call. In the desktop app, the assistant plugin serves the open window's session the same way, or answers questions with proposed steps that you open in their dialogs and run yourself; a step run from a proposal is marked as proposed in the history and in the script. - A lab book that names who acted. The lab book plugin keeps an append-only, hash-chained record of the work,
including the steps that were undone, cancelled or failed, and records whether a person or an AI agent took each
one.
pymetrix-labbook verifychecks the record by replaying it. It holds no data values, so it can go to a reviewer without the data.
Planned, not built: a privacy-filtered summary of a project for an assistant to read, a setting that returns summaries but never series values, replication packages, and outside time-stamping of the lab book.
The project holds itself to the same rule. PyMetrix has been built with substantial AI assistance, under human design and responsibility. Its AI policy accepts AI-assisted contributions on the same terms as any other: the contributor must be able to understand, explain and test the work, and substantial AI generation is disclosed. Every method pymetrix implements itself is checked against an independent reference.
Where it stands¶
PyMetrix is a development build, on PyPI as a pre-release, led by its founder. Much of the workflow is there and tested; the newest parts are marked beta or experimental, and known gaps says what is missing or rough. The most useful help now is outside testing: a replication, a course pilot, or a real task done in the app.