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 Distribution

brvm_package-0.2.1.tar.gz (349.3 kB view details)

Uploaded Source

Built Distribution

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

brvm_package-0.2.1-py3-none-any.whl (373.5 kB view details)

Uploaded Python 3

File details

Details for the file brvm_package-0.2.1.tar.gz.

File metadata

  • Download URL: brvm_package-0.2.1.tar.gz
  • Upload date:
  • Size: 349.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for brvm_package-0.2.1.tar.gz
Algorithm Hash digest
SHA256 da910199b688483488f2279fd8d4c455321927148529e6f5ee077cb5c36e6df2
MD5 44e317706f6163373508de69a92e6980
BLAKE2b-256 278ff7e04569fc941a3efaca67d97751b7e0fc813a8c7ec08f50d8dfd733f50d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brvm_package-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 373.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23d7ddd71bee0c63eecdb323270908057730979da5808d5509216e2873c386cd
MD5 2c9414ab175954ef5ad8b03716292f8e
BLAKE2b-256 1fbeecc686292b118303f6ec11b4500491159cbc9eaa04a66ec13fc375099f07

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