AAIYUGBeta
LeaderboardRaceWall of FameLitepaperBlogNews
AAIYUG

A skill-based trading competition platform.

✉ hello@aiyug.com

Dubai, United Arab Emirates

PRE-LAUNCH · REGISTRATION IN PROGRESS
Platform
LeaderboardLive raceWall of FameHow it worksLitepaperBlogMarkets newsJoin free
Legal
Terms & ConditionsPrivacy PolicyCompetition RulesRisk Disclaimer

Simulated trading only. No real money is traded. AIYUG is not financial advice and is not a regulated financial service. Read the full risk disclaimer →

© 2026 AIYUG. All rights reserved.

LeadersRaceFameBlogNews
Blog
Education· 2 October 2026 · 6 min read

How to Calculate Sharpe Ratio: A Step-by-Step Guide

Learn the Sharpe ratio formula, step-by-step calculation with a worked example, and how to use it to compare risk-adjusted returns.

A
AIYUG Desk
Content & education team

What the Sharpe ratio measures

The Sharpe ratio is the most widely used metric for comparing risk-adjusted returns. It answers a simple question: how much excess return did an investment produce per unit of return volatility? That makes it useful for comparing strategies, funds, or portfolios with different levels of volatility.

This article explains the Sharpe ratio formula, shows a concrete worked example, and covers practical details and limitations so you can apply it correctly.

Quick definition and formula

Sharpe ratio = (Rp - Rf) / σp

Where:

  • Rp = mean return of the portfolio (over the measurement period)
  • Rf = mean risk-free return for the same period
  • σp = standard deviation of the portfolio's returns (same periodicity as Rp)

If you use daily returns, compute daily mean and daily standard deviation and annualize appropriately (see the annualization section below).

Why "risk-adjusted returns explained" matters

Raw returns don't tell you how risky a strategy was. Two funds can each return 10% annually: one with steady monthly gains and low variability, the other with wild swings. The Sharpe ratio penalizes volatility, helping you find returns that were achieved more consistently rather than by taking big swings.

However, the Sharpe ratio only measures volatility as risk (standard deviation of returns). It assumes returns are approximately normally distributed and treats upside and downside volatility equally — which can be a limitation for some strategies.

Step-by-step Sharpe ratio calculation (worked example)

We'll walk through a concrete, fully hypothetical example using monthly returns for a small 5-month sample.

Assumptions (hypothetical):

  • Monthly portfolio returns: 2.0%, -1.0%, 3.0%, 4.0%, 0.0%
  • Annual risk-free rate (Rf_annual): 0.50% (assume a short-term T-bill yield)
  • We will compute the annualized Sharpe ratio using monthly returns.

Step 1 — Convert the annual risk-free rate to monthly (simple approach):

  • Rf_monthly = (1 + Rf_annual)^(1/12) - 1 ≈ (1 + 0.005)^(1/12) - 1 ≈ 0.000416 or 0.0416% per month.

Step 2 — Compute the monthly excess returns for each month (Rp_i - Rf_monthly):

  • Month 1: 2.0000% - 0.0416% = 1.9584%
  • Month 2: -1.0000% - 0.0416% = -1.0416%
  • Month 3: 3.0000% - 0.0416% = 2.9584%
  • Month 4: 4.0000% - 0.0416% = 3.9584%
  • Month 5: 0.0000% - 0.0416% = -0.0416%

Step 3 — Compute the mean excess monthly return (average of the five excess returns):

  • Sum = 1.9584 + (-1.0416) + 2.9584 + 3.9584 + (-0.0416) = 7.7920%
  • Mean excess monthly return = 7.7920% / 5 = 1.5584% per month

Step 4 — Compute the standard deviation of the portfolio's monthly returns (not of excess returns; standard practice is to use the portfolio return series). We'll calculate σp using the raw monthly returns:

  • Monthly returns: [2.0, -1.0, 3.0, 4.0, 0.0]
  • Mean monthly return = (2 - 1 + 3 + 4 + 0) / 5 = 1.6% per month
  • Deviations from mean: [0.4, -2.6, 1.4, 2.4, -1.6] (in percentage points)
  • Squared deviations: [0.16, 6.76, 1.96, 5.76, 2.56]
  • Variance (sample or population?): Typically use sample standard deviation for small samples: variance = sum(squared deviations) / (n - 1) = (0.16+6.76+1.96+5.76+2.56)/4 = 17.2/4 = 4.3
  • σp (monthly) = sqrt(4.3) ≈ 2.0736 percentage points (i.e., 2.0736% per month)

