liveBook · Manning

Mean

As explained in Investing for Programmers

The mean is the arithmetic average of a set of numerical observations.

The mean is the arithmetic average and represents the central value of a dataset. In financial analysis, it summarizes an asset’s average price or return over a selected period, providing a baseline for comparison. section 3.4.2

Comparing mean returns

A Python summary groups mean, standard deviation, and variance for Apple, Coca-Cola, and NuScale. The reported mean log returns are 0.442217, −0.035349, and −1.149094 respectively, showing how average performance differs across the three stocks. section 3.4.2

summary = log_rets_2023.agg(["mean", "std", "var"]).T
summary.columns = ["Mean", "Std", "Var"]
summary

Inspect the aggregation that calculates mean, standard deviation, and variance for each company. section 3.4.2

How Investing for Programmers covers it

How deep it goes
Defines the mean as a dataset’s central average and applies it alongside standard deviation and variance.
Examples
Compares mean log returns for Apple, Coca-Cola, and NuScale using 2023 market data.
What you can do after
Evaluate average stock performance and compare it with measures of dispersion.
How it connects
Connects the mean with logarithmic returns, histograms, standard deviation, variance, and portfolio correlation.

Also explained in

Compare how 29 books explain mean →

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.