A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.
2 November 2021: A new version 0.204 has just been released that can be installed via pip.
This software is distributed FREE & WITHOUT ANY WARRANTY.
Report any bugs or suggestions here as an issue.
If you have a knowledge of Quantitative Finance and a reasonable knowledge of Python, then please consider contributing to this project. There are small tasks and big tasks to be done. Just look in the list of Issues and you may find something you can do. Before you begin, please comment in the issue thread in case someone else may be working on that issue. Or you can contact me directly at dominic.okane at edhec.edu.
If you are a user and require some additional functionality, then please add it as an issue.
FinancePy can be installed from pip using the following command:
pip install financepy
To upgrade an existing installation type:
pip install --upgrade financepy
I have encountered problems using Anaconda3-2020.07 due to some Numba and LLVMLite problems. However Anaconda3-2020.02 works.
Once financepy has been installed, it is easy to get started.
Just download the project and examine the set of Jupyter Notebooks in the notebooks folder.
A pdf manual describing all of the functions can be found in the project directory.
FinancePy is a python-based library that is currently in beta version. It covers the following functionality:
Although it is written entirely in Python, it can achieve speeds comparable to C++ by using Numba. As a result the user has both the ability to examine the underlying code and the ability to perform pricing and risk at speeds which compare to a library written in C++.
The target audience for this library includes:
Users should have a good, but not advanced, understanding of Python. In terms of Python, the style of the library has been determined subject to the following criteria:
In many cases the valuations should be close to if not identical to those produced by financial systems such as Bloomberg. However for some products, larger value differences may arise due to differences in date generation and interpolation schemes. Over time it is hoped to reduce the size of such differences.
Important Note:
The underlying Python library is split into a number of major modules:
Any product valuation is the result of the following data design:
VALUATION = PRODUCT + MODEL + MARKET
The interface to each product has a value() function that will take a model and market to produce a price.
Dominic O'Kane. I am a Professor of Finance at the EDHEC Business School in Nice, France. I have 12 years of industry experience and 10 years of academic experience.
Contact me at dominic.okane at edhec.edu.
FinancePy depends on Numpy, Numba, Scipy and basic python libraries such as os, sys and datetime.
See the changelog for a detailed history of changes.
Contributions are very welcome. There are a number of requirements:
GPL-3.0 License - See the license file in this folder for details.