Skip to content
    Finance / Capital Allocation Matrix

    Asset Allocation Calculator — Efficient Frontier & CAL

    Find your optimal portfolio mix: efficient frontier, tangency portfolio, capital allocation line, and the risky share that fits your risk tolerance.

    ToolCalculatorExecutionIn browserCategoryFinancial
    Capital Allocation Model

    Capital Allocation Matrix

    Mean–variance frontier, tangency portfolio, capital allocation line, and utility surface for two risky assets plus a risk-free asset.
    Summary
    max Sharpe 0.575031
    Tangency weights: A 0.4791 / B 0.5209
    Efficient frontier minimum-variance weight in A: 0.8141
    Tangency Mean
    13.638%
    E[R_T]
    Tangency Sigma
    15.892%
    σ_T
    Optimal Risky Share
    0.8041
    y*(A)
    Utility at y*
    0.081740
    quadratic utility
    Asset A Return
    10.200%
    Asset A
    Asset B Return
    16.800%
    Asset B
    Risk-Free Rate
    4.500%
    rf
    Correlation
    0.320
    ρ(A,B)
    Inputs
    Canonical portfolio inputs
    Asset A
    Asset A expected return
    Asset A volatility
    Asset B expected return
    Asset B volatility
    Risk-free rate
    Correlation
    Risk aversion A
    Maximum risky allocation on CAL
    Formulas
    The relationships behind the charts
    Mean–variance
    μp = wTμ
    σp2 = wTΣw
    U(w) ≈ wTμ − (λ/2)wTΣw
    CAL / tangency
    wT ∝ Σ−1(μ − rf1)
    E[Rc] = rf + y(E[RT] − rf)
    σc = |y|σT
    2D market geometry
    Efficient frontier, CAL, and allocation sweep
    Efficient frontier and CALRisky-asset frontier vs. risk-free capital allocation lineexpected returnvolatility-0.0010.0560.1130.1700.2270.140.180.220.260.300.34All risky combinationsEfficient branchCapital allocation line
    Allocation weights along the CALRisk-free vs risky fund weights as the allocation y changesweightallocation y-0.996-0.2480.5001.2481.996-0.50-0.000.501.001.502.00risky share yrisk-free share 1-yUtility across capital allocationQuadratic utility with risk aversion A = 4.50utility / returnallocation y-0.0150.0460.1060.1670.227-0.50-0.000.501.001.502.00utility U(y)mean E[R]
    Capital allocation matrixUtility U(A, y) over risk aversion and risky allocation-0.5-0.5-0.4-0.4-0.4-0.3-0.3-0.3-0.2-0.2-0.2-0.1-0.1-0.1-0.00.00.00.10.10.10.20.20.30.30.30.40.40.40.50.50.50.60.60.60.70.70.70.80.80.80.90.90.91.01.01.01.11.11.11.21.21.21.31.31.31.41.41.41.51.51.51.61.61.61.71.71.81.81.81.91.91.92.02.02.02.12.12.12.22.22.22.32.32.32.42.42.42.52.50.60.70.91.01.21.31.41.61.71.82.02.12.32.42.52.72.83.03.13.23.43.53.63.83.94.14.24.34.54.64.74.95.05.25.35.45.65.75.96.06.16.36.46.56.76.87.07.17.27.47.57.77.87.98.18.28.38.58.68.88.99.09.29.39.49.69.79.910.0lowhigh
    Key portfolio values
    Optimized from the current inputs
    Tangency Sharpe
    0.575031
    (E[R_T]-rf)/σ_T
    Optimal y*
    0.804100
    analytic mean-variance utility optimum
    Tangency mean
    13.6382%
    E[R_T]
    Tangency sigma
    15.8916%
    σ_T
    Interpretation
    What the matrix means
    The heatmap encodes the investor’s utility for each combination of risk aversion and risky allocation. The ridgeline of highest utility follows y* = (E[R_T] − r_f)/(Aσ_T²), which is the expected-utility optimum under the quadratic approximation used in mean-variance portfolio theory.
    3D allocation geometry
    Isometric surfaces for utility and frontier shape
    Utility surface U(A, y)Risk aversion on the back axis, risky share on the front axisx (risky share)A (risk aversion)utilitysurface grid69 × 89 cells · range -0.5157 to 0.2261x-axis: allocation to risky fund y
    Risk / return snapshot
    At the analytic optimum y*
    Mean at y*
    0.118480
    E[R_c]
    Sigma at y*
    0.127785
    σ_c
    Utility at y*
    0.081740
    U(y*)
    Risk-free share
    0.195900
    1 - y*
    Background
    Where this model comes from
    Markowitz’s 1952 framework defines the mean–variance trade-off. Tobin’s work and the standard portfolio notes show that once a risk-free asset is available, the efficient set becomes a straight line from the risk-free rate to the tangency portfolio, and the tangency portfolio is the one with the highest Sharpe ratio. The code comments above the formulas point to those exact relations.
    finance methodology

    A clear path from inputs to results.

    Decide how much of your portfolio belongs in risky assets versus cash or bonds. Enter expected returns, volatilities, and correlation for two assets plus a risk-free rate, and the matrix maps the efficient frontier, the tangency portfolio, the capital allocation line, and the utility-maximizing risky share for your level of risk aversion.

    Step-by-step methodWorked exampleAssumptions explained

    How to use

    1. Enter each asset's expected annual return and volatility — Asset A defaults to 10.2% return with 14.5% volatility, Asset B to 16.8% with 23.5%.
    2. Set the correlation between the two assets from −0.95 to 0.95; lower correlation bends the frontier toward lower-risk blends.
    3. Set the risk-free rate available on the safe asset.
    4. Set your risk-aversion coefficient A (higher means more conservative) and, if you want to explore leverage, the maximum risky allocation shown on the capital allocation line.
    5. Read the tangency weights and Sharpe ratio, the optimal risky share y*, and your utility at that share.
    6. Use the utility heatmap and 3D surface to see how the best allocation shifts as risk aversion changes.

    The formula

    wT∝Σ−1(μ−rf 1),E[Rc]=rf+y (E[RT]−rf),y∗=E[RT]−rfA σT2w_T \propto \Sigma^{-1}(\mu - r_f\,\mathbf{1}), \qquad E[R_c] = r_f + y\,(E[R_T] - r_f), \qquad y^{*} = \frac{E[R_T] - r_f}{A\,\sigma_T^{2}}

    Reference: Markowitz (1952) mean-variance portfolio selection; Tobin (1958) separation theorem; two-asset tangency weights from the inverse covariance matrix; quadratic (mean-variance) utility.

    Worked example

    A balanced two-asset mix at moderate risk aversion

    Inputs
    • Asset A: 10.2% expected return, 14.5% volatility; Asset B: 16.8% return, 23.5% volatility; correlation 0.32; risk-free rate 4.5%; risk aversion A = 4.5.
    Calculation path
    1. 1

      The covariance is 0.32 × 0.145 × 0.235 = 0.010904. Applying the inverse of the 2×2 covariance matrix to the excess returns and normalizing the result gives tangency weights of 47.9% in A and 52.1% in B. That portfolio's expected return is 0.479 × 10.2% + 0.521 × 16.8% = 13.64%, its variance works out to 0.02525, so volatility is 15.89% and the Sharpe ratio is (13.64% − 4.5%) ÷ 15.89% = 0.575. The optimal risky share is y* = (13.64% − 4.5%) ÷ (4.5 × 0.1589²) = 0.804, so about 80% of capital goes into the tangency mix and 20% stays at the risk-free rate, producing utility of 0.0817.

    Result

    Tangency portfolio 47.9% Asset A / 52.1% Asset B; E[R_T] = 13.64% with σ_T = 15.89% and Sharpe 0.575; optimal risky share y* = 0.80 (utility 0.0817).

    Interpreting the result

    The tangency portfolio is the risk-efficient way to hold the two assets — it maximizes return per unit of risk given your inputs. The capital allocation line then scales that mix: y below 1 lends part of the portfolio at the risk-free rate, y above 1 borrows to lever up. Your risk aversion picks the point on the line, and the heatmap's bright ridge traces exactly how that best point slides toward cash as A rises.

    Assumptions & limitations

    • The model covers two risky assets plus one risk-free asset; expected returns, volatilities, and correlation are annualized point estimates you supply, not forecasts, and results move with them.
    • Utility is the standard quadratic (mean-variance) approximation, so it is a ranking device rather than a dollar outcome.
    • The frontier sweep allows short positions and leverage (each asset's weight ranges from −50% to +150%), and the allocation line allows borrowing up to the maximum risky share you set.
    • No taxes, transaction costs, minimum lot sizes, or rebalancing rules are modeled.
    • Volatility is treated as symmetric — upside and downside deviation count identically.

    Frequently asked questions

    What is the tangency portfolio?

    It is the mix of the two risky assets with the highest Sharpe ratio — the point where a line drawn from the risk-free rate just touches the efficient frontier. The engine computes it by applying the inverse covariance matrix to the assets' excess returns; with the default inputs that is 47.9% Asset A and 52.1% Asset B, earning 13.64% with 15.89% volatility and a Sharpe ratio of 0.575.

    What does the heatmap show?

    Each cell is your quadratic utility for one combination of risk aversion (A) and risky allocation (y). The ridge of highest-utility cells follows y* = (E[R_T] − r_f)/(A·σ_T²), so you can watch the optimal allocation slide toward less risk as A increases.

    Why does correlation matter so much?

    Correlation controls how much the two assets diversify each other. At the default 0.32, the tangency portfolio's volatility is 15.89%; set the correlation to 0 and the optimal mix blends to a 13.26% volatility at a similar return. Push correlation to 0.9 and the tangency solution swings to a levered long-short combination with 57% volatility — a warning that the optimizer amplifies extreme inputs.

    How much should I put in risky assets?

    The model's answer is y* = (E[R_T] − r_f) ÷ (A·σ_T²). With the default inputs that is 0.804 at a risk aversion of 4.5 — about 80% in the tangency mix and 20% at the risk-free rate. Raise the risk aversion to 10 and the same formula drops the share to 0.36: the return expectations did not change, only your tolerance did.

    Can the model recommend borrowing to invest more?

    It maps the option but does not judge it. Allocating more than 100% to the tangency portfolio simulates borrowing at the risk-free rate: at y = 2 with the default inputs, expected return rises to 22.78% but volatility doubles to 31.78%, and a risk-averse investor's utility falls below its peak at y*. The maximum-allocation slider caps how far along that path the chart goes.

    Are the expected returns guaranteed?

    No — they are your inputs, and the matrix optimizes them mechanically. Mean-variance optimizers are known to be sensitive to small input changes, so treat the output as a structured way to test scenarios — change one number and watch the frontier and y* move — rather than as a single correct portfolio.

    Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.