image thumbnail

Stock Market Prediction Using Bayes Optimized Hybrid CNN-RNN

version 1.0.0 (273 KB) by H Sanchez
This post aims to present a simple method to optimize the hyperparameters of a hybrid CNN-RNN and a Shallow Net using Bayes Optimization.

174 Downloads

Updated 10 Jun 2021

View License

"I can calculate the motions of the heavenly bodies, but not the madness of the people."
-Sir Isaac Newton, when asked about South Sea stock in the spring of 1720.
Today mathematicians, physics, machine learning, data scientist and data-curious enthusiast like me are dreaming with one day being able to predict the tomorrow by using artificial intelligence. Stock Market prediction? It is difficult, it is disappointing and it is encouraging as the nature of the stock market is. The hypothesis underlining the bases of time series prediction are not always applicable to the stock market phenomenon. Stock market time series are the source of greediness, ambitions, disappointing and encouraging of the mass of investors lured by profit. That is what we are trying to predict by using machine learning; which is indeed a very difficult task but if you design very well your network there is a probability that it could identify some patterns and predict a behavior close to the reality of tomorrow.
“Patterns of the past may be repeated tomorrow”
This post aims to present a simple method to optimize the hyperparameters of a hybrid CNN-RNN and a Shallow Net using Bayes Optimization.
Key Points
Bayes Optimization is used to tuning both a hybrid CNN-RNN and a shallow network, respectively.
A simple procedure is used for the bayes optimization algorithm to include discrete values.
A simple procedure to generate ramdom alike stock market is used in this code (Stock Sequence).

Cite As

H Sanchez (2021). Stock Market Prediction Using Bayes Optimized Hybrid CNN-RNN (https://www.mathworks.com/matlabcentral/fileexchange/93890-stock-market-prediction-using-bayes-optimized-hybrid-cnn-rnn), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!