Implementation of Bidirectional LSTMs for Predicting BTC Prices

Authors

  • Cahyo Adi Nugroho MSc in Financial Engineering, WorldQuant University, USA

DOI:

https://doi.org/10.47709/mda.v3i1.8359

Keywords:

Bitcoin price prediction, Bidirectional LSTM, Attention mechanism, Walk-Forward Validation, cryptocurrency forecasting, Deep Learning

Abstract

Forecasting Bitcoin (BTC) prices is difficult due to persistent volatility, the dominance of market sentiment, and non-linear regime-dependent dynamics. This paper implements a Bidirectional Long Short-Term Memory (BiLSTM) framework to predict short-horizon BTC movements using an hourly BTC/USD dataset. The experiment models the 25-hour-ahead return (as a proxy for near-term price change) from a compact set of return-derived predictors: the current hourly return and cumulative rolling returns over 10 and 50 hours. Inputs and outputs are scaled via MinMax normalization, converted into fixed-length sequences (window size 30), and learned by a stacked BiLSTM network trained with Adam optimization, mean absolute error loss, and early stopping. Evaluation is conducted using an out-of-sample R-squared benchmarked against the training mean return, complemented by a sign-based trading backtest (long when predicted return is positive; short otherwise). Results show negative out-of-sample predictive power and weak trading performance, although the strategy loss is smaller than buy-and-hold on the tested segment. Overall, under the fixed architecture and hyperparameters examined, BiLSTM does not demonstrate a clear advantage over the referenced unidirectional configuration in the period tested and highlights the sensitivity of high-capacity sequence models to feature design and hyperparameter tuning in highly noisy crypto markets.

Downloads

Published

2026-06-15

How to Cite

Nugroho, C. A. (2026). Implementation of Bidirectional LSTMs for Predicting BTC Prices. Mathematical and Data Analytics, 3(1), 10–18. https://doi.org/10.47709/mda.v3i1.8359