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





















