← Research

Systematic research infrastructure

Systematic Trading Research Platform

A Python platform built to make parameter selection, transaction costs, walk-forward evaluation, benchmark comparison, and post-trade attribution easier to audit.

PythonPandas / NumPyDuckDBAlpacaMatplotlib

Purpose

The current baseline is deliberately simple: a long/flat SPY moving-average strategy. The point is not to present a backtest as a finished trading strategy. It is to build a research process where data handling, parameter choice, transaction costs, and out-of-sample performance are explicit.

Walk-forward design

Each fold trains on the previous 12 months, selects the moving-average pair using training data only, carries pre-test observations solely as indicator warm-up history, then resets accounting at the start of the 3-month OOS window. Positions, turnover costs, returns, trades, and equity are recomputed on the true test period.

12m train→parameter selection→warm-up only→3m OOS→advance & repeat

Current baseline

MetricStrategySPY buy & hold
CAGR9.2%17.1%
Annualized Sharpe0.821.07
Maximum drawdown-11.8%-19.0%

The strategy reduced drawdown and market exposure, but did not outperform SPY on return or Sharpe. I use trade-level, regime, and flat-period attribution to study where it helped, where it failed, and whether the research design itself is introducing bias.

Out-of-sample walk-forward strategy equity curve compared with SPY buy and hold
Out-of-sample equity comparison. The walk-forward strategy compounds more slowly than SPY, making the benchmark shortfall immediately visible rather than hiding it behind standalone strategy statistics.
Out-of-sample drawdown comparison between the walk-forward strategy and SPY buy and hold
Out-of-sample drawdown comparison. The strategy experienced a shallower maximum drawdown than SPY, illustrating the return-versus-risk tradeoff behind the headline metrics.
Important: these are historical research/backtest results, not live trading performance.

What I learned

The project made implementation details impossible to treat as bookkeeping. Indicator warm-up, fold boundaries, position shifting, cost application, and return construction can all change the answer. The useful outcome was not a claim of alpha; it was a cleaner process for discovering when a strategy does not survive a fair test.

Inspect the repository ↗