Skip to content

Code for the Financial Theory with Python class in the CPF Program (https://python-for-finance.com).

Notifications You must be signed in to change notification settings

yhilpisch/ftwpcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Financial Theory with Python — Notebooks

The Python Quants

This folder contains Jupyter notebooks that accompany the Financial Theory with Python book and slide decks in the CPF Program (https://python-for-finance.com). The notebooks reproduce the main derivations, pricing examples, and numerical experiments presented in class, and they are designed to run smoothly in Google Colab or a local Python environment.

O'Reilly Book

The notebooks follow the structure of the book Financial Theory with Python by Dr. Yves J. Hilpisch. The book develops modern asset pricing concepts — such as state-price vectors, stochastic discount factors, and no-arbitrage pricing — and demonstrates them with concise, executable Python code.

Financial Theory with Python cover

Notebooks

Each chapter notebook mirrors the code from that chapter:

  • ftwp_chapter_01.ipynb — historical context and the role of Python in finance
  • ftwp_chapter_02.ipynb — two-state economy and static arbitrage
  • ftwp_chapter_03.ipynb — three-state economy and incomplete markets
  • ftwp_chapter_04.ipynb — preferences, utility, and consumption-based asset pricing
  • ftwp_chapter_05.ipynb — dynamic models, binomial trees, and option pricing
  • ftwp_chapter_06.ipynb — Monte Carlo methods and more advanced pricing examples

To get started, open a notebook in Google Colab or your preferred Jupyter environment, run the cells from top to bottom, and compare the results with the corresponding chapters and slide decks.

It is often convenient, to install the "Open in Colab" Chrome extension which lets you open notebooks in Colab directly from the GitHub repository.

Disclaimer

This repository and its contents are provided for educational and illustrative purposes only and come without any warranty or guarantees of any kind—express or implied. Use at your own risk. The authors and The Python Quants GmbH are not responsible for any direct or indirect damages, losses, or issues arising from the use of this code. Do not use the provided examples for critical decision‑making, financial transactions, medical advice, or production deployments without rigorous review, testing, and validation.

Some examples may reference third‑party libraries, datasets, services, or APIs subject to their own licenses and terms; you are responsible for ensuring compliance.

Contact

About

Code for the Financial Theory with Python class in the CPF Program (https://python-for-finance.com).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published