Can We Predict Stock Prices Without Understanding Their Behaviour First?
Why testing for stationarity matters before building financial forecasting models
A Financial Econometrics case study using Apple, Microsoft and Alphabet
August 2026
Why this project?
When analysing financial markets, one of the first questions an analyst should ask is whether historical prices can be used to make reliable predictions about the future.
Many forecasting models assume that historical data behaves consistently over time. However, stock prices often trend upward, react to major economic events, and experience periods of high volatility. If these characteristics are ignored, statistical models may produce misleading results.
This project explores whether the historical share prices of Apple, Microsoft and Alphabet behave like stable time series or whether they require additional statistical treatment before meaningful analysis can begin.
The business question
Can historical stock prices be used directly in financial models, or should they first be transformed into returns?
Understanding this helps financial analysts decide how to prepare data before developing investment models, forecasting prices or measuring financial risk.
The approach
To answer this question, I analysed five years of historical share-price data using Python and financial econometric techniques.
The project consisted of four stages.
1. Understanding the data
Historical share prices for Apple, Microsoft and Alphabet were downloaded from Yahoo Finance. The first step was simply to visualise the data to identify trends, periods of rapid growth and major market movements.
Instead of immediately applying statistical models, I first explored how the data behaved over time.

Figure 1 – Normalised Share Prices
2. Looking at daily market movements
Share prices tell us how much a company is worth on a given day. Returns tell us how much that value changes from one day to the next. Daily log returns were calculated because they are commonly used in finance when analysing investment performance and risk. Unlike share prices, returns fluctuate around zero, making them easier to compare across companies.

Figure 2 – Daily Returns
3. Testing whether the data is statistically stable
The next step was to determine whether the data was stationary.
A stationary dataset behaves consistently over time.
A non-stationary dataset continues to drift, making forecasting more difficult.
To test this, I applied the Augmented Dickey-Fuller (ADF) Test, one of the most widely used statistical tests in financial econometrics.
Rather than assuming that stock prices are suitable for modelling, the test provides statistical evidence for whether they should first be transformed.
4. Exploring how financial data behaves
To better understand the statistical results, I simulated three different types of financial time series:
A stable process
A random walk
An explosive process
The comparison illustrates why many stock prices resemble random walks and why analysts often model returns instead of raw prices.

Figure 3 – AR(1) Simulation
5. Investigating structural breaks
Financial markets rarely behave the same forever. Major economic events, company announcements and financial crises can permanently change market relationships.
To demonstrate this, I built a regression model that tests whether the relationship between variables changes after a specific event. This technique is widely used in financial modelling because historical relationships do not always continue into the future.
Key insights
Although each company behaves differently, the analysis demonstrates several important principles used in quantitative finance.
Stock prices often display characteristics of non-stationary time series.
Daily returns generally provide a more stable foundation for statistical modelling.
The ADF test helps determine whether data should be transformed before forecasting.
Structural-break analysis shows how important market events can alter financial relationships over time.
Why this matters
Financial analysts rarely begin by building prediction models. Instead, they first evaluate the quality and behaviour of the data. Understanding concepts such as stationarity and structural breaks improves the reliability of investment research, risk analysis and financial forecasting. These techniques form part of the foundation used in quantitative finance, portfolio management and algorithmic trading.
Conclusion
This project demonstrates that successful financial modelling begins long before building predictive algorithms. By understanding how stock prices behave, testing for stationarity and identifying structural changes, analysts can make more informed decisions about how financial data should be modelled and interpreted.
Comments