Skip to main content
QUICK REVIEW

[Paper Review] Financial series prediction using Attention LSTM

Sang-Yeon Kim, Myungjoo Kang|arXiv (Cornell University)|Feb 28, 2019
Stock Market Forecasting MethodsDecision Sciences22 references16 citations
TL;DR

This paper proposes an attention-enhanced LSTM model for predicting trends in the KOSPI 200 index using multi-source financial time series data. By integrating weighted attention mechanisms with LSTM networks, the model improves prediction accuracy—achieving a 0.763 hit ratio—while enabling interpretable visualization of attention weights to identify key influencing factors and time periods.

ABSTRACT

Financial time series prediction, especially with machine learning techniques, is an extensive field of study. In recent times, deep learning methods (especially time series analysis) have performed outstandingly for various industrial problems, with better prediction than machine learning methods. Moreover, many researchers have used deep learning methods to predict financial time series with various models in recent years. In this paper, we will compare various deep learning models, such as multilayer perceptron (MLP), one-dimensional convolutional neural networks (1D CNN), stacked long short-term memory (stacked LSTM), attention networks, and weighted attention networks for financial time series prediction. In particular, attention LSTM is not only used for prediction, but also for visualizing intermediate outputs to analyze the reason of prediction; therefore, we will show an example for understanding the model prediction intuitively with attention vectors. In addition, we focus on time and factors, which lead to an easy understanding of why certain trends are predicted when accessing a given time series table. We also modify the loss functions of the attention models with weighted categorical cross entropy; our proposed model produces a 0.76 hit ratio, which is superior to those of other methods for predicting the trends of the KOSPI 200.

Motivation & Objective

  • To improve financial time series prediction accuracy for the KOSPI 200 index using deep learning models.
  • To evaluate and compare the performance of multiple deep learning architectures, including MLP, 1D CNN, LSTM, and attention networks.
  • To enhance model interpretability by visualizing attention vectors for both input factors and temporal sequences.
  • To optimize loss functions using weighted categorical cross entropy to improve performance on imbalanced trend prediction tasks.
  • To identify the most influential time periods and financial factors driving model predictions through attention weight analysis.

Proposed method

  • Trained a stacked LSTM model on a 10-year dataset (2007–2016) of KOSPI 200 and related financial indicators including currency, global indices, and commodities.
  • Integrated an attention mechanism into the LSTM architecture to dynamically weigh the importance of different time steps and input features.
  • Implemented a weighted categorical cross-entropy loss function to prioritize correct predictions on high-magnitude price changes and improve model robustness.
  • Visualized attention vectors for both temporal (time) and feature (factor) dimensions to interpret model decisions and identify critical inputs.
  • Used a 60-day lookback window for input sequences and evaluated predictions at various future horizons (e.g., 40-day forward prediction).
  • Performed five independent training runs per model to ensure result stability and reported average performance metrics including hit ratio and earned points.

Experimental results

Research questions

  • RQ1How do different deep learning models—MLP, 1D CNN, LSTM, and attention networks—compare in predicting KOSPI 200 trend directions?
  • RQ2What is the impact of using weighted attention mechanisms versus standard attention on prediction accuracy and model stability?
  • RQ3Which financial factors and time periods receive the highest attention weights in the model, and how do they correlate with prediction outcomes?
  • RQ4How does the length of the lookback window affect prediction performance across different models?
  • RQ5To what extent can attention visualization provide intuitive, interpretable insights into the model’s decision-making process for financial trend prediction?

Key findings

  • The weighted attention LSTM model achieved the highest hit ratio of 0.763 on the test set, significantly outperforming other models including standard attention networks (0.715) and baseline models.
  • For positive trend predictions, the weighted attention model achieved a 70.9% accuracy, while for negative trends, it reached 72.3%, indicating strong performance across both directions.
  • The model earned 1,257.462 points in simulated trading, a 15% improvement over the standard attention network (1,090.718 points), demonstrating superior profitability in a risk-adjusted simulation.
  • Attention visualization revealed that the S&P 500 global index and the U.S. dollar index were the most heavily weighted factors, while the final day of the input window and several middle days had the highest temporal attention weights.
  • Longer lookback windows (60 days) consistently improved hit ratios across models, with optimal performance observed at 40-day prediction horizons.
  • The model’s attention mechanism effectively highlighted key inputs, enabling intuitive interpretation of why specific trend predictions were made, particularly during periods of high market volatility.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.