Contextual Quantum Neural Networks for Stock Price Prediction

Sharan Mourya, Hannes Leipold, Bibhas Adhikari · 2025

Read Contextual Quantum Neural Networks for Stock Price Prediction by Sharan Mourya, Hannes Leipold, Bibhas Adhikari (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-01884.txt.

Introduction

Sharan Mourya, Hannes Leipold, and Bibhas Adhikari apply quantum machine learning to forecasting share prices for several firms at once. Their 2025 paper uses recent price trends to predict how future prices may spread out. A new training step, the quantum batch gradient update, speeds up standard gradient learning on quantum circuits.

On top of that, the team builds a multi-task design called share-and-specify. One circuit trains on Apple, Google, Microsoft, and Amazon together, with task labels steering shared and specific parts. Tests on S&P 500 data beat single-task quantum models. The joint design also captures how the stocks move together, and it represents the whole portfolio with few extra qubits.

Catalog record

CREATORSharan Mourya, Hannes Leipold, Bibhas Adhikari
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE76 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-01884

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Contextual Quantum Neural Networks for Stock Price Prediction Sharan Mourya, Hannes Leipold, Bibhas Adhikari Abstract In this paper, we apply quantum machine learning (QML) to predict the distribution of stock prices of multiple assets using a contextual quantum neural network. Our approach captures recent trends to predict future stock price distributions, moving beyond traditional models that focus on entire historical data. Utilizing the principles of quantum superposition, we introduce a new training technique called the quantum batch gradient update (QBGU), which accelerates the standard stochastic gradient descent (SGD) in quantum applications and improves convergence. Consequently, we propose a quantum multi-task learning (QMTL) architecture, specifically, the share-and-specify ansatz, that integrates task-specific operators controlled by quantum labels, enabling the simultaneous and efficient training of multiple assets on the same quantum circuit as well as enabling efficient portfolio representation with logarithmic overhead in the number of qubits. Through extensive experimentation on S&P 500 data for Apple, Google, Microsoft, and Amazon stocks, we demonstrate that our approach outperforms quantum single-task learning (QSTL) models by effectively capturing inter-asset correlations. Our findings highlight the transformative potential of QML in financial applications, paving the way for more advanced, resource-efficient quantum algorithms in stock price prediction and other complex financial modeling tasks. I Introduction Quantum computing is a computational paradigm that transcends the limitations of classical computing by harnessing the principles of quantum superposition and entanglement. These unique features enable quantum computers to tackle complex problems faster than classical systems can [ 1 , 2 , 4 , 5 ] . Owing to the potential exponential scaling of computational power with the number of qubits, quantum computing is expected to revolutionize diverse sectors, including medicine, engineering, energy, and finance [ 6 , 7 ] . Despite its immense potential, building a fully functional quantum computer is a monumental challenge that could take years, if not decades, to achieve a clear computational advantage over classical computers [ 8 , 9 ] . However, the near-term applications of quantum computing are particularly promising in fields like finance, where its ability to process vast amounts of complex data with fewer resources is transformative. Even with today’s noisy intermediate scale quantum (NISQ) devices - limited by a small number of qubits and short coherence times [ 9 ] - quantum methods can provide approximate solutions to certain financial problems, making them highly relevant in the immediate future [ 10 ] . Machine learning has become essential for financial tasks like, asset management [ 10 ] , risk analysis [ 11 ] , crash detection [ 12 ] , and portfolio optimization [ 13 ] . The ability of machine learning algorithms to analyze massive datasets, recognize patterns, and make fast predictions provides a significant competitive edge. Quantum machine learning (QML) [ 14 ] emerges at the intersection of these fields, combining quantum computing’s ability to process and represent complex states efficiently with the powerful predictive tools of machine learning [ 15 ] . With the exponential growth of financial data, current machine learning systems are quickly reaching the boundaries of classical computational models. In this context, quantum algorithms present a promising alternative by offering faster or higher quality solutions for specific classes of problems. Additionally, breakthroughs in quantum learning theory suggest that, under certain conditions, there is a provable distinction between classical and quantum learnability [ 16 ] . This implies that problems deemed challenging for classical systems could see significant improvements through the adoption of QML approaches. Quantum machine learning can be broadly categorized into two main components: parametric quantum circuit (PQC) optimization and classical-to-quantum information encoding [ 10 ] . These categories represent two core components of QML algorithms and workflows, each addressing a different aspect of how classical data interacts with quantum systems and how quantum models are trained. PQCs are quantum circuits that contain tunable parameters, interpretable as weights of a quantum neural network. These parameters are adjusted iteratively to minimize or maximize a cost function, similar to how classical machine learning algorithms optimize parameters during training. PQCs can further be classified into two categories: variational quantum circuits (VQC) and quantum neural networks (QNN). VQCs involve a hybrid architecture where a classical computer works alongside a quantum computer in a loop, while QNNs consist of circuit architectures tailored to specific problems. Recently, there have been a surge of research interest in these areas. For instance, hybrid architectures using parameterized quantum circuits in combination with classical optimization loops have been successfully deployed for classification tasks [ 17 ] , while support vector machines (SVM) have been utilized for data classification [ 18 ] . In another study, quantum state space was used as the feature space to improve the learnability of QML and achieve quantum advantage in classification tasks [ 19 ] . Quantum versions of machine learning models, such as Boltzmann machines [ 20 ] , recurrent neural networks [ 21 ] , generative adversarial neural networks [ 22 ] , reinforcement learning [ 23 ] , and reservoir computing [ 24 ] , have been extensively studied. In finance, quantum machine learning has been applied to various tasks, including options pricing [ 25 ] , time-series forecasting [ 27 ] , and stock price prediction [ 29 ] . A notable example is a hybrid architecture developed for financial predictions [ 34 ] , while quantum Wasserstein generative adversarial neural networks were employed for time-series predictions on the S&P 500 [ 35 ] . Unsupervised quantum machine learning has also been explored for clustering and fraud detection [ 36 ] . On the other hand, significant progress has also been made in loading classical information onto quantum states. For example, quantum adversarial neural networks have been utilized to load random distributions onto quantum circuits using feature maps [ 37 ] , and quantum Wasserstein GANs have achieved similar tasks with a gradient penalty, improving performance over previous approaches [ 35 ] . While many financial computational problems like portfolio management and risk analysis require training across multiple assets, only few studies have addressed this need. For instance, joint learning of two distributions was achieved in [ 38 ] , though its direct application to financial problems like stock price prediction remains limited due to computational expense and the reliance on feature maps, which will be further explained in this paper. A related study [ 39 ] applied quantum reservoir computing and multi-task learning [ 40 ] , which is hindered by the complexity of quantum reservoir systems, lacking generalization. In this paper, we aim to address the challenge of training a parameterized quantum circuit over multiple assets on a single quantum device by utilizing minimal resources and optimizing various components of the training process. The contributions of this work are as follows: 1. We adopted fidelity loss over quantum representations of the entire data distribution and employed a training technique, quantum batch gradient update (QBGU), that loads the amplitude encoded context distribution and empirical context-continuation distribution to accelerate convergence and improve convergence quality compared to training by stochastic gradient descent (SGD) through expensive reconstruction of classical distributions. 2. We analyzed context-based stock price prediction for various companies using several training paradigms, including parameter shift and (simulation supported)

Read the complete text