This repository contains the implementation of a Bayesian Long Short-Term Memory (Bayesian LSTM) model designed to predict hourly log returns and estimate both Epistemic and Aleatoric uncertainty for major cryptocurrency assets (SOL, BTC, and DOGE).
This project is part of a Master's Thesis in Mathematics (Statistics Concentration) at Andalas University.
- Bayesian Inference: Built using
blitz-bayesian-pytorchfor Variational Inference. - Uncertainty Estimation: Quantifies market noise (aleatoric) and model confidence (epistemic) using Monte Carlo Sampling.
- Feature Engineering: Includes log returns, volatility metrics, and cyclical time encoding (sin/cos).
- Multi-Asset: Pre-trained weights and artifacts for Solana (SOL), Bitcoin (BTC), and Dogecoin (DOGE).
data: The data used in this research.notebooks: Jupyter notebook file for model development.requirements.txt: Necessary libraries.
Results based on backtesting process using Bayesian LSTM model for trading strategy on the test data (Jan 2025 - Nov 2025):
| Asset | RMSE | Sharpe Ratio | PICP (95% CI) |
|---|---|---|---|
| Solana (SOL) | 0.0094 | 0.7631 | 0.7631 |
| Bitcoin (BTC) | 0.0048 | -0.0112 | -0.0112 |
| Dogecoin (DOGE) | 0.0103 | 0.8999 | 0.8999 |
Download the models at HuggingFace.


