Skip to content

About

Free financial data engine

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Alexandria 🏛️

Free, verified 1-minute financial data for backtesting and ML.

License: MIT Python 3.10+

"Data Freedom for All" — In the age of AI, data must be open.

🎯 What is Alexandria?

Alexandria is a free, open-source data infrastructure that provides:

  • 📊 Verified 1-minute OHLCV data for BTC, NASDAQ, Dow Jones
  • 🔥 99.95% correlation with Yahoo Finance (BTC)
  • 💾 50:1 compression using ZSTD + Hive partitioning
  • 🚀 M3/ARM optimized with Polars zero-copy reads
  • 🩹 Brownian Bridge gap repair for missing candles

⚡ Quick Start

pip install -r requirements.txt
import polars as pl

# Read BTC sample data
btc = pl.read_parquet("data/BTCUSDT-1m-2024.parquet")
print(f"Loaded {btc.height:,} 1-minute candles")
print(btc.head())

📈 Data Quality (Verified)

All data independently verified against Yahoo Finance:

Symbol Correlation Direction Match Source
BTCUSDT 99.95% 98.6% Binance
NSXUSD 90.14% 87.8% HistData
USA30IDXUSD 91.00% 88.9% Dukascopy

🛠️ Download More Data

from alexandria import SniperDownloader

# Download BTC data (uses Sniper Mode - bandwidth efficient)
sniper = SniperDownloader()
offset, size = sniper.fetch_zip_metadata(url, "BTCUSDT-1m-2024-01.csv")
# See examples/02_download_data.py for full example

📦 Core Modules

Module Purpose
core.py FoundryCore - Hive-partitioned storage
harvester.py Binance Sniper acquisition
harvester_tradfi.py HistData.com for indices
harvester_dukascopy.py Dukascopy Bank tick data
janitor.py Brownian Bridge gap repair
features.py JIT indicator calculation

🧪 Gap Repair

Alexandria uses Brownian Bridge SDE (not linear interpolation) to generate statistically valid synthetic candles that preserve market volatility.

📜 License

MIT License - Free to use, modify, and distribute.


Built with ❤️ for the open-source community.

About

Free financial data engine

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages