gjanesch / data-and-the-world

Blog content.
0 stars 0 forks source link

Market Prediction with ETFs & Convolutional Networks - Data & The World #2

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

Market Prediction with ETFs & Convolutional Networks - Data & The World

An attempt at predicting the direction of the Dow Jones Industrial Average with ETFs and convolutional neural networks.

https://data-and-the-world.onrender.com/posts/convolutional-sector-etf-prediction/

mattermous commented 4 years ago

This is interesting, but seems like a flawed concept - why use the DJIA? The Dow Jones is a price-weighted index whose members are hand picked by the editors of the WSJ. Since it is price weighted, that means that apple's recent share price split would decrease it's weighting in the DJIA even though it's overall market cap is now over $2T; would be much more meaningful to do this analysis with a market-cap weight like the S&P 500 index or Russell 5000 if you want a broader index of companies.

mattermous commented 4 years ago

To clarify, most of the ETFs listed above, with the exception of the DJIA ETF should be market-cap weighted, rather than price weighted, so it's an apples-to-oranges comparison.

jpmediadev commented 4 years ago

Nice try. but you have future leak to the train set -

X_train, X_test, y_train, y_test = train_test_split(daily_windows, one_hot_classes, stratify=dia_return_classes, random_state=1998) y_true = np.array(classes)[np.argmax(y_test, axis=1)]

try with shuffle=False and you will see... X_train, X_test, y_train, y_test = train_test_split(daily_windows, one_hot_classes, shuffle=False, random_state=1998)