liveBook · Manning

Volatility

As explained in Statistics Every Programmer Needs

Volatility is the degree and frequency of variation in a quantity such as a financial price over time.

Volatility measures how much and how often a quantity varies over time. In financial time series, large price movements make future prices harder to forecast and require visual inspection before modeling. section 7.2.3

Use volatility in two complementary ways:

  • Inspect plotted closing prices to identify fluctuations, trends, support and resistance, and potential forecasting challenges. section 7.2.3
  • Estimate historical volatility as the standard deviation of daily log returns, alongside the mean return used to represent trend. section 9.5.4
  • Carry the estimated variability into Monte Carlo simulations so generated price paths reflect observed market uncertainty. section 9.5.2

GM historical volatility

For GM, the standard deviation of daily log returns is approximately 0.02005, while the mean log return is approximately −0.00061. The standard deviation represents moderate daily price fluctuation and supplies the simulation's volatility parameter. section 9.5.4

>>> mu = log_returns.mean()
>>> print(mu)
-0.000605520424324896

>>> sigma = log_returns.std()
>>> print(sigma)
0.020045660849343817

Compute the mean and standard deviation of log returns in Python, exposing the parameters used to generate simulated daily returns. section 9.5.4

How Statistics Every Programmer Needs covers it

How deep it goes
Defines volatility, visualizes it, and computes it as return standard deviation, but does not develop advanced volatility models.
Examples
Uses Apple closing-price plots, GM historical summaries, and computed GM log-return parameters.
What it assumes
Assumes daily closing-price data and introduces log returns, mean returns, and standard deviation as modeling inputs.
What you can do after
Apply volatility via Python plots and return statistics, then use the estimate to parameterize Monte Carlo simulations.
How it connects
Connects volatility with time series forecasting, ARIMA, exponential smoothing, log returns, and Monte Carlo simulation.

Also explained in

Compare how 5 books explain volatility →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.