Skip to content

About pyeconomics

pyeconomics is a free, open-source library of economics and finance models, and this website is one way to use it. Every model shows its formula, cites where the formula comes from and is tested against published values.

What it is

50 models and 171 data series from 17 sources, under the Apache-2.0 licence. The same models run here in the browser, from Python, from the command line, over a REST API and as tools for an AI assistant, and each gives the same result, byte for byte. Nothing on this site needs an account, and the models are free to use, to read and to change.

Browse the models, explore the data, or read the documentation.

Who runs it

pyeconomics.dev is operated by Nathan Ramos, the project's maintainer. Write to nathan.ramos.github@gmail.com.

The code, its tests and the whole history of both are public in the repository on GitHub, where anyone can report an error, ask a question in Discussions or propose a model. The legal pages hold the terms of use, the privacy policy and the disclaimers.

Where the formulas come from

Each model cites the papers, textbooks and official documents its formulas follow: 193 citations across the 50 models, listed on each model's page with a link where the source has one. See Time value of money's citations.

Every model also declares how far its method is accepted, so a rule of thumb is never passed off as settled theory:

How each model is tested

The tests run on every change, in public: the reference values and the runs are in the repository. Each result also carries a manifest, the model's version and the hashes of its inputs and result, so anyone can run it again and compare.

Where the data comes from

From the bodies that publish it: statistical offices, central banks and researchers. Every series names its publisher, its licence and its terms, and this site serves only what those terms allow. The data sources lists each one.

What it is not

pyeconomics is a tool for learning, research and analysis, offered as is. It is not investment advice, and a model's output is only as good as its inputs and its assumptions, which each model's page states. The disclaimers say more.