Step 5 — Compute the monthly Sharpe (using mean excess monthly return and monthly σ):

  • Sharpe_monthly = 1.5584% / 2.0736% ≈ 0.7517

Step 6 — Annualize the Sharpe ratio (standard method):

  • If returns and volatility are measured monthly, annualize by multiplying by sqrt(12):
  • Sharpe_annual = Sharpe_monthly × sqrt(12) ≈ 0.7517 × 3.4641 ≈ 2.603

Interpretation (in this hypothetical example): an annualized Sharpe ≈ 2.6 indicates strong risk-adjusted performance over the sample period. Note this example uses only five months — small samples are noisy. Use longer histories for more reliable estimates.

Formula recap and practical tips

  • Sharpe ratio (periodic) = (mean(periodic returns) - risk-free periodic return) / stddev(periodic returns)
  • Annualize: Sharpe_annual = Sharpe_period × sqrt(number of periods per year)
  • - sqrt(252) for daily returns, sqrt(12) for monthly, sqrt(52) for weekly

  • Use consistent periodicity for all inputs (returns, risk-free rate, and standard deviation).
  • Use geometric (compound) returns for reporting realized annual returns, but Sharpe is commonly computed on arithmetic periodic returns.

Limitations and common pitfalls

  • Small sample size: five months (like our worked example) is too short to make firm conclusions.
  • Non-normal returns: strategies with skew, fat tails, or serial correlation (e.g., option-selling, trend-following) can distort Sharpe's interpretation.
  • Treats upside and downside volatility equally: a manager who generates occasional large positive returns will have the same penalty for that upside variability as a downside shock.
  • Choice of risk-free rate: short-term Treasury yield is standard; match the periodicity.

How to use Sharpe in practice

  • Use Sharpe to compare similar strategies or funds, not across fundamentally different asset classes without adjustment.
  • Combine Sharpe with other metrics: Sortino ratio (downside risk), maximum drawdown, and rolling Sharpe to see stability over time.

Practice it risk-free

If you want to practice computing and comparing Sharpe ratios with virtual portfolios, AIYUG runs a free paper-trading race where you can test strategies with real market data using virtual money (https://aiyug.trading/signup).

No guarantees: Sharpe is a diagnostic tool, not a promise of future performance. Always combine multiple metrics and sufficient sample sizes before drawing conclusions.

FAQ

What is the main difference between Sharpe and Sortino ratios?

The Sharpe ratio divides excess return by total return volatility (standard deviation), treating upside and downside equally. The Sortino ratio uses downside deviation only, penalizing negative volatility and often preferred when downside protection matters.

How do you annualize a Sharpe ratio calculated from daily returns?

Multiply the daily Sharpe by sqrt(252) to annualize (252 trading days is the common convention). Ensure the risk-free rate and returns are both on a daily basis before computing the daily Sharpe.

Is a higher Sharpe always better?

Higher Sharpe indicates better historical risk-adjusted returns, but it can be misleading with short samples, non-normal return distributions, or strategies with skew and serial correlation. Use other metrics and longer histories for confirmation.

Education

Put it into practice — free

Join this week’s AIYUG race: virtual capital, real market data, real recognition from investors. No deposit, no KYC.

Keep reading
Education · 10 Oct 2026 · 6 min

Day Trading vs Swing Trading vs Scalping: Which Fits You?

Practical, mechanics-first comparison of day trading, swing trading and scalping — formulas, a worked example, risk rules, and how to pick your style.

Education · 1 Oct 2026 · 6 min

Compounding Returns Explained with Examples

Learn how compounding works for investments and trading returns, formulas, and a concrete worked example to quantify the power of compounding over time.

Education · 30 Sept 2026 · 6 min

How to Calculate CAGR and Annualized Returns

Clear, practical guide to the compound annual growth rate (CAGR) and annualized return calculation with formulas, step-by-step walkthroughs and an example.