financepy


Namefinancepy JSON
Version 0.370 PyPI version JSON
download
home_pagehttps://github.com/domokane/FinancePy
SummaryA Finance Securities Valuation Library
upload_time2024-10-28 19:28:46
maintainerNone
docs_urlNone
authorDominic O'Kane
requires_python>=3.6
licenseNone
keywords finance options bonds valuation derivatives
VCS
bugtrack_url
requirements numba numpy scipy llvmlite ipython pandas prettytable
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FinancePy
A one-stop library for pricing and risk-managing options, futures and other financial instruments. See below for a comprehensive overview.

## Getting Started
FinancePy can be installed from pip using the following command:

`pip install financepy`

To upgrade an existing installation type:

`pip install --upgrade financepy`

The notebooks folder contains over 60 example notebooks on how to use the library. 

There is also a pdf manual at the top of the project listing all of the functionality.

## Disclaimer
This software is distributed FREE AND WITHOUT ANY WARRANTY. Report any bugs or concerns here as an issue.

## Contributing
If you have a knowledge of Quantitative Finance and 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. There are a number of requirements:

* The code should be Pep8 compliant.
* Comments are required for every class and function, and they should give a clear description.
* At least one broad test case and a set of unit tests must be provided for every function.
* Avoid very pythonic constructions. For example a loop is as good as a list comprehension. And with numba it can be faster. Readability and speed are the priorities.

## Users
If you are a user and require some additional functionality, then please add it as an issue.

## Overview

FinancePy is a python-based library that is currently in beta version. It covers the following functionality:

* Valuation and risk models for a wide range of equity, FX, interest rate and credit derivatives.

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:

* Students of finance and students of python
* Academics teaching finance or conducting research into finance
* Traders wishing to price or risk-manage a derivative.
* Quantitative analysts seeking to price or reverse engineer a price.
* Risk managers wishing to replicate and understand price sensitivity.
* Portfolio managers wishing to check prices or calculate risk measures.
* Fund managers wanting to value a portfolio or examine a trading strategy.

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:

1. To make the code as simple as possible so that those with a basic Python fluency can understand and check the code.
2. To keep all the code in Python so users can look through the code to the lowest level.
3. To offset the performance impact of (2) by leveraging Numba to make the code as fast as possible without resorting to Cython.
4. To make the design product-based rather than model-based so someone wanting to price a specific product can easily find that without having to worry too much about the model – just use the default – unless they want to. For most products, a Monte-Carlo implementation has been provided both as a reference for testing and as a way to better understand how the product functions in terms of payments, their timings and conditions.
5. To make the library as complete as possible so a user can find all their required finance-related functionality in one place. This is better for the user as they only have to learn one interface.
6. To avoid complex designs. Limited inheritance unless it allows for significant code reuse. Some code duplication is OK, at least temporarily.
7. To have good documentation and easy-to-follow examples.
8. To make it easy for interested parties to contribute.

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:

* IF YOU HAVE ANY PRICING OR RISK EXAMPLES YOU WOULD LIKE REPLICATED, SEND SCREENSHOTS OF ALL THE UNDERLYING DATA, MODEL DETAILS AND VALUATION.
* IF THERE IS A PRODUCT YOU WOULD LIKE TO HAVE ADDED, SEND ME THE REQUEST.
* IF THERE IS FUNCTIONALITY YOU WOULD LIKE ADDED, SEND ME A REQUEST.

The underlying Python library is split into a number of major modules:

* Utils - These are utility functions used to assist you with modelling a security. These include dates (Date), calendars, schedule generation, some finance-related mathematics functions and some helper functions.
* Market - These are modules that capture the market information used to value a security. These include interest rate and credit curves, volatility surfaces and prices.
* Models - These are the low-level models used to value derivative securities ranging from Black-Scholes to complex stochastic volatility models.
* Products - These are the actual securities and range from Government bonds to Bermudan swaptions.

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.

## Author

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 over 15 years of academic experience.

Contact me at dominic.okane at edhec.edu.

## Dependencies

FinancePy depends on Numpy, Numba, Scipy and basic python libraries such as os, sys and datetime.

