Tools
12 min read

Portfolio Analytics Tools: How to Track, Attribute, and Improve Trading Performance

Knowing your return is not enough. Understanding where it came from — and where you are losing edge — requires portfolio analytics. Learn the tools and metrics that separate serious traders from guessers.

Gilito Research Team

Portfolio Analytics & Performance

Portfolio analytics dashboard showing return attribution charts, drawdown analysis, and risk metrics

Why Basic Return Tracking Is Not Enough

Most traders track total return and stop there. Professional quant traders decompose performance into its component parts — because total return alone tells you almost nothing about whether your edge is working.

Consider two traders, both up 18% in a year:

  • Trader A: 18% came from one outsized winner. All other positions lost money. Sharpe ratio: 0.4.
  • Trader B: 18% came from 80 trades across 5 strategies, all contributing positively. Sharpe ratio: 1.6.

Trader A got lucky on one position. Trader B has a systematic edge. Total return cannot distinguish them.

Portfolio analytics separates signal from noise in your own trading results.


The Core Metrics Every Trader Should Track

Return Metrics

Metric Formula What It Shows
CAGR (End/Start)^(1/years) - 1 Annualized growth rate
Cumulative return (End - Start) / Start Total percentage gain
Best/worst period return Max/min rolling period return Range of outcomes
Rolling 12-month return Return over trailing 12 months Current momentum of performance

Risk-Adjusted Metrics

Metric Formula What It Shows
Sharpe Ratio (Return - Rf) / Volatility Return per unit of total risk
Sortino Ratio (Return - Rf) / Downside deviation Return per unit of downside risk
Calmar Ratio CAGR / Max Drawdown Return vs worst historical loss
Information Ratio Active return / Active risk Excess return per unit of active risk vs benchmark

Drawdown Metrics

Metric Definition Target
Maximum Drawdown Largest peak-to-trough decline Depends on strategy; < 20% for most
Average Drawdown Mean of all drawdowns Should be much smaller than max
Drawdown Duration Longest time from peak to recovery Shorter = better
Underwater period Total time below peak equity Lower fraction = better

Performance Attribution: Where Is Your Return Coming From?

Attribution analysis decomposes total return into sources — to identify what is working and what is not.

By Strategy

If you run multiple strategies, track each separately:

Strategy A (Trend Following):   +12.3% contribution
Strategy B (Mean Reversion):     +4.1% contribution
Strategy C (Factor):             +1.8% contribution
Strategy D (Momentum):           -2.4% contribution
Total:                          +15.8%

Strategy D is destroying value. Without attribution, you would not know — and you would continue running it.

By Asset Class or Sector

Even within a single strategy, track return contribution by sector:

Technology:    +8.1%
Healthcare:    +3.2%
Energy:        -1.7%
Financials:    -0.8%
Other:         +2.4%

If your returns are concentrated in one sector, you may be running a sector bet, not a diversified strategy.

By Signal Type

For quant strategies with multiple signal components:

Momentum signal:      +6.2%
Quality filter:       +2.1%
Value screen:         +0.9%
Volatility filter:    +1.3%
Unattributed:         +0.8%
Total:               +11.3%

If one signal drives all the returns, consider whether the others add value or just add transaction costs.


Tools for Portfolio Analytics

pyfolio

The most widely used open-source portfolio analytics library for Python. Originally developed by Quantopian, now maintained by the community.

Key outputs:

  • Full performance tearsheet (returns, drawdowns, rolling Sharpe)
  • Annual and monthly returns heatmap
  • Factor exposure analysis (via Alphalens integration)
  • Rolling statistics (Sharpe, beta, volatility)
import pyfolio as pf

# returns: pandas Series of daily portfolio returns
pf.create_full_tear_sheet(returns, benchmark_rets=benchmark_returns)

Strengths: Comprehensive, institutional-grade output, integrates with Zipline Weaknesses: Older codebase, some compatibility issues with newer pandas versions

QuantStats

A more modern alternative to pyfolio, actively maintained and easier to install.

import quantstats as qs

qs.reports.full(returns, benchmark='SPY')

Key features:

  • HTML report generation (shareable tearsheets)
  • Comparison against any benchmark
  • More metrics than pyfolio
  • Better Python 3 compatibility

Best for: Most retail quant traders who want quick, professional reporting.

Alphalens

Specifically designed for factor analysis — evaluating how well a signal (factor) predicts future returns.

import alphalens

factor_data = alphalens.utils.get_clean_factor_and_forward_returns(
    factor=my_signal,
    prices=stock_prices,
    quantiles=5,
    periods=(1, 5, 10)
)

alphalens.tears.create_full_tear_sheet(factor_data)

Key outputs:

  • Information Coefficient (IC): correlation between factor values and subsequent returns
  • IC decay: how quickly the factor's predictive power decays over time
  • Quantile return spread: how much the top quintile outperforms the bottom

