XanaduAI / QHack2022

QHack—The one-of-a-kind quantum computing hackathon
https://qhack.ai
88 stars 124 forks source link

Predicting Stock Prices using Quantum Long-Short Term Memory #86

Open DikshantDulal opened 2 years ago

DikshantDulal commented 2 years ago

Team Name:

UncertaintyHack

Project Description:

Stock price prediction is one of the most rewarding problems in modern finance, where the accurate forecasting of future stock prices can yield significant profit and reduce the risks. LSTM (Long Short-Term Memory) is a recurrent Neural Network (RNN) applicable to a broad range of problems aiming to analyze or classify sequential data. Therefore, many people have used LSTM to predict the future stock price based on the historical data sequences with great success.

On the other hand, recent studies have shown that the LSTM's efficiency and trainability can be improved by replacing some of the layers in the LSTM with variational quantum layers, thus making the classical LSTM a quantum-classical hybrid model, which we will call QLSTM for Quantum LSTM. A recent study by Yao-Lung L. Fang et.al shows that QLSTM offers better trainability compared to its classical counterpart as it proved to learn significantly more information after the first training epoch than its classical counterpart and learned the local features better, all while having a comparable number of parameters. Inspired by these recent results, we proceed to test this variational quantum-classical hybrid neural network technique on stock price predictions.

In this submission, we provide a proof of concept that QLSTM can be used to predict stock prices on a particular stock (Merck and Co. Inc (MRK)), and that the results of its prediction are comparable, and arguably better in terms of loss, to its classical counterpart. We demonstrate that QLSTM has a higher trainability as the loss decreases faster with the QLSTM per epoch and that the results were achieved using much fewer parameters in QLSTM as compared to the classical LSTM.

Presentation:

Please refer to the attached non-technical explanation slideshow here

Source code:

Please refer to our GitHub repo here

Challenges

  1. IBM Qiskit Challenge
  2. Amazon Braket Challenge
  3. Quantum Finance Challenge
  4. Quantum Entrepreneur Challenge
  5. Hybrid Algorithms Challenge
isaacdevlugt commented 2 years ago

Thank you for your submission! There's still time to populate your submission with code, presentation material, etc. Please make any final adjustments before the deadline tonight at 17h00 EST!

Good luck!