Volatility measures how much and how often an asset’s price or returns vary over time. Large historical movements signal greater uncertainty and risk, but do not guarantee future behavior. section 3.4.2 section 7.2
A practical workflow loads historical prices, normalizes stocks to a common starting value, calculates simple or logarithmic returns, and summarizes dispersion with standard deviation and variance. section 3.4.2
Use volatility analysis to:
- Compare assets whose nominal share prices are not directly comparable. section 3.4.2
- Identify higher-risk assets and consider diversification across stocks with different stability profiles. section 3.4.2 section 7.2
Comparing Coca-Cola, Apple, and NuScale
For 2023, the reported return standard deviations are 0.134959 for Coca-Cola, 0.199222 for Apple, and 0.799615 for NuScale; the corresponding variances are 0.018214, 0.039690, and 0.639385. section 3.4.2
import yfinance as yf
historical_data = yf.Ticker("MSFT").history(start="2024-05-08",
end="2025-05-08
historical_data
Load Microsoft’s historical data with yfinance before inspecting price ranges, returns, and variability. section 3.4.2




