Calculator
Results
Monthly returns
Add dates to the input to see the monthly table.
Formulas and conventions
Drawdown duration counts periods from a peak until equity regains that peak. If the sample ends below its peak, the open drawdown is counted up to the last observation and flagged as ongoing. Profit factor is the sum of positive returns divided by the absolute sum of negative returns. In PnL mode, equity is starting capital plus cumulative PnL. In returns mode, equity starts at 1.
Summary for AI agents (Markdown mirror)
# Performance & Drawdown Analytics Calculator
> Client-side calculator for Sharpe, Sortino, Calmar, CAGR, max drawdown, drawdown duration, VaR/CVaR from an equity curve, returns or PnL. URL: https://quantcore-labs.com/tools/performance-analytics/
## Inputs
- - Equity/NAV, returns in % or decimal, or PnL plus starting capital; one value per row, optional leading date
- - Periods per year: 252, 242 (A-share), 365, 52, 12
- - Risk-free rate and Sortino MAR, % p.a.
## Conventions
- - Sharpe uses sample stdev of excess returns, annualised by √P
- - Sortino uses downside deviation over all periods (Sortino–Price)
- - Calmar uses full-sample CAGR / |MDD|
- - VaR/CVaR are historical at 95%
## Reference check
- - Returns 1%, −2%, 3%, −1%, 2% with P=252, rf=0: Sharpe 4.5932, Sortino 9.5247, MDD −2.00%, CAGR 332.56%, Calmar 166.28
FAQ
- Should I annualise with 252 or 242 trading days for A-shares?
- China's A-share market has about 242 trading days a year because of its longer public holidays, so 242 is the more accurate factor for daily A-share strategies. Most US and global conventions use 252. The choice scales annualised volatility by √P and changes Sharpe by √(252/242), about 2%.
- Why is my Sortino ratio different from another tool's?
- Implementations differ on the downside deviation. This calculator uses the Sortino-Price definition: the root mean square of min(r − MAR, 0) over all periods. Some libraries instead take the standard deviation of negative returns only, which yields a larger denominator and a smaller Sortino. The MAR (minimum acceptable return) also matters; it defaults to the risk-free rate here.
- How is the Calmar ratio defined here?
- CAGR divided by the absolute maximum drawdown over the entire pasted sample. The original industry definition uses a trailing 36-month window, so results differ for samples longer or shorter than three years.
- Is my data uploaded anywhere?
- No. Parsing and every calculation run in your browser with plain JavaScript. The page makes no network requests with your data.