Stock market neural network matlab

Author: Lera Nesterova Date: 27.05.2017

I have implemented a narxnet neural network to predict the next day closing price of stocks. I have been conducting this experiment for Offshore Stocks on the Singapore Exchange.

stock market neural network matlab

I am not able understand if the Neural Network really so accurate in predicting stock prices, or if I have been making some mistake in the implementation of the ANN. Please could you have a look at the code below and suggest where I am going wrong?

I have looped through a range of hidden neurons, and delays corresponding to each iteration of the hidden neuron like a trial and error for getting the best configuration. I have used both closeloop net and early prediction for predicting the stock price but the MAE, RMSE, MAPE error seem to be absurdly small which is extremely difficult for stock market prediction due to its efficiency.

I have also uploaded the csv file with the stock data 'CHO. Where have I gone wrong? The Matlab Program outputs the results for each iteration of changing hidden neurons and delay to an excel file. Log in to comment. It helps, immensely to ALWAYS scale data BEFORE training.

stock market neural network matlab

Then, regardless of the problem and data source, you can be familiar with the range of numbers at different stages in the design. I prefer to scale with ZSCORE to detect outliers and estimate significant auto and cross correlation lags usin NCORR.

Sorry, what I meant is to cut and paste that whos statement without the "? I enjoyed reading this question asked by Soham Acharjee on 7 Apr It embodied the puzzlement of seeing wonderfully small error measures of an open net addressing a stock series forecast, knowing the difficulty of prognosticating stock prices' futures.

Here's the problem, as I see it: Kudos for providing everything needed to run his script! I expect neural nets to extract seasonal patterns, significant connections between prior prices and a relevant price series.

MATLAB Central - source code for the stock market prediction using

In this case, Soham's excellent demonstration looks for closing price given a history of closing prices and prices at the open - so he demands only an eight hour prediction. Even a weatherman can make a fair prediction of rainfall today by asking if rain fell yesterday!

I liked his application of loops to search the solution space for optimal delays and neuron numbers and his averaging several trial solutions at each parameter pair. I was disappointed I could not write his error tables to Excel though the Matlab help suggested a text file would create in Excel's absence, it did not! Using much the same technique, I was able to see the close direction in nine of twelve trials stepping one day ahead for each trial - nothing to write home about, but rather better than chance, at low significance.

Log in to answer this question. Unable to complete the action because of changes made to the page. Reload the page to see its updated state. Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: Contacts Comment acheter Se connecter. MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help.

Soham Acharjee view profile. Neural Network Stock price prediction - Extremely accurate results. Asked by Soham Acharjee Soham Acharjee view profile.

Neural network matlab code programNeural Networks

Latest activity Commented on by Rimi Khongji Rimi Khongji view profile. Hi, I have implemented a narxnet neural network to predict the next day closing price of stocks.

stock market neural network matlab

Rimi Khongji Rimi Khongji view profile. Direct link to this comment: I'd really like a detailed explanation of this code.

Please mail me rkhongji gmail. Greg Heath view profile. Direct link to this answer: Answer by Greg Heath Greg Heath view profile.

Getting Started with Neural Network Toolbox

G9 What does that mean??? How to predict beyond data? Soham Acharjee Soham Acharjee view profile. I am not able That means nothing unless the scale of the data is known The range of data is from 0.

The 'data' is obtained after the file CHO. So program just writes into the range D5: G9 which contains the data. It was just chosen randomly as I wanted to keep the training percentage above 50 and validation to a minimum. Since the testing error was very small, I was scared there wasn't enough data for testing.

Greg Heath Greg Heath view profile. Brian Whatcott view profile. Answer by Brian Whatcott Brian Whatcott view profile.

MATLAB Central - neural network

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi Learn more. Opportunities for recent engineering grads. MATLAB Academy New to MATLAB? An Error Occurred Unable to complete the action because of changes made to the page. Select Your Country Choose your country to get translated content where available and see local events and offers.

Americas Canada English United States English.

Rating 4,7 stars - 550 reviews
inserted by FC2 system