Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 1 — Why Time Series Matter

Many of the most important phenomena in economics, business, finance, and society evolve through time.

Inflation changes from month to month.

Stock prices fluctuate every second.

GDP rises and falls over business cycles.

Exchange rates respond continuously to news and expectations.

Understanding these dynamic patterns is one of the central goals of time series analysis.

This book introduces the core ideas of applied time series analysis using:

The emphasis throughout is practical and data-driven.


Learning Objectives

By the end of this chapter, you should be able to:


1.1 The World Changes Through Time

Many variables are not static.

They evolve.

Examples include:

Unlike purely cross-sectional analysis, time series analysis focuses on:


1.2 What Is a Time Series?

A time series is a sequence of observations ordered through time.

Examples include:

VariableFrequency
monthly inflationmonthly
quarterly GDPquarterly
daily stock pricesdaily
hourly electricity demandhourly
second-by-second Bitcoin priceshigh frequency

We often represent a time series as:

x1,x2,x3,,xTx_1, x_2, x_3, \dots, x_T

where:


1.3 Why Economists Care About Time

Economic systems are dynamic.

Governments, firms, and households continuously respond to changing conditions.

Economists therefore study variables such as:

through time.

Business Cycles

Economic activity tends to fluctuate.

Periods of expansion are often followed by slowdowns or recessions.

Understanding these cycles is one of the main goals of macroeconomics.

Inflation Dynamics

Inflation often displays persistence.

High inflation this month may increase the probability of high inflation next month.

Central banks therefore monitor inflation continuously.

Forecasting

Economic forecasting is crucial for:


1.4 Why Financial Markets Care About Time

Financial markets are highly dynamic systems.

Prices react continuously to:

Even small changes can matter enormously.

Traders and Investors

Traders care about:

Portfolio managers care about:

Algorithmic Trading

Modern financial markets increasingly rely on automated systems.

Algorithms monitor time series data in real time to:


1.5 Time Series vs Cross-Sectional Data

It is important to distinguish time series data from cross-sectional data.

Cross-Sectional Data

Cross-sectional data observe many units at a single point in time.

Example:

CountryInflation Rate
Thailand2.1
Japan0.5
Indonesia3.0

The focus is on differences across units.

Time Series Data

Time series data observe one variable repeatedly through time.

Example:

MonthInflation
January2.1
February2.3
March2.5

The focus is on dynamics through time.


1.6 Why Dependence Matters

In many time series, the past influences the future.

This idea is called dependence.

For example:

This is fundamentally different from many standard statistical models that assume observations are independent.

Examples of Dependence

Inflation Persistence

Inflation often changes gradually rather than randomly jumping each month.

Volatility Clustering

Financial markets often display calm periods followed by turbulent periods.

Large movements tend to cluster together.

Momentum

Stocks that recently increased in price sometimes continue rising temporarily.


1.7 Trend, Cycles, and Noise

Many time series contain several components.

Trend

A trend represents long-run movement.

Examples include:

Cycles

Cycles are recurring fluctuations around the trend.

Examples include:

Noise

Noise represents random fluctuations that are difficult to predict.


1.8 Forecasting and Decision Making

Forecasting plays a central role in economics and business.

ForecastDecision
inflationinterest rate policy
demandinventory planning
exchange rateshedging
volatilityportfolio risk
salesstaffing decisions

Examples

Airlines forecast passenger demand.

Banks forecast interest rates.

Retailers forecast seasonal sales.

Governments forecast economic growth.


1.9 Why Forecasting Is Difficult

Forecasting is inherently uncertain.

Why?

Because economies and markets are affected by:

Even strong statistical models cannot perfectly predict the future.

Financial Markets

Financial markets are especially difficult to forecast because prices rapidly incorporate information.

New information arrives continuously and unpredictably.

Structural Breaks

Relationships may change over time.

For example:

can alter economic dynamics dramatically.


1.10 Time Series in the Age of AI

The importance of time series analysis has increased dramatically in recent years.

Modern applications include:

Large amounts of sequential data are now generated continuously.

