Skip to main content

Functions to handle business days calculations

Project description

Downloads Latest Version Supported Python versions Development Status


In several countries and markets, the accountability of the price of a financial instrument, mainly bonds and derivatives, involves the use of different rules to compute the way the days go by. In some countries, like in Brazil, several financial instrument only pay interest for business days along their life cycle. Therefore, having a way to compute the number of business days between 2 dates is quite useful to price the financial instruments properly. It is necessary the holidays which occur between the 2 dates, to compute the business days and they are intrinsically related to counties and local markets. In Brazil, ANBIMA prepares a file with a list of holidays up to the year of 2078 which is largely used by market practioners for pricing financial instruments.

Several financial libraries compute the holidays, giving no option to users set it by their own. Furtherly, the financial calendar is usually a small feature of a huge library, as quantlib, for example, and some users, including myself, don't want to put a hand in such a huge library only to use the financial calendar.

bizdays is a pure Python module relying on its simplicity and the power of Python's batteries. bizdays computes business days between two dates and other collateral effects, like adjust a given date for the next or previous business day, check whether a date is a business day, creates generators of business days sequences, and so forth. bizdays is a module without further dependencies, what makes it appropriated for small implementations.

Project details

Download files

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

Source Distribution

bizdays-1.0.2.tar.gz (8.9 kB view hashes)

Uploaded source

Built Distribution

bizdays-1.0.2-py3-none-any.whl (9.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page