Documentation
This page presents an in depth documentation of our machine-learning models trained on historical data. Results are presented for research and analytical purposes only.
LSTM (Long Short-Term Memory)
Deep LearningA deep learning model that predicts next-step log returns using an LSTM architecture trained on historical OHLCV data. Predictions are reconstructed back to price levels for evaluation and charting.
How It Works
- Pulls market data from Alpaca Bars (equities or crypto pairs)
- Builds sliding windows over the chosen lookback period
- Target at time t+1: r_{t+1} = log(close_{t+1} / close_t)
- Prediction made from window ending at t: predict r_{t+1}, then reconstruct close_{t+1}
Visualizations
Model Architecture

Actual vs Predicted Prices

Data Inputs
Crypto
CryptoHistoricalDataClient
Equities
StockHistoricalDataClient (coming soon)
Feature Matrix
[open, high, low, close, volume] as float64
Timeframes
Minutes, Hours, Days with multiplier (15m, 1h, 1d)
Feature Engineering
Window Size
200-500
Sample Shape
(window_size, 5)
Target
Next-step log return of close
r = log(close_{t+1} / close_t)
Data Split
Train: 70%
Validation: 15%
Test: 15%
Sequential split (no shuffling) to preserve time order
Scaling & Normalization
Feature Scaling
StandardScaler fitted on flattened training windows only
Target Scaling
Separate scaler fitted on y_train only
Leakage Prevention
Val/test data never seen during scaler fitting
Neural Network Architecture
Checking access...
Prediction & Evaluation
Checking access...
Note: All models have been tested on out-of-sample data to ensure realistic performance metrics. Past performance does not guarantee future results. These models are implementations based on academic research and have been adapted for our trading platform. Terms of Use