## Changelog

See the changelog for a detailed history of changes.

## License

 GPL-3.0 License - See the license file in this folder for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/domokane/FinancePy",
    "name": "financepy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "FINANCE, OPTIONS, BONDS, VALUATION, DERIVATIVES",
    "author": "Dominic O'Kane",
    "author_email": "dominic.okane@edhec.edu",
    "download_url": "https://files.pythonhosted.org/packages/42/2a/c6b43f889b697a1f8b7a8a5ae3f0dcabc03b20bdf42056a8b2a37d664083/financepy-0.370.tar.gz",
    "platform": null,
    "description": "# FinancePy\r\nA one-stop library for pricing and risk-managing options, futures and other financial instruments. See below for a comprehensive overview.\r\n\r\n## Getting Started\r\nFinancePy can be installed from pip using the following command:\r\n\r\n`pip install financepy`\r\n\r\nTo upgrade an existing installation type:\r\n\r\n`pip install --upgrade financepy`\r\n\r\nThe notebooks folder contains over 60 example notebooks on how to use the library. \r\n\r\nThere is also a pdf manual at the top of the project listing all of the functionality.\r\n\r\n## Disclaimer\r\nThis software is distributed FREE AND WITHOUT ANY WARRANTY. Report any bugs or concerns here as an issue.\r\n\r\n## Contributing\r\nIf you have a knowledge of Quantitative Finance and 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. There are a number of requirements:\r\n\r\n* The code should be Pep8 compliant.\r\n* Comments are required for every class and function, and they should give a clear description.\r\n* At least one broad test case and a set of unit tests must be provided for every function.\r\n* Avoid very pythonic constructions. For example a loop is as good as a list comprehension. And with numba it can be faster. Readability and speed are the priorities.\r\n\r\n## Users\r\nIf you are a user and require some additional functionality, then please add it as an issue.\r\n\r\n## Overview\r\n\r\nFinancePy is a python-based library that is currently in beta version. It covers the following functionality:\r\n\r\n* Valuation and risk models for a wide range of equity, FX, interest rate and credit derivatives.\r\n\r\nAlthough 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++.\r\n\r\nThe target audience for this library includes:\r\n\r\n* Students of finance and students of python\r\n* Academics teaching finance or conducting research into finance\r\n* Traders wishing to price or risk-manage a derivative.\r\n* Quantitative analysts seeking to price or reverse engineer a price.\r\n* Risk managers wishing to replicate and understand price sensitivity.\r\n* Portfolio managers wishing to check prices or calculate risk measures.\r\n* Fund managers wanting to value a portfolio or examine a trading strategy.\r\n\r\nUsers 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:\r\n\r\n1. To make the code as simple as possible so that those with a basic Python fluency can understand and check the code.\r\n2. To keep all the code in Python so users can look through the code to the lowest level.\r\n3. To offset the performance impact of (2) by leveraging Numba to make the code as fast as possible without resorting to Cython.\r\n4. To make the design product-based rather than model-based so someone wanting to price a specific product can easily find that without having to worry too much about the model \u00e2\u20ac\u201c just use the default \u00e2\u20ac\u201c unless they want to. For most products, a Monte-Carlo implementation has been provided both as a reference for testing and as a way to better understand how the product functions in terms of payments, their timings and conditions.\r\n5. To make the library as complete as possible so a user can find all their required finance-related functionality in one place. This is better for the user as they only have to learn one interface.\r\n6. To avoid complex designs. Limited inheritance unless it allows for significant code reuse. Some code duplication is OK, at least temporarily.\r\n7. To have good documentation and easy-to-follow examples.\r\n8. To make it easy for interested parties to contribute.\r\n\r\nIn 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.\r\n\r\nImportant Note:\r\n\r\n* IF YOU HAVE ANY PRICING OR RISK EXAMPLES YOU WOULD LIKE REPLICATED, SEND SCREENSHOTS OF ALL THE UNDERLYING DATA, MODEL DETAILS AND VALUATION.\r\n* IF THERE IS A PRODUCT YOU WOULD LIKE TO HAVE ADDED, SEND ME THE REQUEST.\r\n* IF THERE IS FUNCTIONALITY YOU WOULD LIKE ADDED, SEND ME A REQUEST.\r\n\r\nThe underlying Python library is split into a number of major modules:\r\n\r\n* Utils - These are utility functions used to assist you with modelling a security. These include dates (Date), calendars, schedule generation, some finance-related mathematics functions and some helper functions.\r\n* Market - These are modules that capture the market information used to value a security. These include interest rate and credit curves, volatility surfaces and prices.\r\n* Models - These are the low-level models used to value derivative securities ranging from Black-Scholes to complex stochastic volatility models.\r\n* Products - These are the actual securities and range from Government bonds to Bermudan swaptions.\r\n\r\nAny product valuation is the result of the following data design:\r\n\r\n**VALUATION** = **PRODUCT** + **MODEL** + **MARKET**\r\n\r\nThe interface to each product has a value() function that will take a model and market to produce a price.\r\n\r\n## Author\r\n\r\nDominic O'Kane. I am a Professor of Finance at the EDHEC Business School in Nice, France. I have 12 years of industry experience and over 15 years of academic experience.\r\n\r\nContact me at dominic.okane at edhec.edu.\r\n\r\n## Dependencies\r\n\r\nFinancePy depends on Numpy, Numba, Scipy and basic python libraries such as os, sys and datetime.\r\n\r\n## Changelog\r\n\r\nSee the changelog for a detailed history of changes.\r\n\r\n## License\r\n\r\n GPL-3.0 License - See the license file in this folder for details.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Finance Securities Valuation Library",
    "version": "0.370",
    "project_urls": {
        "Homepage": "https://github.com/domokane/FinancePy"
    },
    "split_keywords": [
        "finance",
        " options",
        " bonds",
        " valuation",
        " derivatives"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66f66f0390250fcd01667a40443285751988d1aadbdc9b91c26bb577f5a86f16",
                "md5": "9e9f6ab80dca73be4f645ed87c2987bd",
                "sha256": "282fb9276c5ef23d420b1fa58f605d59a323925f54645e534891946b21b06f68"
            },
            "downloads": -1,
            "filename": "financepy-0.370-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e9f6ab80dca73be4f645ed87c2987bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 678415,
            "upload_time": "2024-10-28T19:28:43",
            "upload_time_iso_8601": "2024-10-28T19:28:43.926907Z",
            "url": "https://files.pythonhosted.org/packages/66/f6/6f0390250fcd01667a40443285751988d1aadbdc9b91c26bb577f5a86f16/financepy-0.370-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "422ac6b43f889b697a1f8b7a8a5ae3f0dcabc03b20bdf42056a8b2a37d664083",
                "md5": "55dcf71386e6da9b266db998f9f75c5f",
                "sha256": "0e91d7e76a45d7f1825ff92657435f45255b1ac6da7e90909f7fde7373ed8549"
            },
            "downloads": -1,
            "filename": "financepy-0.370.tar.gz",
            "has_sig": false,
            "md5_digest": "55dcf71386e6da9b266db998f9f75c5f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 493421,
            "upload_time": "2024-10-28T19:28:46",
            "upload_time_iso_8601": "2024-10-28T19:28:46.125875Z",
            "url": "https://files.pythonhosted.org/packages/42/2a/c6b43f889b697a1f8b7a8a5ae3f0dcabc03b20bdf42056a8b2a37d664083/financepy-0.370.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-28 19:28:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "domokane",
    "github_project": "FinancePy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numba",
            "specs": [
                [
                    "==",
                    "0.60.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.4"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.13.1"
                ]
            ]
        },
        {
            "name": "llvmlite",
            "specs": [
                [
                    "==",
                    "0.43.0"
                ]
            ]
        },
        {
            "name": "ipython",
            "specs": [
                [
                    "==",
                    "8.25.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.1.2"
                ]
            ]
        },
        {
            "name": "prettytable",
            "specs": [
                [
                    "==",
                    "3.9.0"
                ]
            ]
        }
    ],
    "lcname": "financepy"
}
        
Elapsed time: 0.56710s