Reporting - Sharpe Ratio, Sortino Ratio
complete
Brian Chia
Improve strategy or portfolio performance reporting to account for volatility of returns. The initial update will add:
- Sharpe Ratio
- Sortino Ratio
These will be calculated on daily strategy or portfolio returns, annualized.
Metrics to consider in future updates:
- Ulcer Index
- Ulcer Performance Index / Martin Ratio
- Profit Factor
Brian Chia
marked this post as
complete
Brian Chia
This is now released!
Brian Chia
Merged in a post:
Profit Factor, Sharpe ratio, Sortini ratio
C
Caleb Salmon
I'd like to be able to view profit factor, sharpe ratio and sortini ratio in the backtester and portfolio. Its clunky having to download the csv file and put it in AI.
Brian Chia
marked this post as
planned
S
Stefan Schneider
Please consider Ulcer Performance Index (UPI) as well ❤
Brian Chia
marked this post as
under consideration
Currently researching this to add to backtesting results analysis
Brian Chia
Merged in a post:
Add Sortino Ratio to default metrics panel
M
Michael Smith
The Sortino ratio improves upon the Sharpe ratio by focusing only on downside volatility, offering a more accurate measure of risk-adjusted returns for strategies where upside deviation is not penalized. Including it in backtesting software helps traders distinguish between strategies that exhibit high returns with acceptable downside risk versus those with volatile or unbalanced performance.
Skip Sharpe. It's dumb. So overused and so much less utility. And start a write-in campaign to get his Noble Prize moved to Frank Sortino.
function calculateSortinoRatio(returns, targetReturn = 0) {
const n = returns.length;
if (n === 0) return null;
// Average return
const meanReturn = returns.reduce((a, b) => a + b, 0) / n;
// Downside deviation: only consider returns below the target
const downsideReturns = returns.filter(r => r < targetReturn);
const downsideDeviation = Math.sqrt(
downsideReturns.reduce((sum, r) => sum + Math.pow(r - targetReturn, 2), 0) / n
);
if (downsideDeviation === 0) return Infinity;
return (meanReturn - targetReturn) / downsideDeviation;
}
Example
const dailyReturns = [0.01, -0.02, 0.005, -0.01, 0.02]; // Example daily returns
const sortino = calculateSortinoRatio(dailyReturns, 0); // Target return is 0
console.log("Sortino Ratio:", sortino.toFixed(2));
Brian Chia
Merged in a post:
Add Sortina and Sharpe
Craig Sander
This was requested back in 2023. It doesn't seem like it should be difficult to add. MAR is a good metric, but by itself can be misleading. One bad streak, especially early in a backtest, can make a big difference in MAR. Sortina gives a better overall picture when comparing different strategies.
Brian Chia
Merged in a post:
Add Sharpe
M
Migration
Please add the standard annualized sharpe ratio metric
S
Stefan S
I'd like to support that. Sortino and Sharpe don't mind the order of bad things happening. MAR puts emphasis on bad things happening in a row. All have their place and complement each other.
Load More
→