Frequently Asked Questions


What is time series prediction?

Time series prediction means forecasting future values of a sequence of measurements ordered in time — for example, tomorrow's stock price, next week's temperature, or a currency exchange rate. The goal is to build a model that captures patterns in past data and extrapolates them to produce a forecast.

How does a neural network learn to make predictions?

The network is trained on historical data: past values are fed as inputs, and the network learns to map them to the known future value (the target). Training adjusts the network's weights using backpropagation combined with gradient descent, iteratively reducing the difference between the network's predictions and the actual values. See the Neural Network Training chapter for details.

What data do the interactive demos use?

The demos use historical NASDAQ stock index data and Forex (foreign exchange) currency pair data. They run entirely in your browser — no data is sent to a server, and no installation is required. Try them in the Interactive Example section.

How many hidden neurons should I use in my network?

There is no universal answer — it depends on the complexity of the patterns in your data and the risk of overfitting. Too few neurons and the network cannot capture the patterns; too many and it memorises the training data instead of generalising. The interactive demo lets you experiment with different network sizes and observe the effect on prediction accuracy directly.

What is overfitting and how can I avoid it?

Overfitting happens when a neural network learns the training data too precisely — including its noise — and then performs poorly on new data. Common ways to reduce it: use a separate validation set to monitor performance during training, stop training early when validation error starts increasing, use a simpler network architecture, or increase the size of the training set. The Training Set chapter discusses data preparation in detail.

Can a neural network reliably predict stock prices?

Neural networks can capture certain patterns in financial time series, but financial markets are influenced by unpredictable events that no model can anticipate. The demos in this tutorial illustrate how prediction works in principle; they are not a financial forecasting tool. Prediction accuracy on financial data is typically modest, and past performance does not guarantee future results.

What is the difference between the training set and the test set?

The training set is the data the network learns from. The test set is a separate portion of data, withheld during training, used to evaluate how well the trained network generalises to unseen examples. Evaluating only on training data would give an overly optimistic picture of performance. See the Training Set chapter for more.

Can I use or reproduce the content of this tutorial?

The text and images in this tutorial are published under the Creative Commons Attribution–ShareAlike 4.0 licence (CC BY-SA 4.0). You are free to share and adapt them, provided you give appropriate credit and distribute any adaptations under the same licence.

The interactive JavaScript demonstrations may only be used as part of this website; any other use requires prior written permission. Contact: marek@obitko.com.

·