Quantitative research

Quantitative research

Market data rarely behaves like the independent samples most statistical tools assume. Returns depend on recent returns, labels overlap in time, and a backtest without costs flatters almost any model. Our research is built around those problems.

Our paper

Autocorrelation of returns in major cryptocurrency markets

Do past returns in major crypto markets predict the next ones? We tested BTC/USD, ETH/USD and ETH/BTC on Bitfinex and XBT/USD on BitMEX. Significant autocorrelation showed up on 5-minute and hourly bars in every market.

  • Research paper, 11 pages and 12 figures
  • Eugene Tartakovsky, Ksenia Plesovskikh, Anastasiia Sarmakeeva and Alexander Bibik
  • arXiv 2003.13517, March 2020
BTC/USD Pearson autocorrelation at four bar frequencies
BTC/USD Pearson autocorrelation at four bar frequencies.

The research pipeline

  1. Data: load and check market history.
  2. Bars: choose how to sample the market, by time, ticks, volume or price moves.
  3. Features: compute indicator and statistical grids.
  4. Event labels: mark outcomes with triple barriers and their end times.
  5. Validation: split data in time order without leaking the future.
  6. Model evaluation: fit, threshold and score classifiers such as LightGBM and XGBoost.
  7. Simulation: trade the predictions with fees, impact and drift.
  8. Sizing: decide how much capital each signal gets with fractional Kelly.

Open-source tools

NumPy Extensions

numpy_ext adds missing-value handling, rolling and expanding windows and parameter-range helpers to NumPy. It runs the paper's rolling one-year autocorrelation.

tindicators

tindicators is our fork of Tulip Indicators, with over 160 technical indicators and C, Python and C# interfaces.

Articles

Building a quantitative research pipeline: data, features and event labels

The fixed, reproducible stages that take raw market observations to event labels, and where each stage's output goes next.

Cross-validation for overlapping financial observations

How purging and embargo stop labels from leaking across the train/test boundary, worked through with real indices from our test suite.

Bootstrap methods: visual comparison

From the IID bootstrap to block methods for serially dependent data. Each method gets a plain explanation and a picture of one iteration.

From model predictions to backtests and position size

Probability checks, costed simulation, and Kelly and Monte Carlo limits on exposure. One scenario runs from probability to net PnL.