Inspiration
The inspiration for this project was to develop a tool for predicting stock prices using machine learning techniques. I wanted to explore the potential of deep learning models in forecasting stock prices and create a system that can help traders and investors make informed decisions.
What it does
The Stock Price Forecasting system uses a deep learning model to predict future stock prices based on historical data. It takes in historical price data and technical indicators, preprocesses the data, trains a deep neural network, and generates predictions for future stock prices
How we built it
The project was built using MATLAB. The data is read from CSV files and then preprocessed using MATLAB's tsmovavg function. The feedforward neural network is set up using MATLAB's feedforwardnet function. The network is trained using the backpropagation algorithm with the Levenberg-Marquardt optimization method. The optimal parameters for the network are determined using a genetic algorithm.
Challenges we ran into
During the implementation of our project, I encountered several challenges. One of the most significant challenges was determining the optimal parameters for our feedforward neural network. To overcome this challenge, I utilized a genetic algorithm to search for the best parameters that would result in the highest network accuracy.
Another challenge I faced was dealing with NaN values that arose during the calculation of the moving averages. To address this issue, I limited the vector to exclude the NaN values using the '50:end' function. This allowed us to work with clean data and avoid potential errors in our calculations.
Despite these challenges, we were able to successfully train and test our neural network model and achieve accurate stock market predictions.
Accomplishments that we're proud of
I am proud of creating a neural network that can accurately predict future stock prices. I am also proud of finding the optimal parameters for the network using a genetic algorithm.
What we learned
Through this project, I learned how to preprocess data using MATLAB's tsmovavg function. I also learned how to set up and train a feedforward neural network using the backpropagation algorithm with the Levenberg-Marquardt optimization method. Additionally, I learned how to use a genetic algorithm to determine the optimal parameters for the neural network and optimally work on Testing through train-test split and evaluate results on several metrics such as the MSE.
What's next for Stock Price Forecasting in MATLAB
In the future, I plan to improve the accuracy of the predictions by incorporating more features into the neural network, such as news sentiment analysis and financial ratios. I also plan to expand the project to include multiple companies and create a user-friendly interface for investors and traders to easily make stock price predictions.
Log in or sign up for Devpost to join the conversation.