Open-source collection of quantitative tools, mathematical models, and algorithms for crypto derivatives, macro liquidity, and on-chain intelligence. Built for algorithmic traders, quant researchers, and students.
| Tool | File | Focus | Description |
|---|---|---|---|
| Squeeze Detector | squeeze_detector.py |
Derivatives | Detects Short/Long Squeeze risks using Open Interest & Funding Rates |
| Order Book & OBI | order_book.py |
Market Microstructure | Order Book Imbalance (OBI), Bid-Ask spread & depth analysis |
| Tape Reading (CVD) | tape_reading.py |
Order Flow | Order flow tick processing, Volume Weighted Average Price (VWAP) & CVD |
| On-Chain Metrics | onchain_metrics.py |
Fundamental | Computes Realized Cap, MVRV Ratio and Net Unrealized Profit/Loss (NUPL) |
| Macro Correlation | macro_metrics.py |
Portfolio Risk | Pearson Correlation matrix & annualized Sharpe Ratio vs TradFi |
| Liquidation Engine | liquidation_price.py |
Risk Management | Exact liquidation threshold considering maintenance margin & exchange tiers |
| AMM Slippage & IL | amm_slippage.py |
DeFi | Constant Product AMM ( |
| Cross-Border Route | transfer_route.py |
Arbitrage / FX | Optimal international remittance routes comparing stablecoin rails vs SWIFT |
| Tax Compliance BR | brazilian_tax.py |
Accounting | Weighted average cost (CMP) & tax calculation under Brazilian crypto regulations |
Click the badge above to open the full interactive Jupyter Notebook in Google Colab with zero local installation required.
To run locally:
git clone https://github.com/yuritpf/crypto-quant-tools-python.git
cd crypto-quant-tools-python
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python squeeze_detector.pyThis repository contains sample algorithms from the Formação Cripto Especialista & Terminal Global de Valores (TGV).
If you want access to:
- The Complete 33-Robot Laboratory (automated grid bots, funding rate arbitrageurs, automated scrapers, and volatility sentinels);
- 11 Specialized Digital Books (290 pages covering macro, DeFi, order flow, risk defense, and taxation);
- 24/7 TGV Market Intelligence Telegram Feed (7 daily real-time quantitative reports covering B3, Wall Street, Treasury Yields & Crypto derivatives):
👉 Access the Full Suite on Hubla (Funders Cohort)
👉 Direct VIP Terminal Access
MIT License. Free for educational and research use.