Skip to main content

BVMAC Data

An independent Python package for reading market data from the BVMAC's daily Bulletin Officiel de la Cote. It does not depend on the BRVM package.

The package downloads bulletin PDFs, stores extracted observations in a local SQLite file, and returns pandas DataFrames. The archive has two observed filename patterns: older bulletins use BOC-BVMAC-DD-MM-YYYY.pdf; later files use BOC-YYYYMMDD.pdf. The downloader tries the appropriate pattern and falls back to the other one.

Install

After release to PyPI, install with one command:

pip install bvmac-data

The package is not published on PyPI yet. To install from a downloaded or cloned source folder, open a terminal in its root and run python -m pip install .. Python 3.10 or newer is required. A GitHub release will provide a reviewed source download; PyPI installation will work only after a separate PyPI release.

License and reuse

This project is licensed under the Apache License, Version 2.0. See LICENSE. Copyright © 2026 Kadjah Ngango.

You may use, modify, and redistribute this package under Apache 2.0's terms. You retain copyright to your original work; contributors retain copyright to their own contributions, which are offered under Apache 2.0 unless a separate agreement applies.

This license covers the package code. It does not grant permission to redistribute BVMAC bulletin PDFs or other third-party content.

Read data already stored on your computer

import bvmac

prices = bvmac.load_prices("SOCAP")
shares = bvmac.load_equities("SOCAP")
index = bvmac.load_index()
bonds = bvmac.load_bonds()
bond_terms = bvmac.load_bond_issues()
funds = bvmac.load_funds()
issuer_facts = bvmac.load_issuer_snapshots()

These functions read directly from the package's local SQLite database. They do not download bulletins or reprocess PDFs. The package finds its standard database automatically, so you do not need to enter its file path. If the database is missing, the loader reports that clearly instead of creating an empty one. Each function also accepts optional start and end dates.

Fill or refresh the local database

Downloading and processing bulletins is a separate step. Run it when you want to build the local database or add newer dates:

import bvmac

bvmac.download_data(start="2025-01-01")

This downloads available PDFs, extracts their supported sections, and saves the results in the local database. It can take time for a large date range. After it finishes, use the load_*() functions above to read the saved data without downloading again. You can also use history() as a convenience when you specifically want it to check for newer bulletins and then return one share's prices:

prices = bvmac.history("SOCAP", start="2025-01-01")

Use an exchange Mnemo (ticker) or ISIN to identify an instrument.

The package keeps its files outside your current project folder:

Windows: %LOCALAPPDATA%\bvmac-data\
Other systems: ~/bvmac-data/

Inside that folder, downloaded PDFs go in bulletins/ and the database is bvmac.db. You normally do not need to find or manage those files yourself.

Read one bulletin PDF directly

import bvmac

data = bvmac.read_bulletin(r"C:\\Users\\you\\Downloads\\BOC-20261118.pdf")
shares = data["equities"]
bonds = data["bond_quotes"]
funds = data["funds"]

read_bulletin() reads that PDF directly and returns pandas DataFrames. It does not download anything or use the local database. Advanced users can pass a custom db_path to any database loader; otherwise, the standard local cache is used automatically. Results are pandas DataFrames, with dates returned as pandas dates.

What the columns mean

Shares

mnemo is the exchange's short ticker; isin is the security's international identifier. isin_valid reports whether the printed ISIN passes its checksum; invalid printed identifiers are retained with a warning instead of being silently treated as valid. open and close are the session's opening and closing prices in CFA francs. volume is the number of shares traded, value_fcfa is the total value traded, and transactions is the number of trades. bid_volume and ask_volume are the number of shares requested to buy and offered to sell. change_pct is the bulletin's daily percentage change. year_high and year_low are the bulletin's high and low prices since January, not the day's high and low. The daily bulletin does not provide daily high/low prices.

load_prices() returns Open, Close, Volume, Value, Change %, Year High, and Year Low. It does not invent missing daily High and Low values.

BVMAC-AS index

load_index() returns the value and daily percentage change when these can be read from the bulletin. Some editions show the value only inside a chart, so an index observation may be unavailable for those dates.

Bonds

load_bonds() returns quote observations, including the previous close, open and close prices as a percentage of face value, accrued coupon, order-book volumes, trades, and price limits. asset_class identifies sovereign, regional, or corporate bonds. The bulletin also has a separate issue table; the initial extractor stores coupon rate, issue size, maturity, repayment method, coupon dates, outstanding amount, yield, and turnover in a separate dataset available through load_bond_issues(). source_page indicates where the information came from.

Older bulletin layouts may not expose every bond row as readable table text. The pipeline reports extraction gaps; a missing row should not be interpreted as proof that no bond exists or traded.

Funds

load_funds() returns previous and current net asset values (NAVs), their dates, category, update frequency, and the bulletin's return figures. Funds can be daily, weekly, monthly, or quarterly; the NAV's own date is retained so users do not mistake a weekly update for a new daily price.

The frequency field is part of a fund observation's database key so daily, weekly, monthly, and quarterly NAVs remain separate. When an older database is opened after this change, the package makes a .pre-migration-*.bak copy before updating its schema.

Issuer snapshots

load_issuer_snapshots() returns the market capitalization table: last price, listed float and total shares, last dividend, three-month liquidity, earnings per share, price/earnings ratio, and float/total market capitalization. Company profiles and long-form annual financial statements are included in some bulletins but are not part of the initial daily-data release.

Data limits

  • The official bulletin is the source; this package is an independent PDF extractor, not a BVMAC API.
  • Not every weekday has a published bulletin. No-trade and missing-data values are kept distinct where the bulletin allows it.
  • An empty extraction warning means a table layout needs review; it does not mean the market had no instruments.
  • Historical coverage depends on the availability and extractability of the source PDFs. Always check the pipeline summary before relying on a date range.
  • This is historical market data, not a live quote feed or investment advice.

Development

The source project is standalone: package import name bvmac, distribution name bvmac-data, command bvmac-update.

The test suite includes regression checks against real BVMAC bulletins. Those PDFs are not included in this public repository because BVMAC's published website terms restrict redistribution of its documents. The PDF-specific checks skip when the fixtures are absent; see VALIDATION.md for details.

Metadata

Release files for bvmac-data 0.1.0

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

Source distribution (sdist)

Source distribution for bvmac-data 0.1.0
File Size Uploaded Provenance Actions
bvmac_data-0.1.0.tar.gz 32.1 kB With provenance Details for bvmac_data-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bvmac-data 0.1.0
File Interpreter ABI Platform Actions
bvmac_data-0.1.0-py3-none-any.whl Python 3 none any Details for bvmac_data-0.1.0-py3-none-any.whl

Total release size: 61.0 kB

Release files / bvmac_data-0.1.0.tar.gz

Download URL bvmac_data-0.1.0.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
33e67ebe747d5b2d6994d3b600a42ab7bc1e6b58e8bf2bf4a0fdf0a89f330ec1
BLAKE2b-256 checksum
How to use checksums
d4b7d9edc31736a4ff13fa1591a7ffbed198d52e91f18c1564ba7d5f7f862817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / bvmac_data-0.1.0-py3-none-any.whl

Download URL bvmac_data-0.1.0-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13cfb87a338a9f07db401cf5d6c27e906879a38aac33bc52c08909e68f2124ff
BLAKE2b-256 checksum
How to use checksums
8b8259d1c28a874c0542c8565b53a46831732691d75b540c5687dd7dec2b0f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Security for bvmac-data 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bvmac_data-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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