Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:HKUDS AI Trader Portfolio Metrics Calculation

From Leeroopedia


Knowledge Sources
Domains Quantitative_Finance, Performance_Analysis
Last Updated 2026-02-09 14:00 GMT

Overview

A quantitative finance technique that computes risk-adjusted performance metrics from portfolio time series data.

Description

Portfolio Metrics Calculation evaluates trading strategy performance using standard financial metrics. Given a time series of portfolio total values, it computes:

  • Cumulative Return (CR): Total percentage gain over the period
  • Sharpe Ratio: Risk-adjusted return using standard deviation of returns
  • Sortino Ratio (SR): Like Sharpe but penalizes only downside volatility
  • Maximum Drawdown (MDD): Largest peak-to-trough decline
  • Calmar Ratio: Annualized return divided by maximum drawdown
  • Volatility (Vol): Annualized standard deviation of returns
  • Win Rate: Percentage of profitable trading periods

These metrics are the standard toolkit for evaluating any quantitative trading strategy.

Usage

Use this principle after a backtesting simulation completes to evaluate agent performance. The metrics enable comparison between different LLM agents and against market benchmarks.

Theoretical Basis

Key formulas:

CR=VfinalVinitialVinitial

Sharpe=r¯rfσr×N

Sortino=r¯rfσdownside×N

MDD=maxtPeaktTroughtPeakt

Where:

  • r¯ = mean return
  • rf = risk-free rate
  • σr = standard deviation of returns
  • σdownside = standard deviation of negative returns only
  • N = annualization factor (252 for daily, 252*6.5 for hourly, 365 for crypto)

Related Pages

Uses Heuristic

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment