Precision LSTM Trading Model v2

Bidirectional LSTM with Multi-Head Self-Attention for cryptocurrency trading signal prediction.

Model Details

  • Architecture: BiLSTM(128) + BiLSTM(64) + Multi-Head Attention(4 heads) + GlobalAveragePooling + Dense layers
  • Features: 28 engineered technical indicators across 96 candles (24-hour window)
  • Output Classes: LONG, SHORT, HOLD
  • Loss Function: Focal Loss with label smoothing

Performance

  • Test Loss: 0.0961
  • Test Accuracy: 0.4563
  • LONG F1 Score: 0.5818
  • SHORT F1 Score: 0.2674

Training Configuration

  • Epochs: 20
  • Batch Size: 128
  • Training Samples: 159777
  • Test Samples: 39603
  • Regularization: L1L2 (L1=1e-05, L2=0.0001)

Features (28 total)

  • OHLCV (5): open, high, low, close, volume
  • Trend (3): SMA_20, STD_20, returns
  • SMC (6): FVG bullish/bearish, liquidity sweeps, break of structure
  • Momentum (3): RSI_14, MACD, MACD_signal
  • Volatility (1): ATR_14
  • Bollinger (2): upper/lower distance
  • Volume (1): volume SMA ratio
  • Candle (3): body, upper shadow, lower shadow
  • Advanced SMC (4): order blocks, change of character

Usage

\python import tensorflow as tf import joblib import numpy as np

Load model and scaler

model = tf.keras.models.load_model('trading_model.keras') scaler = joblib.load('feature_scaler.joblib')

Prepare features (shape: samples, 96, 28)

features_scaled = scaler.transform(features)

Make predictions

predictions = model.predict(features_scaled) \

Training Date

2026-05-11T17:56:52.932268+00:00

License

MIT

Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support