Skip to main content

Python toolkit for BRVM market data, fundamentals, portfolio analytics, screening, and backtesting.

Project description

brvm-package [Tests: 17/17 PyPI

BRVM Data Science : API yfinance pour BRVM. Fundamentals live (PER/PBR/ROE/ROA/DY), screening dynamique (DY>8%, PER<10...), optimisation Markowitz, backtesting (frais/slippage), CLI sync/live.

🚀 Installation

pip install brvm-package matplotlib  # plot opt
git clone . ; pip install -e .
python -m brvm_package.cli.main sync  # DB live

🎯 API Complète - Exemple Chaque Commande

Market

import brvm_package as bv
bv.list_assets()  # ['ABJC', 'BICB', 'SNTS'...]
bv.list_sectors()  # ['Agriculture', 'Services Financiers']
bv.list_countries()  # ['Cote d'Ivoire', 'Senegal']
bv.list_indices(detailed=True)  # pd.DF Benchmark/Sector
bv.market_summary()  # Volume/top gainers
bv.search('bank')  # pd.DF BOA/ECOC

Data/Prix

bv.download('SNTS', '1y')  # OHLCV DF
bv.live_price('SNTS')  # 28500.0
bv.download_all('1mo')  # All
t = bv.Ticker('SNTS')
t.history('5y')  # Full
t.returns(log=True)  # Log returns
t.volatility()  # 25% ann

Fundamentals (PER/PBR...)

bv.valuation_ratios('SNTS')  # PER=7.01 ROE PBR DY=6.1% EPS Beta...
bv.market_cap('BOAC')  # Dict
bv.market_cap_all().head(5)  # Ranked DF weight
bv.dividends('SNTS')  # Hist
bv.financials('SNTS')  # Dict IS/BS/CF DF
bv.fundamental_history('SNTS')  # Time series
bv.shares_outstanding('SNTS')  # 100M
t.financials()  # Same

Screener

bv.screen(sector='Services Financiers', min_dividend_yield=0.05, max_pe=15, sort_by='market_cap')  # 8 banks DF
bv.screen(filters={'roe': ('>',0.1)})  # Custom
bv.screen(min_market_cap=1e12, limit=10)  # Large caps

Portfolio

p = bv.Portfolio(['SNTS','BOAC'])
p.optimize('markowitz')  # Weights optimal
p.performance()  # Sharpe Sortino alpha
p.efficient_frontier(25)  # DF frontier
p.backtest(1e6)  # Report equity_curve
p.plot()  # Equity
p.plot_allocation()  # Pie

Stratégies

bv.momentum_strategy(lookback=60)  # Top movers
bv.value_strategy()  # Low PER high DY
bv.backtest(bv.momentum_strategy(), 1e6)  # Full sim

Analytics

bv.returns_matrix()  # All
bv.correlation_matrix()  # NxN
bv.volatility('SNTS')  # %
bv.beta('BOAC')  # vs market

Macro/FX

bv.fcfa_exchange_rates()  # USD/EUR/XOF
bv.inflation()  # UEMOA

Plot

bv.candlestick('SNTS', '6mo')
bv.heatmap()  # Corr
bv.sector_allocation({'SNTS':0.5})
t.plot()

CLI

python -m brvm_package.cli.main richbourse  # Live table
python -m brvm_package.cli.main sikafinance SNTS  # JSON PER..
python -m brvm_package.cli.main sync BOAC  # Update

🏗️ Architecture

api/ objects/ analytics/ data/ fundamentals/ plotting/ providers/

Tests

pytest 17/17 | validate_package OK

MIT Licence

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brvm_package-0.2.0-py3-none-any.whl (424.2 kB view details)

Uploaded Python 3

File details

Details for the file brvm_package-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: brvm_package-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 424.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for brvm_package-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e198c17ed16f912f2c6d283a6763a698142632c8a4842f30d3061dcbdd65d49
MD5 833d3cd1871f3e46260d8772189b820f
BLAKE2b-256 298538fafbeeceabefdf246ed214c8e76677f23fd57a20c0d9785b414be49f67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page