Financial institutions and corporations as well as individual investors and researchers often use financial time series data (such as asset prices, exchange rates, GDP, inflation and other macroeconomic indicators) in economic forecasts, stock market analysis or studies of the data itself.
But refining data is key to being able to apply it to your stock analysis. In this article, we'll show you how to isolate the data points that are relevant to your stock reports.
Cooking Raw Data
Data points are often nonstationary or have means, variances and covariances that change over time. Nonstationary behaviors can be trends, cycles, random walks or combinations of the three.
Nonstationary data, as a rule, are unpredictable and cannot be modeled or forecasted. The results obtained by using nonstationary time series may be spurious in that they may indicate a relationship between two variables where one does not exist. In order to receive consistent, reliable results, the nonstationary data needs to be transformed into stationary data. In contrast to the nonstationary process that has a variable variance and a mean that does not remain near, or returns to a longrun mean over time, the stationary process reverts around a constant longterm mean and has a constant variance independent of time.
Copryright © 2007 Investopedia.com 
Figure 1 
Types of NonStationary Processes
Before we get to the point of transformation for the nonstationary financial time series data, we should distinguish between the different types of the nonstationary processes. This will provide us with a better understanding of the processes and allow us to apply the correct transformation. Examples of nonstationary processes are random walk with or without a drift (a slow steady change) and deterministic trends (trends that are constant, positive or negative, independent of time for the whole life of the series).
Copryright © 2007 Investopedia.com 
Figure 2 
 Pure Random Walk (Y_{t} = Y_{t1} + ε_{t} )
Random walk predicts that the value at time "t" will be equal to the last period value plus a stochastic (nonsystematic) component that is a white noise, which means ε_{t }is independent and identically distributed with mean "0" and variance "σ²". Random walk can also be named a process integrated of some order, a process with a unit root or a process with a stochastic trend. It is a non mean reverting process that can move away from the mean either in a positive or negative direction. Another characteristic of a random walk is that the variance evolves over time and goes to infinity as time goes to infinity; therefore, a random walk cannot be predicted.  Random Walk with Drift (Y_{t} = α + Y_{t1 }+ ε_{t} )
If the random walk model predicts that the value at time "t" will equal the last period's value plus a constant, or drift (α), and a white noise term (ε_{t}), then the process is random walk with a drift. It also does not revert to a longrun mean and has variance dependent on time.  Deterministic Trend (Y_{t} = α + βt + ε_{t })
Often a random walk with a drift is confused for a deterministic trend. Both include a drift and a white noise component, but the value at time "t" in the case of a random walk is regressed on the last period's value (Y_{t1}), while in the case of a deterministic trend it is regressed on a time trend (βt). A nonstationary process with a deterministic trend has a mean that grows around a fixed trend, which is constant and independent of time.  Random Walk with Drift and Deterministic Trend (Y_{t} = α + Y_{t1 }+ βt + ε_{t })
Another example is a nonstationary process that combines a random walk with a drift component (α) and a deterministic trend (βt).It specifies the value at time "t" by the last period's value, a drift, a trend and a stochastic component. (To learn more about random walks and trends, see our Financial Concepts tutorial.)
Trend and Difference Stationary
A random walk with or without a drift can be transformed to a stationary process by differencing (subtracting Y_{t1 }from Y_{t, }taking the difference Y_{t}  Y_{t1}) correspondingly to Y_{t}  Y_{t1} = ε_{t }or Y_{t}  Y_{t1 }= α + ε_{t} and then the process becomes differencestationary. The disadvantage of differencing is that the process loses one observation each time the difference is taken.
Copryright © 2007 Investopedia.com 
Figure 3 
A nonstationary process with a deterministic trend becomes stationary after removing the trend, or detrending. For example, Yt = α + βt + εt is transformed into a stationary process by subtracting the trend βt: Yt  βt = α + εt, as shown in Figure 4 below. No observation is lost when detrending is used to transform a nonstationary process to a stationary one.
Copryright © 2007 Investopedia.com 
Figure 4 
In the case of a random walk with a drift and deterministic trend, detrending can remove the deterministic trend and the drift, but the variance will continue to go to infinity. As a result, differencing must also be applied to remove the stochastic trend.
Conclusion
Using nonstationary time series data in financial models produces unreliable and spurious results and leads to poor understanding and forecasting. The solution to the problem is to transform the time series data so that it becomes stationary. If the nonstationary process is a random walk with or without a drift, it is transformed to stationary process by differencing. On the other hand, if the time series data analyzed exhibits a deterministic trend, the spurious results can be avoided by detrending. Sometimes the nonstationary series may combine a stochastic and deterministic trend at the same time and to avoid obtaining misleading results both differencing and detrending should be applied, as differencing will remove the trend in the variance and detrending will remove the deterministic trend.

Investing Basics
5 Tips For Diversifying Your Portfolio
A diversified portfolio will protect you in a tough market. Get some solid tips here! 
Entrepreneurship
Identifying And Managing Business Risks
There are a lot of risks associated with running a business, but there are an equal number of ways to prepare for and manage them. 
Forex Education
Explaining Uncovered Interest Rate Parity
Uncovered interest rate parity is when the difference in interest rates between two nations is equal to the expected change in exchange rates. 
Fundamental Analysis
Using Decision Trees In Finance
A decision tree provides a comprehensive framework to review the alternative scenarios and consequences a decision may lead to. 
Economics
Understanding Tragedy of the Commons
The tragedy of the commons describes an economic problem in which individuals try to reap the greatest benefits from a given resource. 
Investing
What’s the Difference Between Duration & Maturity?
We look at the meaning of two terms that often get confused, duration and maturity, to set the record straight. 
Fundamental Analysis
Return on Investment (ROI) Vs. Internal Rate of Return (IRR)
Read about the similarities and differences between an investment's internal rate of return (IRR) and its return on investment (ROI). 
Forex Education
Time Value Of Money: Determining Your Future Worth
Determining monthly contributions to college funds, retirement plans or savings is easy with this calculation. 
Investing
Understanding High Yield Fund Performance
For exchange traded fund, not all highyield ETFs are the same. So, we take a look at one high yield investment in particular to set the stage for you. 
Stock Analysis
Analyzing Porter's 5 Forces on Facebook
Read about how you can use Porter's five forces to analyze Facebook's competition. This simple methodology looks at several different factors or forces.

Is Colombia an emerging market economy?
Colombia meets the criteria of an emerging market economy. The South American country has a much lower gross domestic product, ... Read Full Answer >> 
What assumptions are made when conducting a ttest?
The common assumptions made when doing a ttest include those regarding the scale of measurement, random sampling, normality ... Read Full Answer >> 
What is the utility function and how is it calculated?
In economics, utility function is an important concept that measures preferences over a set of goods and services. Utility ... Read Full Answer >> 
What are some of the more common types of regressions investors can use?
The most common types of regression an investor can use are linear regressions and multiple linear regressions. Regressions ... Read Full Answer >> 
What types of assets lower portfolio variance?
Assets that have a negative correlation with each other reduce portfolio variance. Variance is one measure of the volatility ... Read Full Answer >> 
When is it better to use systematic over simple random sampling?
Under simple random sampling, a sample of items is chosen randomly from a population, and each item has an equal probability ... Read Full Answer >>