Best for: Evaluating new alpha signals before incorporating them into a live strategy.

Riskfolio-Lib

Advanced portfolio construction and risk analysis — implements efficient frontier, risk parity, CVaR optimization, and attribution.

Best for: Portfolio optimization and risk budget attribution.


Key Analytical Concepts

Information Coefficient (IC)

The IC measures how well your signal predicts subsequent returns:

IC = Spearman rank correlation between signal values and forward returns
IC Value Interpretation
> 0.10 Excellent — rare in practice
0.05–0.10 Very good — typical for top quant signals
0.02–0.05 Good — worth trading with high Sharpe
< 0.02 Marginal — transaction costs will likely erode it

The IC should be measured out-of-sample, not on training data.

IC Decay

How quickly does the signal's predictive power decay over time? Plot IC at 1-day, 5-day, 10-day, and 20-day forward returns:

  • Fast decay: Signal is relevant for short-term trading (days)
  • Slow decay: Signal has longer holding horizon value (weeks to months)

IC decay tells you the optimal holding period for a signal — a critical input for position management.

Hit Rate vs Profit Factor

These two metrics tell you about the shape of your return distribution:

Hit Rate    = Winning trades / Total trades
Profit Factor = Gross profits / Gross losses

A strategy with 40% hit rate and profit factor of 2.5 is healthy — it wins less often but wins bigger. A strategy with 70% hit rate and profit factor of 0.8 is losing money — it wins often but loses more in total.

Healthy combinations:

Hit Rate Profit Factor Assessment
40% > 2.0 Trend-following style
50% > 1.4 Balanced
65% > 1.1 Mean-reversion style

Rolling Sharpe Analysis

Track the rolling 12-month Sharpe ratio over time. Consistent Sharpe above 0.5 suggests a stable edge. Sharpe that is volatile or trending downward suggests:

  • Strategy edge is degrading
  • Regime change has made the strategy less applicable
  • Signal is being arbitraged away

Building a Performance Dashboard

A practical trader's dashboard should show:

Daily view:

  • P&L for the day and MTD
  • Open position exposures
  • Current drawdown from high-water mark

Weekly view:

  • Return vs benchmark
  • Win rate and average P&L per trade
  • Largest contributors and detractors

Monthly view:

  • Full attribution by strategy/sector/signal
  • Rolling Sharpe update
  • Assessment: is each strategy still earning its allocation?

Quarterly view:

  • Full performance tearsheet
  • Factor exposure review
  • Correlation between strategies (have they become more correlated?)
  • Strategy rotation decisions

When Analytics Reveal a Problem

Analytics are only valuable if you act on what they show. Common findings and responses:

Finding Likely Cause Action
One strategy drives all returns Insufficient diversification Add uncorrelated strategies
Sharp drawdown in rolling Sharpe Regime change Review signal validity in new regime
IC declining over time Signal being arbitraged away Refresh signal or replace
High hit rate, low profit factor Stops too tight, targets too tight Adjust exit rules
Correlated strategy returns Strategies not as diversified as expected Review signal overlap

Frequently Asked Questions

What is a good Sharpe ratio for a live trading portfolio? 0.8–1.2 is realistic for a diversified quant portfolio. Above 1.5 is excellent. Anything above 2.5 sustained over several years is extremely rare and should be verified carefully.

How often should I review performance attribution? Monthly at minimum. If a strategy generates 50+ trades per month, weekly attribution helps catch problems earlier.

What is a good Information Coefficient for a signal? IC of 0.05 is considered good in practice. IC of 0.08–0.10 is exceptional. IC above 0.10 is rare outside of very short-term signals on highly liquid markets.

Should I use time-weighted or money-weighted returns? Time-weighted return (TWR) measures strategy performance independently of cash flows — use this to evaluate strategy quality. Money-weighted return (MWR/IRR) measures your personal investment return including timing of contributions — use this to measure your wealth creation.


The Bottom Line

Portfolio analytics transforms trading from intuition-based to evidence-based. The discipline of attribution — knowing not just what you made, but why — is what separates traders who compound long-term from those who get lucky and lose it.

Tools like pyfolio, QuantStats, and Alphalens make professional-grade analytics accessible to individual traders. The investment of a few hours in setting up a proper analytics workflow pays dividends in faster strategy improvement, earlier problem detection, and more rational allocation decisions.

Platforms like Gilito surface pre-computed analytics for each signal — Sharpe ratio, win rate, drawdown metrics — so you can evaluate signal quality without building analytics infrastructure from scratch.

Tags:portfolio analyticsperformance attributiontrading metricsdrawdown analysispyfolio

Found this useful?

Gilito backtests 100,000,000+ strategies daily so you get actionable signals — not guesswork. Try it free.

Get in touch

Related Articles