Examples include:


1.11 A First Look at Financial Data with Python

We now download and plot real financial data using Python.

# !pip install yfinance

import matplotlib.pyplot as plt
import yfinance as yf

# Download S&P 500 data
sp500 = yf.download("^GSPC", start="2018-01-01", auto_adjust=False)

# Inspect the columns to confirm
# print(data.columns)

# Plot the adjusted close price
sp500["Adj Close"].plot(figsize=(10,4))

plt.title("S&P 500 Adjusted Closing Price")
plt.xlabel("Date")
plt.ylabel("Index Level")

plt.savefig("figs/ch1/sp500.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
sp500

You can also try:

# Download Netflix data
data = yf.download("NFLX", start="2020-01-01", end="2026-04-31", auto_adjust=False)

1.12 Example: Exchange Rates

Exchange rates are another important example of time series data.

# import yfinance as yf
# import matplotlib.pyplot as plt

thb = yf.download("THB=X", start="2020-01-01", auto_adjust=False)

thb["Adj Close"].plot(figsize=(10,4))

plt.title("Thai Baht per U.S. Dollar")
plt.xlabel("Date")
plt.ylabel("Exchange Rate")

plt.savefig("figs/ch1/xr.png", dpi=300, bbox_inches="tight")
plt.close()   # replace with plt.show()
Exchange Rates

1.13 Gretl Example: Opening and Plotting Data

GRETL provides a simple way to visualize time series data.


Step 1: Open a Dataset

Menu:

File → Open data

Choose a dataset.


[GRETL Screenshot Placeholder: Opening data file]

Step 2: Plot a Variable

Select a variable and choose:

Variable → Time series plot


[GRETL Screenshot Placeholder: Time series plot]

Step 3: Inspect the Graph

Look for:


1.14 Structure of This Book

This book gradually develops the main tools of applied time series analysis.


Part I — Data, Uncertainty, and Financial Returns

We begin with financial data, returns, and statistical foundations.


Part II — Seeing Patterns in Time Series

We study visualization, smoothing, and trading indicators.


Part III — Core Time Series Concepts

We introduce:


Part IV — Linear Time Series Models

We study:


Part V — Forecasting

We develop forecasting methods and forecast evaluation.


Part VI — Relationships Between Time Series

We study:


Part VII — Multivariate Models

We introduce:


Part VIII — Volatility

We study:


1.15 Common Mistakes


1.16 Looking Ahead

This chapter introduced the basic idea of time series analysis and why it matters.

In the next chapter, we turn to financial data and returns.

We will study:


Key Takeaways

Concept Check

Basic

  1. What is a time series?

  2. Give two examples of time series in economics.

  3. Give two examples of time series in finance.


Intuition

  1. How is a time series different from cross-sectional data?

  2. Why does the order of observations matter in time series data?

  3. Why might past values help predict future values?


Intermediate

  1. What is meant by “dependence over time”?

  2. Why might ignoring time structure lead to incorrect conclusions?

  3. Why are time series especially important for forecasting?


Challenge

  1. Suppose two time series both show an upward trend over time.

    • Does this necessarily mean they are related?

    • Why or why not?


Interpretation & Practice

  1. Consider a time series of monthly inflation rates.

    • What does each observation represent?

    • What does the time index represent?


  1. You are given a plot of a stock price that steadily increases over time.

    • What feature of the data stands out?

    • Why might this be important for analysis?


  1. Suppose GDP increases every year for 20 years.

    • What kind of pattern does this suggest?

    • Why might this create problems for simple regression analysis?


  1. A student says:

    “We can treat time series data just like any other dataset.”

    • Do you agree or disagree?

    • Give one reason to support your answer.


  1. Consider two variables:

    • global GDP

    • global energy consumption

    Both increase over time.

    • Would you expect a strong correlation?

    • Does this necessarily imply a meaningful relationship?


Challenge

  1. Suppose you observe a time series where shocks seem to persist over time.

    • What might this imply about the underlying process?

    • How might this affect forecasting?