Skip to main content

Quantitative trading library for BIST

Project description

bist_quant

Quantitative research and backtesting library for Borsa Istanbul (BIST). Version 0.3.3.

bist_quant is a Python library for factor research, signal construction, backtesting, portfolio analytics, and BIST-focused data workflows. It is designed to be usable from notebooks, scripts, dashboards, and external applications without requiring a repo checkout.

Install

pip install bist-quant

Quick Start

from bist_quant import DataLoader, DataPaths, PortfolioEngine

paths = DataPaths()
loader = DataLoader(data_paths=paths)
engine = PortfolioEngine(
    data_loader=loader,
    options={"use_regime_filter": False},
)

result = engine.run_factor("momentum")
print(f"Sharpe: {result['sharpe']:.2f}")
print(f"CAGR:   {result['cagr']:.1%}")

By default the library uses user-scoped directories:

  • data: ~/.local/share/bist-quant/data
  • regime outputs: ~/.local/share/bist-quant/regime/simple_regime
  • cache: ~/.cache/bist-quant

Override them with BIST_DATA_DIR, BIST_REGIME_DIR, and BIST_CACHE_DIR when needed. If you are working from local parquet/CSV files, set BIST_DATA_SOURCE=local.

What Ships in the Library

  • portfolio.py - PortfolioEngine and backtest entry points
  • signals/ - factor and signal builders
  • analytics/ - performance analytics and metrics
  • clients/ - built-in data-provider integrations
  • common/ - data loading, backtester, risk, and shared helpers
  • configs/ - strategy registry and configuration loaders
  • regime/ - regime classification helpers
  • realtime/ - quote and market snapshot helpers

Data Setup

The package does not ship datasets. Point it at an existing dataset directory or seed data into the default user-scoped location.

export BIST_DATA_DIR="$HOME/.local/share/bist-quant/data"
python -m bist_quant.fetchers.fetch_gold_prices
python -m bist_quant.fetchers.fetch_indices
python -m bist_quant.clients.update_prices

Documentation

Development

Contributor setup lives in CONTRIBUTING.md. App-stack deployment notes remain in deploy/README.md, but they are out of scope for the published library package.

License

Apache License 2.0 - see LICENSE.

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

bist_quant-0.3.3.tar.gz (530.0 kB view details)

Uploaded Source

Built Distribution

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

bist_quant-0.3.3-py3-none-any.whl (508.4 kB view details)

Uploaded Python 3

File details

Details for the file bist_quant-0.3.3.tar.gz.

File metadata

  • Download URL: bist_quant-0.3.3.tar.gz
  • Upload date:
  • Size: 530.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for bist_quant-0.3.3.tar.gz
Algorithm Hash digest
SHA256 15be9757364329335bb6bf43cb6e5229d4e280843d238c048f1d933fffbccd40
MD5 e79f3e9e14ff67b48fc33f0d47ae32bd
BLAKE2b-256 97059ad8b83755450193f70834265c9084915f5691b1aba655bf69abab45fb0b

See more details on using hashes here.

File details

Details for the file bist_quant-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: bist_quant-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 508.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for bist_quant-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0955d24a72b10e891cb7246d1121f9f06497d17be2bcb24539079ea64b45c901
MD5 b203f7aa1c89dc3bfde3640ff8d31ac8
BLAKE2b-256 632f90a47543cd9667078c950ac9a167e5c7d9fc13228b9dc012cb9e9ac484e5

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