Projects Quantitative finance · Research

Quantitative lab

My own market research infrastructure: a backtesting engine across 224 pairs and five exchanges, on-chain wallet analysis and stock alerts.

Role
Creator
Year
2025–2026
Tools
Python · pandas · NumPy · Binance · Bybit · OKX · Bitget and KuCoin APIs · Arkham · NetworkX · scikit-learn · Telegram
Status
Research tools
DemoA backtest report on real BTC, ETH and SOL data, computed in your browser

How to use it

A real backtest report computed in your browser with daily candles and funding rates from Hyperliquid since June 2023, for BTC, ETH and SOL. There are four strategies:

  • Momentum with volatility targeting: invested when the return over the last days is positive, with size scaled to target a fixed volatility.
  • Moving-average crossover: invested while the fast average is above the slow one.
  • Donchian breakout: enters on a new high and exits on a new low.
  • Funding carry: the real engine’s strategy. It buys spot and sells the perpetual to collect funding, only when its recent average exceeds a threshold; the lower panel shows that annualised funding.

Performance shows the equity curve against buy and hold, the drawdown and a metrics table: annual return, volatility, Sharpe, Sortino and Calmar ratios, exposure, winning trades and profit factor. Robustness shows the Sharpe ratio of every parameter combination and an out-of-sample test: the best combination using data up to October 2025 is evaluated on the following year, which was not used to choose it. Fees (0.1% per trade, double for the carry) can be switched off to see their effect.

Not investment advice.

Testing an investment idea rigorously demands the same as any research: clean data, realistic costs and results that can be compared. This lab is the infrastructure I built for that: a backtesting engine on two years of history across five exchanges, analysis of large wallets on the blockchain and automatic stock alerts.

224
Perpetual futures pairs with two years of data
5
Exchanges unified into a single format
4
Strategies sharing one interface, comparable with each other
11,957
Trades simulated in a single comparison
§ 01

The backtesting engine

It evaluates funding and arbitrage strategies on crypto perpetual futures, a market where long positions pay short ones (or the other way round) every few hours. It is designed in independent layers:

  1. Unified data. Connectors for Binance, Bybit, OKX, Bitget and KuCoin download two years of candles and funding rates. Each exchange names the same coin differently (1000PEPEUSDT, PEPE-USDT-SWAP…), so a symbol mapper brings them together into a catalogue of 224 comparable pairs.
  2. Strategies as modules. Four strategies share the same interface, so adding a new one doesn’t require touching the rest: cash and carry (collecting funding with a hedged position), funding scalp, trend following and cross-exchange arbitrage.
  3. Realistic execution. Configurable fees, slippage and position size. Signals are computed only with the information available at each moment, to avoid look-ahead bias.
  4. Comparable reports. Return, hit rate, profit factor and breakdown by pair and by strategy, in CSV and as an HTML page. A single comparison simulated 11,957 trades.
§ 02

On-chain analysis

Tools to follow capital flows on the Ethereum blockchain:

  • Transaction collector with its own database.
  • Transfer graph between wallets (NetworkX) and clustering by behavioural patterns (DBSCAN) and by common source of funds, to identify wallets controlled by the same entity.
  • Large-wallet detector using the Arkham API: it discards market makers, exchanges and known infrastructure, and finds the wallets that accumulated in the buying zones and distributed near the highs.

In the PEPE case study, the system identified wallets that bought up to two and a half million dollars during the accumulation phase and sold between six and eleven million during the following rally.

§ 03

Stocks and options

  • Options scanners on the S&P 500, fed by a daily options-chain collector.
  • Telegram alerts: technical indicators, ticker validation and an automatic daily summary.
§ 04

What the public data show

  • Funding has collapsed. BTC’s average annualised rate fell from 24.1% in 2024 to 5.2% in 2026; SOL’s, from 28.1% to 0.3%. That’s why the carry, which paid with very little risk in 2024, barely earns anything in the last year: exactly the kind of regime change a good backtest has to detect.
  • Trend following cuts risk more than return. On BTC, momentum with volatility targeting improves on buy-and-hold’s Sharpe (1.13 versus 0.96) with half the maximum drawdown (−27.6% versus −53.0%). On ETH, all three trend strategies beat buy and hold on Sharpe.
  • What works in sample doesn’t always work out of sample. The robustness map shows it with data: in all twelve cases (three assets times four strategies), the best combination chosen with data up to October 2025 does worse the following year, and in five of them the Sharpe turns negative.
§ 05

What I take away

Good research infrastructure matters more than any particular strategy: clean, unified data, interchangeable pieces, realistic costs and a clear discipline not to mistake a good fit for a real edge. With that, evaluating a new idea takes minutes.