Rollover date of future contracts from the B3 exchange
Project description
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
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
Built Distribution
File details
Details for the file b3futurecontracts-0.0.7.tar.gz
.
File metadata
- Download URL: b3futurecontracts-0.0.7.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1071a3aa1b94e8083645e6bb908ade693dce440044330e4edbae154d4274870f |
|
MD5 | 9e1e0259333a485d8a226992eaf46bbd |
|
BLAKE2b-256 | 1930ba19ddfd27201279a4eb4db7a84cb0bcbc34f1767469a5d694bb0ab1411c |
File details
Details for the file b3futurecontracts-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: b3futurecontracts-0.0.7-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cd2afeb74dcef513c0da575bc29cd9e257e305fa5a953c5465f74975050f42c |
|
MD5 | 9ed9498ad3a18bc8efa973fd4f4e2d37 |
|
BLAKE2b-256 | ea62094800c72b26addf20f3cd885ddd5bceb7a553d40aaff3413ca420bb43a3 |