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.utilsexamples:- 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finpricing-0.1.0.tar.gz.
File metadata
- Download URL: finpricing-0.1.0.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/5.15.0-76-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaf3f1531fb37d38c9588cca7997c3b3ea9b98fc64b6db55f2ea400ed5188338
|
|
| MD5 |
7803498f4207abf497a212297ac224e4
|
|
| BLAKE2b-256 |
2dfc088d2080afd9d683dfb523778a52ef3a41b3d9c2fe4ad34733daab9cd306
|
File details
Details for the file finpricing-0.1.0-py3-none-any.whl.
File metadata
- Download URL: finpricing-0.1.0-py3-none-any.whl
- Upload date:
- Size: 56.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/5.15.0-76-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2422f54406c32e50493be5beb958ba72bf9723b62e5f94e0108d5ddd5074e78
|
|
| MD5 |
9c1b45def384893a860966e4d27c652f
|
|
| BLAKE2b-256 |
9ee7ed79c65a544cb9ee463f4e9d559482e2f245140198f9df17e65d67ddb3f3
|