A pricing library for financial instruments
Project description
finpricing
finpricing
is a Python package designed for advanced financial pricing and risk management. It features pricing models and design patterns that align with industry standards and market conventions. However, it's important to note a few aspects:
- The industry typically develops pricing libraries in C++ or C# to optimize performance. Speed, however, is not the primary objective of this package. The focus is on presenting rigorous and often overlooked pricing models in a modern, readable language, while ensuring precision.
- The author's expertise is predominantly in Fixed Income products and derivatives (as of 2023). Contributions to expand the scope of this package are highly encouraged.
The implementation follows the instrument + market + model paradigm. The major modules now (as of 2023/11) are,
-
finpricing.instruments
:- Fixed Coupon Bond
- Credit Default Swap
-
finpricing.markets
:- Discount Curve: flat forward assumption, which is the most common curve construction method
- Survival Curve: piecewise constant hazard rate and Nelson-Siegel-Svensson (NSS) curve
- CDS Curve (in progress)
-
finpricing.models
:- Fixed Bond pricer: risky pricing of fixed coupon bond considering survival curve and recovery rate
- Bond Basis Solver: solve for the bond basis on top of the discount curve or the survival curve
- Bond Curve Solver: calibration of the NSS survival curve for a portfolio of bonds of the same issuer by minimizing the bond basis
- CDS pricer: risky pricing of CDS contracts
- CDS Par Spreads
-
finpricing.utils
examples:- Date: internal date representation
- Day Count: day count convention, e.g. Actual/360, Actual/365, etc.
- Calendar: holiday calendar for adjustment of business days
- Date Generator: generate dates for instrument cash flows
Installation
$ pip install finpricing
Usage
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
finpricing
was created by Yiming Zhang. It is licensed under the terms of the MIT license.
Credits
finpricing
was created with cookiecutter
and the py-pkgs-cookiecutter
template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for finpricing-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2422f54406c32e50493be5beb958ba72bf9723b62e5f94e0108d5ddd5074e78 |
|
MD5 | 9c1b45def384893a860966e4d27c652f |
|
BLAKE2b-256 | 9ee7ed79c65a544cb9ee463f4e9d559482e2f245140198f9df17e65d67ddb3f3 |