liveBook · Manning

Sequence

As explained in Investing for Programmers

Time series data is a sequence of observations indexed by their times of occurrence.

Treats time series data as observations ordered and indexed by when they occur. In financial analysis, historical prices form a time series that can be loaded into a DataFrame for comparison, visualization, and return calculations. section 3.4.2 section 10.0

Uses time series to:

  • Collect open, high, low, close, and volume observations over a selected period or exact date interval. section 3.4.2
  • Compare assets by rebasing closing prices to a common starting value rather than comparing raw share prices. section 3.4.2
  • Transform prices into simple or logarithmic returns, then inspect distributions and calculate mean, standard deviation, and variance. section 3.4.2
  • Support technical analysis, risk assessment, and historical testing of trading rules, without guaranteeing future performance. section 7.2 section 11.3.1

A compact financial time series workflow

Load one year of Microsoft history with yfinance, inspect its dated OHLCV rows, normalize closing prices for Apple, Coca-Cola, and NuScale, and plot their percentage development. The same data can produce logarithmic-return histograms and summary statistics.

import yfinance as yf
historical_data = yf.Ticker("MSFT").history(start="2024-05-08", 
end="2025-05-08 
historical_data

Inspect a working yfinance query that retrieves dated historical observations into a Python data structure. section 3.4.2

How Investing for Programmers covers it

How deep it goes
Demonstrates collection, normalization, returns, statistics, charts, and backtesting, but defers guarantees about future performance.
Examples
Uses Microsoft OHLCV data, normalized AAPL-KO-SMR charts, return histograms, and SMA crossover tests on historical stock prices.
What it assumes
Builds on data collection and aggregation, using structured financial data and Python DataFrames for implementation.
What you can do after
Apply time series via yfinance, pandas, NumPy, and matplotlib to collect, transform, visualize, and evaluate financial observations.
How it connects
Connects time series with technical analysis, quantitative research, risk assessment, returns, volatility, machine learning, and backtesting.

Also explained in

Compare how 22 books explain sequence →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.