Hello everyone, I am trying to implement Pytorch LSTM to stock market closing prices using historical values.
My input features are Open, High, Low, Close and Volume values for 12 days and my target variable is the closing price for the 13th day. So from my understanding, my input size is 5, output size is 1 and number of time steps is 12.
So, I can construct my LSTM like;
lstm = nn.LSTM(input_size=5, hidden_size=20, batch_first=True)
linear = nn.Linear(in_features=20, out_features=1)
I think my output shape should be (20, 1), one output for each of the sequence in the batch.  To achieve that, how do I create my input to the LSTM?
Thanks in advance.