What is the Sharpe ratio? Formula, a good Sharpe and crypto examples

Updated Nov 11, 2026 · 9 min read

The Sharpe ratio divides excess return by volatility. Formula, annualising for 24/7 crypto, Sharpe vs Sortino vs Calmar, Python code, and one-year Sharpe ratios for BTC, ETH, SOL and HYPE (Nov 11, 2026).

What is the Sharpe ratio? The Sharpe ratio measures how much return a strategy earned for each unit of risk it took: its average return above the risk-free rate, divided by the standard deviation of its returns, usually annualised. William F. Sharpe introduced it in 1966 as the “reward-to-variability ratio”. A Sharpe of 1 means the yearly excess return equalled one standard deviation of yearly returns; the higher it is, the smoother the ride for the return you got.

Key takeaways

  • Sharpe = (average return − risk-free rate) ÷ standard deviation of returns. For daily crypto returns, multiply by √365, about 19.1, to annualise: crypto trades 365 days a year, not 252.
  • Over the 365 days to Nov 10, 2026, buy-and-hold HYPE had a Sharpe ratio of 1.06 on Hyperliquid; BTC scored −0.61, ETH −0.62 and SOL −0.81.
  • The window changes the answer: BTC’s Sharpe over the last 90 days was 1.68.
  • Sortino counts only downside volatility and Calmar only the deepest drawdown. Read the three together.
  • A Sharpe ratio measured over one year has a standard error of about 1, so a one-year Sharpe of 1 is hard to tell from luck.

Judge strategies on Sharpe, Sortino and drawdown with Senpi

Senpi publishes this guide. Sharpe tells you how smooth returns were; it doesn’t limit the losses. On Senpi, the loss side is built into the strategy before it trades:

  • A stop from the first fill. Strategies built from a rule or a template carry the Dynamic Stop-Loss (DSL), which tightens the stop as the trade gains. Copy strategies carry at most a flat stop.
  • Halts you set in advance. Each strategy can have its own daily-loss halt, which lifts at the next UTC midnight, or a drawdown halt, which waits until you resume it, so a bad stretch has a floor before it starts.
  • One strategy, one wallet. Each strategy trades from its own isolated strategy wallet, so its results aren’t mixed with your other strategies and you can judge each on its own numbers.
  • Rules you can read. Senpi’s templates are open source on GitHub, so you can check what a strategy trades and how it exits before you deploy it. Senpi has no backtesting tool; some templates cite a historical replay in their notes.
  • 0% Senpi fee on paid plans (0.03% on the free trial). Costs come straight off returns, so lower fees mean a higher Sharpe for the same trades.

A strategy you confirm runs as code on Senpi’s runtime, and by default no AI model makes live trading decisions. The agent holds no key and cannot withdraw. After a strategy has run, ask the Senpi agent to review its closed trades: where fees, exits or sizing cost the most.

Sharpe ratio formula

Sharpe ratio = (Rp − Rf) ÷ σp

  • Rp is the strategy’s average return per period: per day, week or month.
  • Rf is the risk-free rate for the same period, such as a Treasury-bill yield. Many crypto backtests set it to 0; the table on this page does.
  • σp is the standard deviation of the strategy’s returns per period: how much they swing around their average.

To annualise, multiply by the square root of the number of periods in a year: √365 ≈ 19.1 for daily returns in crypto, which trades every day; √252 ≈ 15.9 for stock-market trading days; √52 ≈ 7.2 for weekly and √12 ≈ 3.5 for monthly returns. Using √252 on 24/7 crypto data understates the Sharpe by about 17%.

Example: a strategy averages 0.10% a day with a daily standard deviation of 2%, and you set the risk-free rate to 0. The daily Sharpe is 0.10 ÷ 2 = 0.05, and the annual Sharpe is 0.05 × 19.1 ≈ 0.96.

One-year Sharpe and Sortino ratios on Hyperliquid, Nov 11, 2026

The table treats buy-and-hold of each perp’s price as the strategy, the same method as the Calmar ratio explainer.

Market (buy and hold)Return, last 365 daysVolatility (annualised)Sharpe ratioSortino ratioMax drawdownSharpe, last 90 days
BTC−30.4%44%−0.61−0.86−44.7%1.68
ETH−42.5%60%−0.62−0.88−56.1%0.89
SOL−50.2%62%−0.81−1.15−62.8%0.95
HYPE74.4%90%1.061.71−49.3%1.72
Source: Hyperliquid API (candleSnapshot), 21:36 UTC on Nov 11, 2026. Buy-and-hold of the perp price, daily closes from Nov 10, 2025 to Nov 10, 2026; the 90-day column starts Aug 12, 2026. Risk-free rate 0, annualised with √365; funding not included. Market data only; not a forecast or a trade signal.

Only HYPE had a positive one-year Sharpe, 1.06. Its Sortino was higher, 1.71, because Sortino ignores the up swings and HYPE’s were big: its best day was 23.6%, its worst −13.6%. BTC, ETH and SOL lost money over the year, so their ratios were negative. Over the last 90 days all four were positive, with BTC at 1.68. For comparison, the S&P 500 perp on Hyperliquid (xyz:SP500) had a Sharpe of 1.41 over the 237 days of data since Mar 18, 2026, at about a third of BTC’s volatility.

Sharpe vs Sortino vs Calmar

MetricFormulaWhat it punishesUse it to
Sharpe ratioExcess return ÷ volatility of returnsAll swings, up and downCompare how smooth returns were
Sortino ratioExcess return ÷ downside deviationOnly the down swingsJudge strategies with big up days, such as trend following
Calmar ratioAnnual return ÷ max drawdownThe single deepest fallSee the worst stretch you would have sat through
Max drawdownDeepest peak-to-trough fallThe worst loss from a highSize positions and set a drawdown halt
Profit factorGross profit ÷ gross lossLosing trades, regardless of orderCheck a strategy trade by trade
Standard definitions.

