liveBook · Manning

Standard deviation

As explained in Investing for Programmers

Standard deviation is the square root of variance and measures dispersion in the original units of the observations.

Standard deviation measures how widely observations vary around their mean. It equals the square root of variance, returning dispersion to the original units instead of squared units. section 3.4.2 section 7.2.2

In financial analysis, standard deviation provides a practical view of fluctuation. Calculate it on prices or, more meaningfully for comparison, on percentage or logarithmic returns. section 3.4.2 section 7.2.2

Interpret standard deviation alongside related statistics:

  • Mean identifies the dataset’s central value; standard deviation describes its spread around that value. section 3.4.2
  • Variance contains the same dispersion information in squared units, making it more useful for theory than direct interpretation. section 7.2.2
  • Higher return standard deviation signals larger observed fluctuations, but does not by itself establish future performance or risk. section 3.4.2

Comparing return dispersion

A summary of 2023 log returns reports standard deviations of 0.134959 for Coca-Cola, 0.199222 for Apple, and 0.799615 for NuScale. NuScale therefore showed the greatest observed dispersion in that dataset, while the comparison remains historical rather than predictive. section 3.4.2

How Investing for Programmers covers it

How deep it goes
Defines the square-root relationship with variance and demonstrates aggregation, while deferring deeper portfolio analysis.
Examples
Uses Python aggregations, return histograms, and stock comparisons involving Coca-Cola, Apple, NuScale, Microsoft, Amazon, and Alphabet.
What it assumes
Assumes basic mean, variance, stock-price, and return concepts while deriving practical interpretation from zero.
What you can do after
Evaluate historical dispersion by computing standard deviation on price or logarithmic-return DataFrames.
How it connects
Connects mean, variance, logarithmic returns, covariance, correlation, and portfolio risk.

Also explained in

Compare how 15 books explain standard deviation →

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.