Module 11 · Financial Risk and Performance Statistics Lesson 101 of 120

Volatility and Annualized Volatility

Expressing return dispersion without promising a future range.

2:42 clip5:28:02–5:30:44 in the full courseWatch on YouTube

Transcript

20 sentences · select one to jump there

Check your understanding

Does annualized volatility 25.1% guarantee losses cannot exceed 25.1%?

Choose one answer

Code lab

Run it yourself

The lesson source in 7 languages. Edit it, run TypeScript and Python right here, and compare with the expected output.

101-volatility-and-annualized-volatility.ts
Start from GitHub
/**
 * Fintech Math Bootcamp · Lesson 101 of 120
 * Volatility and Annualized Volatility
 * Module 11: Financial Risk and Performance Statistics
 *
 * Scenario: Expressing return dispersion without promising a future range
 * Rule:     annualized σ = sampleSD(returns)·√A
 *
 * Try it:   Does annualized volatility 25.1% guarantee losses cannot exceed 25.1%?
 *
 * Lesson article: https://thefintechbuilder.com/financial-mathematics-statistics-and-data-foundations/financial-risk-and-performance-statistics/volatility-and-annualized-volatility/
 * Free course:    https://courses.thefintechbuilder.com
 * Synthetic teaching example, not financial advice or a production library.
 */

export function lesson101() {
  const r=[.01,-.01,.02,-.02,0],A=252;
  const mean=r.reduce((s,x)=>s+x,0)/r.length;
  const variance=r.reduce((s,x)=>s+(x-mean)**2,0)/(r.length-1);
  const result={dailySD:Math.sqrt(variance),annualizedSD:Math.sqrt(A*variance)};
  return result;
}

export const checkedResult = {"dailySD":0.015811388300841896,"annualizedSD":0.25099800796022265};

// Run this file directly: npx tsx lessons/11-financial-risk-and-performance-statistics/101-volatility-and-annualized-volatility.ts
if (process.argv[1] && import.meta.url.endsWith(process.argv[1].replace(/\\/g, "/").split("/").pop()!)) {
  console.log(JSON.stringify(lesson101(), null, 2));
}

Your output

Press Run to execute the code in your browser.

Expected output

{
  "dailySD": 0.015811388300841896,
  "annualizedSD": 0.25099800796022265
}

Prefer your own machine? Every file is in the course repository · open it in Codespaces.

Lesson notes

The rule

annualized σ = sampleSD(returns)·√A