Skip to main content

A Python library for generating discounted cashflows.

Project description

Python library dcf

Codeship Travis ci Read the Docs CodeFactor Grade Code Climate maintainability Codecov lgtm grade total lgtm alerts GitHub GitHub release PyPI Version PyPI - Python Version PyPI Downloads

A Python library for generating discounted cashflows (dcf). Typical banking business methods are provided like interpolation, compounding, discounting and fx.

Example Usage

from datetime import date
from dcf import ZeroRateCurve

>>> start = date(2014,1,1)
>>> mid = date(2015,1,1)
>>> end = date(2016,1,1)

>>> ZeroRateCurve([start, end], [.03, .05]).get_zero_rate(start, mid)
0.04

>>> ZeroRateCurve([start, end], [.03, .05]).get_discount_factor(start, mid)
0.9607894392

Install

The latest stable version can always be installed or updated via pip:

$ pip install dcf

Development Version

The latest development version can be installed directly from GitHub:

$ pip install --upgrade git+https://github.com/sonntagsgesicht/dcf.git

Contributions

Issues and Pull Requests are always welcome.

License

Code and documentation are available according to the Apache Software License (see LICENSE).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dcf, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size dcf-0.3-py3-none-any.whl (24.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dcf-0.3.tar.gz (22.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page