You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was reviewing your 012 Stock Market Prediction using Multivariate Time Series Models and Python.ipynb code as it does everything I am looking for (Time Series, Train/Test Split, and actual forecasts).
In Section 3 Preprocessing and Feature Selection, when splitting the train data set into the X Features and Y Outcome/Predictors, it appears to me that you are assigning the first column of the DF to the Y train data set.
# The RNN needs data with the format of [samples, time steps, features].
# Here, we create N samples, 100 time steps per sample, and 2 features
for i in range(100, train_data_len):
x_train.append(train_data[i-sequence_length:i,:]) #contains 100 values 0-100 * columsn
y_train.append(train_data[i, 0]) #contains the prediction values for validation
When I execute this code it appears to me that 'column 0' in the train_data is the 'High' price, not the closing or opening prioe. Ultimately predicting the highest sale/purchase price for the next day... Is this a correct interpretation?
If so, if we wanted to predict the closing price, we could use
# The RNN needs data with the format of [samples, time steps, features].
# Here, we create N samples, 100 time steps per sample, and 2 features
for i in range(100, train_data_len):
x_train.append(train_data[i-sequence_length:i,:]) #contains 100 values 0-100 * columsn
y_train.append(train_data[i, 3]) #contains the prediction values for validation
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I was reviewing your 012 Stock Market Prediction using Multivariate Time Series Models and Python.ipynb code as it does everything I am looking for (Time Series, Train/Test Split, and actual forecasts).
In Section 3 Preprocessing and Feature Selection, when splitting the train data set into the X Features and Y Outcome/Predictors, it appears to me that you are assigning the first column of the DF to the Y train data set.
When I execute this code it appears to me that 'column 0' in the train_data is the 'High' price, not the closing or opening prioe. Ultimately predicting the highest sale/purchase price for the next day... Is this a correct interpretation?
If so, if we wanted to predict the closing price, we could use
Looking forwar
Beta Was this translation helpful? Give feedback.
All reactions