Financial-Models-Numerical-Methods: a notebook collection where the code actually runs
Collection of notebooks about quantitative finance, with interactive python code.
At a glance
- What is it?
- FMNM is a set of 20 Jupyter notebooks on PDE methods, Lévy processes, Fourier inversion and Kalman filtering, plus a small installable Python package. It assumes you already know stochastic calculus, and it says so.
- Who is it for?
- Adopt it if you already know stochastic calculus and want runnable implementations of PDE, Fourier and filtering methods that most textbooks leave as exercises. Skip it if you need a maintained library with a stable API and versioned releases, because there are none, and if you cannot accept AGPL-3.0 terms.
- Can I use it commercially?
- Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 41 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- cantaro86/Financial-Models-Numerical-Methods7,539 ★ · +81
| Repository | 2026-09-22 | 2026-11-15 |
|---|---|---|
| cantaro86/Financial-Models-Numerical-Methods | 7.5k | 7.5k |
81 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What FMNM is, and who it is not for
The repository is a collection of Jupyter notebooks on quantitative finance topics, published by cantaro86 under AGPL-3.0. The README is direct about the audience: "Not for absolute beginners." The stated prerequisites are a basic knowledge of stochastic calculus, financial mathematics and statistics, plus basic Python. The README says it will not explain what a call option, a stochastic process or a partial differential equation is, and instead links to a wiki page or reference manual the first time a concept appears. That is a fair description of the notebooks' register. The topics listed in the contents run from Black-Scholes discretisation through Heston, Merton jump-diffusion, Variance Gamma, NIG, transaction costs, volatility calibration, Kalman filtering, Ornstein-Uhlenbeck processes and mean-variance optimisation, with three appendices on linear equation solvers, Cython and C optimisation, and Lévy process theory. The intended reader is a student in science, economics or finance who has taken at least one undergraduate course in financial mathematics, or a self-taught practitioner who has worked through an introductory book. If you are looking for a library you import and call in production, this is the wrong shape of project: the notebooks are the product, and the Python package exists to support them.
How the notebooks and the FMNM package fit together
Two layers are visible in the repository layout. The first is the notebook layer: 20 .ipynb files at the top level, each named after a topic, for example "2.1 Black-Scholes PDE and sparse matrices.ipynb" and "5.3 Volatility tracking.ipynb". The README states that every notebook is almost independent, so you can open only the one you need. The second layer is a package under src/, installed as FMNM, described in pyproject.toml as a "Library for the code used in the FMNM notebooks." That package is what the notebooks import, which is why every install path in the README ends with the same editable install. There is also a Cython extension: setup.py declares an Extension over src/FMNM/cython/*.pyx with build_ext, and appendix A.2 covers Cython and C optimisation. So the data flow is not a service or a pipeline. It is: create an environment, install FMNM in editable mode so notebook imports resolve to your working copy, open a notebook, and run cells that call into that package. The Dockerfile and docker-compose.yml offer a second route, launching Jupyter on port 8888 with the repository mounted as /workspace. The compose file passes --NotebookApp.token='' to the notebook server, which disables the token check; that is convenient on a laptop and a bad idea on any host reachable from a network.
Installing FMNM and running a first notebook
The README gives four environment options. The first recreates the author's tested conda environment from environment.yml and then installs the local package. Run these two commands from the repository root; the second is what makes `import FMNM` resolve inside the notebooks.
conda env create -f environment.yml
pip install -e .If you prefer a plain venv pinned to Python 3.11.4, the README's third option is the one to copy. It creates the environment, activates it, upgrades pip, installs from requirements.txt and then installs FMNM in editable mode.
python3.11.4 -m venv --prompt FMNM python-venv
source python-venv/bin/activate
python3 -m pip install --upgrade pip
pip install --requirement requirements.txt
pip install -e .A fourth option installs from list_of_packages.txt into whatever Python you already have. Note that the README's second option uses zsh array syntax and a sed substitution that renames the package `arch` to `arch-py` for conda-forge; that snippet will not run in bash as written. For a first real use, start Jupyter from the repository root and open a notebook you can check against something you already know, for example the Black-Scholes notebook or the Fourier inversion notebook.
jupyter labThe README warns that opening notebooks on GitHub or NBviewer can break the mathematical formula rendering, and recommends cloning or downloading the repository instead. That is the practical reason to do the local install rather than read the notebooks in a browser tab.
Where the collection stops being the right tool
The README answers its own completeness question with a flat "No!" and says more notebooks will be uploaded from time to time. The repository has no releases, so there is no version to pin against and no changelog describing what changed between snapshots. The last push was on 2026-10-05. If you need a dependency you can declare in a build file and trust to behave the same next quarter, this is not it: the API surface is whatever the notebooks happen to import. There is a second, sharper limit. The README states that the topics covered, including PDE methods, Lévy processes, Fourier methods and the Kalman filter, are "not very popular among practitioners, who prefers to work with more standard tools." That is the author's own framing, and it cuts both ways. It means the notebooks cover ground you will not find in most practitioner codebases, and it also means the code has not been shaped by production use. Numerical code written for exposition tends to take shortcuts that are fine for a plot and wrong for a pricing run: fixed grids, hard-coded parameters, and little input validation. Read a notebook's assumptions before lifting a function out of it. Finally, the AGPL-3.0 licence is the strongest of the common copyleft licences, and the notebooks are the licensed work. If you copy a function into a networked service, the licence terms follow it. That is a legal question for your own counsel, not something this article can settle.
How it differs from QuantLib and from textbook code listings
The obvious comparison is QuantLib, a C++ library with Python bindings that covers pricing engines, calendars, day counters and curve construction. The difference is not quality, it is intent. QuantLib is a library you build on: it has a stable API, releases, and a scope that includes market conventions and instrument definitions. FMNM is a set of notebooks you read and run, with a thin package holding the shared code. QuantLib will price a swaption for you; FMNM will show you the finite-difference discretisation of the Black-Scholes PDE and the sparse matrix assembly behind it, which is the part QuantLib hides. The second comparison is a textbook. A book gives you the derivation and leaves the implementation as an exercise. FMNM inverts that: the README says "Every notebook contains python code ready to use," and the derivation is compressed into links to wiki pages and reference manuals. If you learn by reading proofs, the notebooks will feel thin. If you learn by changing a parameter and watching the price move, they will not. Neither comparison makes FMNM redundant, but neither makes it a substitute for the other two.
Maintenance, upgrade cost and the licence
There are no releases, so "upgrading" means pulling the master branch and re-running the notebooks. The pinned requirements.txt is the thing that will age: it lists exact versions of numpy, pandas, matplotlib, jupyterlab, cvxpy, arch and others. Pinning is what makes the environment reproducible today, and it is also what will break first when a transitive dependency stops building on a newer Python. The README's option 2 exists precisely because of that pressure: it creates a fresh environment on the latest Python and installs from list_of_packages.txt, renaming `arch` to `arch-py` for conda. That is the path to take if the pinned environment fails to resolve. Expect to spend time on environment repair rather than on API migration, because there is no API contract to migrate against. On licensing: the repository is AGPL-3.0, and the Cython extension in setup.py and the notebooks are all part of the same licensed work. AGPL-3.0 obligations attach to distribution and, in the network case, to providing source to users interacting with a modified version over a network. Whether a specific use triggers that is a question for a lawyer. What is not in doubt is that this is not a permissive licence.
Editorial conclusion
Adopt it if you already know stochastic calculus and want runnable implementations of PDE, Fourier and filtering methods that most textbooks leave as exercises. Skip it if you need a maintained library with a stable API and versioned releases, because there are none, and if you cannot accept AGPL-3.0 terms. Before committing, clone the repository, run conda env create -f environment.yml followed by pip install -e ., and open one notebook you actually care about to confirm the cells execute in your environment.
Frequently asked questions
What is Financial-Models-Numerical-Methods?
It is a collection of Jupyter notebooks on quantitative finance topics, covering Black-Scholes methods, SDE simulation, Fourier inversion, Heston, Lévy processes, PDE and PIDE methods, transaction costs, calibration, Kalman filtering and mean-variance optimisation. The repository also ships a Python package named FMNM that holds the code the notebooks import.
Who is Financial-Models-Numerical-Methods written for?
The README states it is not for absolute beginners and expects basic knowledge of stochastic calculus, financial mathematics, statistics and Python. It names students in science, economics or finance who have taken at least one undergraduate course in financial mathematics, and self-taught readers who have worked through an introductory book.
How do I install Financial-Models-Numerical-Methods?
The README gives four options. The tested one runs conda env create -f environment.yml and then pip install -e . to install the local FMNM package. Alternatives build a venv from requirements.txt or install list_of_packages.txt into an existing Python, and every option ends with the editable install.
Does Financial-Models-Numerical-Methods have releases I can pin to?
The repository has no published GitHub releases. The README says more notebooks will be uploaded from time to time, so the practical unit of upgrade is the master branch rather than a tagged version.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/cantaro86-financial-models-numerical-methods)Star history chart for your README
[](https://hysenlabs.com/projects/cantaro86-financial-models-numerical-methods)Was this useful?