Skip to main content

b3futurecontracts

B3 is a stock exchange in Sao Paulo, Brazil. This module evaluates the rollover date of some of its future contracts.

Classes

Currently this module provides two classes, B3FutureIndex and B3FutureDollar. These classes have two main methods, rollover_date and current_name; both take a date as argument and return the rollover date and the current names of the future contract as of the given date, respectively.

Sample code

>>> import datetime as dt
>>> from b3futurecontracts import *
>>>
>>> today = dt.date.today()
>>> print(today)
2019-12-01
>>>
>>> futureindex = B3FutureIndex(today)
>>> print(futureindex.rollover_date(), futureindex.current_name()[0])
2019-12-11 WINZ19
>>>
$ python -m b3futurecontracts
2019-01-05  2019-02-13 WING19  2019-02-01 WDOG19
2019-01-20  2019-02-13 WING19  2019-02-01 WDOG19
2019-02-05  2019-02-13 WING19  2019-03-01 WDOH19
2019-02-20  2019-04-17 WINJ19  2019-03-01 WDOH19
2019-03-05  2019-04-17 WINJ19  2019-04-01 WDOJ19
2019-03-20  2019-04-17 WINJ19  2019-04-01 WDOJ19
2019-04-05  2019-04-17 WINJ19  2019-05-02 WDOK19
2019-04-20  2019-06-12 WINM19  2019-05-02 WDOK19
2019-05-05  2019-06-12 WINM19  2019-06-03 WDOM19
2019-05-20  2019-06-12 WINM19  2019-06-03 WDOM19
2019-06-05  2019-06-12 WINM19  2019-07-01 WDON19
2019-06-20  2019-08-14 WINQ19  2019-07-01 WDON19
2019-07-05  2019-08-14 WINQ19  2019-08-01 WDOQ19
2019-07-20  2019-08-14 WINQ19  2019-08-01 WDOQ19
2019-08-05  2019-08-14 WINQ19  2019-09-02 WDOU19
2019-08-20  2019-10-16 WINV19  2019-09-02 WDOU19
2019-09-05  2019-10-16 WINV19  2019-10-01 WDOV19
2019-09-20  2019-10-16 WINV19  2019-10-01 WDOV19
2019-10-05  2019-10-16 WINV19  2019-11-01 WDOX19
2019-10-20  2019-12-18 WINZ19  2019-11-01 WDOX19
2019-11-05  2019-12-18 WINZ19  2019-12-02 WDOZ19
2019-11-20  2019-12-18 WINZ19  2019-12-02 WDOZ19
2019-12-05  2019-12-18 WINZ19  2020-01-02 WDOF20
2019-12-20  2020-02-12 WING20  2020-01-02 WDOF20
$

Installation

pip install b3futurecontracts

Release files for b3futurecontracts 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for b3futurecontracts 0.0.7
File Size Uploaded
b3futurecontracts-0.0.7.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for b3futurecontracts 0.0.7
File Interpreter ABI Platform
b3futurecontracts-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / b3futurecontracts-0.0.7.tar.gz

Download URL b3futurecontracts-0.0.7.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1071a3aa1b94e8083645e6bb908ade693dce440044330e4edbae154d4274870f
BLAKE2b-256 checksum
How to use checksums
1930ba19ddfd27201279a4eb4db7a84cb0bcbc34f1767469a5d694bb0ab1411c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.9

Release files / b3futurecontracts-0.0.7-py3-none-any.whl

Download URL b3futurecontracts-0.0.7-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cd2afeb74dcef513c0da575bc29cd9e257e305fa5a953c5465f74975050f42c
BLAKE2b-256 checksum
How to use checksums
ea62094800c72b26addf20f3cd885ddd5bceb7a553d40aaff3413ca420bb43a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page