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

Sharpe, Sortino, and Information Ratio Intuition

Reading performance ratios without mixing risk definitions.

2:46 clip5:46:08–5:48:54 in the full courseWatch on YouTube

Transcript

19 sentences · select one to jump there

Check your understanding

Does a larger Sortino than Sharpe automatically prove a better strategy?

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.

108-sharpe-sortino-and-information-ratio-intuition.ts
Start from GitHub
/**
 * Fintech Math Bootcamp · Lesson 108 of 120
 * Sharpe, Sortino, and Information Ratio Intuition
 * Module 11: Financial Risk and Performance Statistics
 *
 * Scenario: Reading performance ratios without mixing risk definitions
 * Rule:     Sharpe: excess/SD; Sortino: target excess/downside; IR: active/TE
 *
 * Try it:   Does a larger Sortino than Sharpe automatically prove a better strategy?
 *
 * Lesson article: https://thefintechbuilder.com/financial-mathematics-statistics-and-data-foundations/financial-risk-and-performance-statistics/sharpe-sortino-and-information-ratio-intuition/
 * Free course:    https://courses.thefintechbuilder.com
 * Synthetic teaching example, not financial advice or a production library.
 */

export function lesson108() {
  const r=[.01,.02,-.01,.03],rf=.001,target=0; // hurdles differ on purpose
  const avg=(a:number[])=>a.reduce((s,x)=>s+x,0)/a.length;
  const sd=(a:number[])=>{const m=avg(a);return Math.sqrt(a.reduce((s,x)=>s+(x-m)**2,0)/(a.length-1));};
  const downside=Math.sqrt(avg(r.map(x=>Math.min(0,x-target)**2)));
  const result={sharpe:(avg(r)-rf)/sd(r),sortino:(avg(r)-target)/downside};
  return result;
}

export const checkedResult = {"sharpe":0.6733710503344877,"sortino":2.4999999999999996};

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

Your output

Press Run to execute the code in your browser.

Expected output

{
  "sharpe": 0.6733710503344877,
  "sortino": 2.4999999999999996
}

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

Lesson notes

The rule

Sharpe: excess/SD; Sortino: target excess/downside; IR: active/TE