Skip to content

Benchmark: StrataNet vs LSTM vs GRU

Full benchmark notebook: notebooks/benchmark_stratanet_vs_lstm_gru.ipynb

Setup

  • Dataset: 5,000 synthetic OHLCV bars with realistic regime shifts (drift cycles every ~500 bars)
  • Train/Test split: 4,000 / 1,000 bars
  • Sequence length: 30 bars per sample
  • Labels: generated by STRATA rule-based teacher — same labels for all models (fair comparison)
  • Commission: 0.05% per trade + 0.02% slippage

Model Configurations

Model Architecture Hidden Dim Parameters
StrataNet Custom GRU-like + structured head 4 (interpretable) ~5,000
GRU Standard PyTorch GRU 32 (opaque) ~9,000
LSTM Standard PyTorch LSTM 32 (opaque) ~12,000

All models trained for 40 epochs, Adam optimizer, cosine LR schedule, same batch size.

Key Findings

1. StrataNet achieves comparable accuracy with 2.5× fewer parameters

StrataNet's structured 4-dim hidden state is an inductive bias that forces the network to learn compact, semantically meaningful representations — similar to how domain-specific architectures (ResNet, Transformer) outperform generic MLPs.

2. Only StrataNet provides interpretable inference

At every timestep during backtesting, StrataNet exposes:

h["bias"]        # Is the model currently bullish or bearish?
h["trap_risk"]   # Is the model sensing a potential trap?
h["momentum"]    # How strong is the current directional energy?
h["uncertainty"] # How ambiguous is the current regime?

LSTM and GRU hidden states have no semantic meaning.

3. Teacher-student training eliminates labeling cost

All three models use STRATA-generated labels — no manual labeling required. This means any OHLCV dataset can be used for training out of the box.

Running the Benchmark Yourself

pip install strata-market jupyter
jupyter notebook notebooks/benchmark_stratanet_vs_lstm_gru.ipynb

Or run headlessly:

jupyter nbconvert --to notebook --execute \
    notebooks/benchmark_stratanet_vs_lstm_gru.ipynb \
    --output notebooks/benchmark_executed.ipynb

Results are saved to notebooks/results/benchmark_results.csv and equity_curves.csv.