Sortino uses the downside deviation: the square root of the average squared return below a target, usually 0. A strategy with big up days and small losses scores much better on Sortino than on Sharpe. One with rare deep losses can look fine on both and still have a large max drawdown, which is why Calmar and drawdown belong next to them.

How to calculate Sharpe, Sortino and Calmar in Python

This calculates all three from daily closes, the same way as the table above. To judge a strategy rather than a market, pass its daily account value instead of a price.

python
import numpy as np
import pandas as pd

def ratios(closes: pd.Series, periods_per_year: int = 365, rf_annual: float = 0.0):
    """Sharpe, Sortino and Calmar from a series of daily closes or account values."""
    r = closes.pct_change().dropna()
    excess = r - rf_annual / periods_per_year
    sharpe = excess.mean() / excess.std(ddof=0) * np.sqrt(periods_per_year)
    downside = np.sqrt((np.minimum(excess, 0) ** 2).mean())
    sortino = excess.mean() / downside * np.sqrt(periods_per_year)
    years = len(r) / periods_per_year
    annual_return = (closes.iloc[-1] / closes.iloc[0]) ** (1 / years) - 1
    max_drawdown = (closes / closes.cummax() - 1).min()
    calmar = annual_return / abs(max_drawdown)
    return {"sharpe": round(float(sharpe), 2), "sortino": round(float(sortino), 2), "calmar": round(float(calmar), 2)}

Hyperliquid’s info API serves daily candles without a key:

python
import time
import requests

end = int(time.time() * 1000)
body = {"type": "candleSnapshot",
        "req": {"coin": "BTC", "interval": "1d", "startTime": end - 400 * 86_400_000, "endTime": end}}
candles = requests.post("https://api.hyperliquid.xyz/info", json=body).json()
closes = pd.Series([float(c["c"]) for c in candles],
                   index=pd.to_datetime([c["t"] for c in candles], unit="ms"))
closes = closes.iloc[:-1]           # drop today's unfinished candle
print(ratios(closes.iloc[-366:]))   # the last 365 daily returns

What is a good Sharpe ratio?

Common rules of thumb: below 0, the strategy did worse than the risk-free rate; 0 to 1, positive but modest for the risk taken; above 1, good; above 2, very good; above 3, rare enough to check for an error or overfitting. Context matters more than the cut-offs. In the year to Nov 10, 2026, buy-and-hold on the four largest Hyperliquid markets scored from −0.81 to 1.06, and the same four scored 0.89 to 1.72 over 90 days.

Where the Sharpe ratio misleads

  • Fat tails. Sharpe assumes returns are roughly normal. Under a normal distribution you would expect about one day a year beyond three standard deviations; in the last 365 days BTC had 4, ETH 5 and SOL 6, and BTC’s worst day was −14.0%.
  • Short windows. Under textbook assumptions, a Sharpe measured over one year has a standard error of about 1 (Andrew Lo, 2002), so a one-year Sharpe of 1 is hard to tell from zero. Four years of data halve the error.
  • Hidden tail risk. Strategies that quietly sell insurance, such as a grid with no stop or adding to losing positions, show smooth returns and a high Sharpe until one move wipes them out. Check max drawdown and the worst day too.
  • Leverage. Leverage scales return and volatility together, so it barely moves the Sharpe ratio, but it multiplies the drawdown and brings liquidation into play.
  • Wrong annualisation. Crypto trades 365 days a year; √252 understates a daily Sharpe by about 17%.
  • Backtest vs live. Fees, slippage and funding lower live returns. A backtest that leaves them out overstates the Sharpe; see how to backtest a crypto trading strategy.

What is the Sharpe ratio in simple terms?

Return per unit of risk. It divides a strategy’s average return above the risk-free rate by how much its returns swing. Two strategies with the same return can have very different Sharpe ratios if one got there with much bigger ups and downs.

What is a good Sharpe ratio?

Above 1 is usually called good, above 2 very good and above 3 rare. For context, buy-and-hold HYPE scored 1.06 over the year to Nov 10, 2026, while BTC, ETH and SOL were negative. A high Sharpe over a short window says little on its own.

How do you calculate the Sharpe ratio?

Take the returns per period, subtract the risk-free rate, and divide the average by the standard deviation. Multiply by the square root of periods per year to annualise: √365 for daily crypto returns, √252 for daily stock returns.

What is the difference between the Sharpe and Sortino ratios?

Sharpe divides by the volatility of all returns, so big up days count against it. Sortino divides only by the downside deviation, so it punishes losses but not gains. Strategies with large winners score higher on Sortino than on Sharpe.

Should I use 252 or 365 days for crypto?

365. Crypto markets, including Hyperliquid’s perps, trade every day of the year, so daily data has 365 periods. Using √252 understates the annual Sharpe by about 17%.

Can the Sharpe ratio be negative?

Yes. When the return is below the risk-free rate, the ratio is negative. Buy-and-hold BTC, ETH and SOL all had negative one-year Sharpe ratios on Hyperliquid to Nov 10, 2026.

Can I set a drawdown limit on a strategy?

On Senpi, yes. Each strategy can have its own daily-loss halt, which lifts at the next UTC midnight, or a drawdown halt, which waits until you resume it, and strategies built from a rule or a template carry the Dynamic Stop-Loss from the first fill.

This is educational material, not financial advice. The market readings are data, not trade signals, and leveraged perps can lose money quickly.

Build a strategy with its losses capped

Describe the rules and the worst day you will accept. Senpi runs it with a stop from the first fill and the halts you set.

Try Senpi free
Share

Related articles