All Projects → arleigh418 → Paper-Implementation-DSTP-RNN-For-Stock-Prediction-Based-On-DA-RNN

arleigh418 / Paper-Implementation-DSTP-RNN-For-Stock-Prediction-Based-On-DA-RNN

Licence: other
基於DA-RNN之DSTP-RNN論文試做(Ver1.0)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Paper-Implementation-DSTP-RNN-For-Stock-Prediction-Based-On-DA-RNN

Base-On-Relation-Method-Extract-News-DA-RNN-Model-For-Stock-Prediction--Pytorch
基於關聯式新聞提取方法之雙階段注意力機制模型用於股票預測
Stars: ✭ 33 (-46.77%)
Mutual labels:  stock, lstm, rnn, darnn
Copper price forecast
copper price(time series) prediction using bpnn and lstm
Stars: ✭ 81 (+30.65%)
Mutual labels:  stock, lstm, rnn
Personae
📈 Personae is a repo of implements and environment of Deep Reinforcement Learning & Supervised Learning for Quantitative Trading.
Stars: ✭ 1,140 (+1738.71%)
Mutual labels:  stock, stock-price-prediction
EBIM-NLI
Enhanced BiLSTM Inference Model for Natural Language Inference
Stars: ✭ 24 (-61.29%)
Mutual labels:  lstm, rnn
Chase
Automatic trading bot (WIP)
Stars: ✭ 73 (+17.74%)
Mutual labels:  stock, stock-price-prediction
mlp stock
Stock price prediction using ensemble MLP in PyTorch.
Stars: ✭ 25 (-59.68%)
Mutual labels:  stock, stock-price-prediction
Deeptrade
A LSTM model using Risk Estimation loss function for stock trades in market
Stars: ✭ 256 (+312.9%)
Mutual labels:  stock, lstm
Deeptrade keras
Stars: ✭ 228 (+267.74%)
Mutual labels:  stock, lstm
dltf
Hands-on in-person workshop for Deep Learning with TensorFlow
Stars: ✭ 14 (-77.42%)
Mutual labels:  lstm, rnn
DrowsyDriverDetection
This is a project implementing Computer Vision and Deep Learning concepts to detect drowsiness of a driver and sound an alarm if drowsy.
Stars: ✭ 82 (+32.26%)
Mutual labels:  lstm, rnn
ArrayLSTM
GPU/CPU (CUDA) Implementation of "Recurrent Memory Array Structures", Simple RNN, LSTM, Array LSTM..
Stars: ✭ 21 (-66.13%)
Mutual labels:  lstm, rnn
funcat
Using very simple code to compute indicator of stock\crytocurrency. For example, MA(C, 5) means average closed-price for last 5 days.
Stars: ✭ 19 (-69.35%)
Mutual labels:  stock, stock-price-prediction
stocktwits-sentiment
Stocktwits market sentiment analysis in Python with Keras and TensorFlow.
Stars: ✭ 23 (-62.9%)
Mutual labels:  stock, stock-price-prediction
Gekko Strategies
Strategies to Gekko trading bot with backtests results and some useful tools.
Stars: ✭ 1,022 (+1548.39%)
Mutual labels:  stock, stock-price-prediction
Steward
A stock portfolio manager that provides neural net based short-term predictions for stocks and natural language processing based analysis on community sentiments.
Stars: ✭ 25 (-59.68%)
Mutual labels:  stock, stock-price-prediction
Beibo
🤖 Predict the stock market with AI 用AI预测股票市场
Stars: ✭ 46 (-25.81%)
Mutual labels:  stock, stock-price-prediction
Deepjazz
Deep learning driven jazz generation using Keras & Theano!
Stars: ✭ 2,766 (+4361.29%)
Mutual labels:  lstm, rnn
Automatic speech recognition
End-to-end Automatic Speech Recognition for Madarian and English in Tensorflow
Stars: ✭ 2,751 (+4337.1%)
Mutual labels:  lstm, rnn
lstm har
LSTM based human activity recognition using smart phone sensor dataset
Stars: ✭ 20 (-67.74%)
Mutual labels:  lstm, rnn
tf-ran-cell
Recurrent Additive Networks for Tensorflow
Stars: ✭ 16 (-74.19%)
Mutual labels:  lstm, rnn

Paper-Implementation-DSTP-RNN-For-Stock-Prediction-Based-On-DA-RNN

This Project is based on this paper : DSTP-RNN: a dual-stage two-phase attention-based recurrent neural networks for long-term and multivariate time series prediction(Yeqi Liu, Chuanyang Gong, Ling Yang, Yingyi Chen) https://arxiv.org/ftp/arxiv/papers/1904/1904.07464.pdf

Introduction

  1. This code modify from : https://github.com/Zhenye-Na/DA-RNN (DARNN)

  2. I try to implement DSTP-RNN-I model as below picture(This paper introduce two models,please refer this paper's content).We can find that this paper combine yT with first phase attention ouput at second phase attention image (Come from : DSTP-RNN: a dual-stage two-phase attention-based recurrent neural networks for long-term and multivariate time series prediction(Yeqi Liu, Chuanyang Gong, Ling Yang, Yingyi Chen) https://arxiv.org/ftp/arxiv/papers/1904/1904.07464.pdf)

  3. add the second phase attention with concat yT as below code.

#Phase two attention from DSTP-RNN Paper
x2 = torch.cat((hs_n.repeat(self.input_size, 1, 1).permute(1, 0, 2), #233 363 1042
                ss_n.repeat(self.input_size, 1, 1).permute(1, 0, 2),
                X.permute(0, 2, 1),
                y_prev.repeat(1, 1, self.input_size).permute(0, 2, 1)), dim=2)      
x2 = self.encoder_attn2( 
     x2.view(-1, self.encoder_num_hidden * 2 + 2*self.T - 2))         
alpha2 = F.softmax(x2.view(-1, self.input_size))   
x_tilde2 = torch.mul(alpha2, x_tilde)
  1. According to my test,concat X is more better than concat x_tilde that output from first phase attention.
#Not better with concat x_tilde.
x2 = torch.cat((hs_n.repeat(self.input_size, 1, 1).permute(1, 0, 2), #233 363 1042
                ss_n.repeat(self.input_size, 1, 1).permute(1, 0, 2),
                x_tilde.permute(0, 2, 1),
                y_prev.repeat(1, 1, self.input_size).permute(0, 2, 1)), dim=2)      

5.I do some very simple test,please refer result,and I will try to improve it.(parameter just like code,you can set the same parameter to test which is better between DA-RNN and DSRP-RNN) image

Final

  1. Thanks to all authors of the paper(DSTP-RNN: a dual-stage two-phase attention-based recurrent neural networks for long-term and multivariate time series prediction(Yeqi Liu, Chuanyang Gong, Ling Yang, Yingyi Chen))

  2. Thanks to the implementer of DA-RNN code and also this paper authors.

  3. If you have any questions , please contact me , cause I'm sure that I must have some misunderstandings to this paper,if you have any suggestions , please kindly let me know.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].