YieldGreeksLab
Portfolio & margin

Portfolio Risk, Sharpe, Sortino & Rebalancing Calculator

Model a two- to four-asset portfolio with pairwise correlations and fees, calculate risk-adjusted return and size trades to reach target weights.

Educational quantitative reference. Outputs are deterministic mathematical calculations. They do not constitute personalized financial, tax, or investment advice.

Portfolio net return
6.763%
Portfolio volatility
10.9317%
Sharpe ratio
0.2985

Risk and return

The curve varies the mix between the current and target allocations.

  • Allocation mix
  • Current portfolio
  • Target portfolio
Risk and returnThe curve varies the mix between the current and target allocations.Net return (%)6.56.66.76.810.410.610.8Annual volatility (%)
Annual volatility (%) 10.9317Allocation mix 6.763%Current portfolio 6.763%

Tap, hover or use the arrow keys on the chart to read values.

Calculation details

Sortino ratio
1.1814
Portfolio gross return
6.895%
Weighted expense drag
0.132%
Annual downside deviation
4.8779%
Target net return
6.55%
Target volatility
10.2196%
Smallest correlation eigenvalue
0.488439

A positive trade is a buy. A negative trade is a sale. Amounts exclude costs.

Rebalancing trade ticket
AssetCurrent weightTarget weightCurrent amountTarget amountTrade
Asset A55%50%$55,000.00$50,000.00-$5,000.00
Asset B30%35%$30,000.00$35,000.00$5,000.00
Asset C15%15%$15,000.00$15,000.00$0.00

Worked examples

Formulas and conventions

Normalize weights and subtract expenses

wᵢ = aᵢ / Σ aⱼ · μgross = Σ wᵢ μᵢ · μnet = μgross − Σ wᵢ eᵢ

Normalize current and target weights independently. Enter nonnegative weights and at least one positive value in each set. Asset return, volatility and expense ratios are annual inputs. Expenses reduce expected return in the model.

Covariance and portfolio volatility

Σᵢⱼ = σᵢσⱼρᵢⱼ · σp = √(wᵀΣw)

Build the symmetric correlation matrix with ones on the diagonal. Jacobi rotations estimate its eigenvalues. The matrix must be positive semidefinite, with a numerical tolerance of 10⁻¹⁰ around zero. Singular matrices can be valid.

Risk-adjusted metrics

Sharpe = (μnet − rf) / σp · Sortino = (μnet − MAR) / DD

Sharpe compares fee-adjusted return with the risk-free input and uses total volatility. Sortino compares with your minimum acceptable return (MAR) and uses downside deviation. A zero denominator leaves the corresponding ratio undefined.

Normal-approximation downside deviation

δ = MAR − μnet · z = δ / σp · DD² = (δ² + σp²)Φ(z) + δσp φ(z)

Model annual returns as normal and take the square root of the expected squared shortfall below MAR, including zero shortfall in other outcomes. With zero volatility, downside deviation is max(δ, 0).

Rebalancing trade ticket

Currentᵢ = V × wᵢ · Targetᵢ = V × w*ᵢ · Tradeᵢ = Targetᵢ − Currentᵢ

An allocation mix on the risk chart blends current and target weights. Use the allocation view to inspect position-level drift. The trade ticket uses a single total market value V and excludes trading costs and rounding to whole lots.

Model assumptions

This is a long-only mean-variance model. Annual returns, volatilities and correlations are user assumptions. The Sortino approximation uses a normal distribution and can understate shortfall when returns have heavy left tails.

Frequently asked questions

Why might a correlation matrix fail when every pair is between −1 and 1?

Pairwise values need to describe one feasible joint system. A negative eigenvalue means some combination would have negative modeled variance.

Will the trade ticket still work when my weight inputs do not sum to 100?

Yes. Each set is normalized separately. A current input of 4 against 6 is treated as 40% of portfolio value.