Strategy Showcase

May 9, 2026 · View on GitHub

This folder contains one subfolder per strategy type. The goal is to show how to implement different logic patterns and data requirements with the investing_algorithm_framework, and to provide a starting point for your own research. The strategies are intentionally simple and are not meant to be profitable as-is — they are reference implementations of a pattern, not production-grade alpha.

Each subfolder is self-contained and ships with:

  • README.md — what the strategy is, why it exists, fit level, parameters, caveats.
  • strategy.py — the TradingStrategy (or pipeline) implementation.
  • backtest.py — a runnable script that wires the strategy into an app and runs a backtest over a recent date range.
  • requirements.txt — Python dependencies for that specific subfolder.

If a strategy type cannot be implemented today with the framework, the subfolder contains only a README.md explaining why it is currently not possible and what would be needed to make it possible.

Fit legend

SymbolMeaning
Sweet spot — framework is well-suited and example is end-to-end runnable.
🟢Workable — implementable with some bookkeeping in user code.
🟡Partial — pattern is shown but a key primitive is approximated.
🔴Not currently possible — README only, explains why.

Index

1. Position-taking strategies (signal → orders)

#StrategyFitDescription
01trend_followingVector backtest of an EMA crossover.
02mean_reversionBuy oversold, sell overbought (Bollinger + RSI).
03cross_sectional_momentumPipeline ranks symbols by 30d return, holds top-N.
04multi_factor_portfolioPipeline blends momentum + low-vol + liquidity factors.
05pairs_trading🟢Z-score on BTC/ETH log-price spread.
06funding_rate_carry🟡Carry pattern shown, but no native perp/funding-rate data provider.
07event_driven_signalVolatility-breakout entry on bar-close events.
08dca_accumulationScheduled fixed-size buys (dollar-cost averaging).

2. Portfolio construction strategies

#StrategyFitDescription
09risk_parityInverse-volatility weighting, monthly rebalance.
10mean_variance_markowitzQuarterly Markowitz optimisation (scipy).
11hierarchical_risk_parityLópez de Prado HRP with scipy clustering.
12vol_targeting_overlayScales gross exposure to a target portfolio vol.

3. Execution strategies

#StrategyFitDescription
13twap_vwap_execution🟡Bar-level TWAP slicing of a parent order.
14implementation_shortfall🔴Needs intra-bar fills the framework does not currently model.
15iceberg_orders🔴Requires venue-side iceberg primitives not abstracted by the framework.

4. Derivatives strategies

#StrategyFitDescription
16options_selling_income🔴No options instrument / chain primitives in the framework today.
17volatility_trading🔴Requires a vol surface and option pricing pipeline.
18delta_hedged_options🔴Requires Greeks pipeline and options venue support.
19futures_basis_calendar🟡Pattern shown on spot proxy; no native futures-curve data model.

5. Slow market making

#StrategyFitDescription
20slow_market_making🟢Posts limit orders around mid every bar; capped inventory.

6. High-frequency / sub-second strategies (not currently possible)

#StrategyFitDescription
21active_market_making🔴Requires sub-ms event loop and L2 book — see iaf_realtime plan.
22latency_arbitrage🔴Requires colocated low-latency venue connectivity.
23hft🔴Bar-driven event loop is too slow for true HFT.
24orderbook_microstructure🔴No L2 order-book data model.
25news_nlp_subsecondEvent-driven trigger model planned — see #534.
26ml_inference_high_freq🔴Inference loop dominated by per-iteration overhead.

Running an example

cd examples/strategies_showcase/01_trend_following
pip install -r requirements.txt
python backtest.py

Backtests fetch OHLCV from the public BITVAVO endpoint via ccxt (no API keys required for market data). The first run will download data and cache it; subsequent runs reuse the cache.