# Two-Asset Portfolio Calculator

> Computes the expected return, variance and standard deviation of a two-asset portfolio from the weights, expected returns, standard deviations and correlation, and finds the minimum-variance weight and the diversification benefit.

- Calculator id: `two-asset-portfolio` · Category: Investing & Real Estate (`investing`) · Tool name: `calculate_two_asset_portfolio`
- Canonical page: https://tttkmbb.com/investing/two-asset-portfolio · This document: https://tttkmbb.com/investing/two-asset-portfolio.md · JSON definition: https://tttkmbb.com/investing/two-asset-portfolio.json

## Purpose

Computes the expected return, variance and standard deviation of a two-asset portfolio from the weights, expected returns, standard deviations and correlation, and finds the minimum-variance weight and the diversification benefit.

**Use when:** You want to see how combining two assets (e.g. stocks and bonds) changes risk and return, or find the weight that minimises portfolio variance.

**Do not use when:** The portfolio has more than two assets (a covariance matrix is needed) or you want the tangency (maximum Sharpe) portfolio. Informational only; not financial advice.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `weight_a_percent` | number | % | required | Share of the portfolio in asset A in percent; asset B gets the remainder. (min 0, max 100) |
| `return_a_percent` | number | % | required | Expected return of asset A in percent. (min -100, max 1000) |
| `return_b_percent` | number | % | required | Expected return of asset B in percent. (min -100, max 1000) |
| `std_dev_a_percent` | number | % | required | Volatility of asset A in percent. (min 0, max 1000) |
| `std_dev_b_percent` | number | % | required | Volatility of asset B in percent. (min 0, max 1000) |
| `correlation` | number |  | required | Correlation coefficient between the two assets' returns (−1 to 1). (min -1, max 1) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `expected_return_percent` | number | % | wA·rA + wB·rB. |
| `portfolio_variance` | number | %² | wA²·σA² + wB²·σB² + 2·wA·wB·ρ·σA·σB (in percent squared). |
| `portfolio_std_dev_percent` | number | % | Square root of the variance. |
| `covariance` | number | %² | ρ·σA·σB. |
| `min_variance_weight_a_percent` | number | % | (σB² − ρ·σA·σB) / (σA² + σB² − 2·ρ·σA·σB), clamped to 0–100 %. |
| `min_variance_std_dev_percent` | number | % | Portfolio volatility at the minimum-variance weight. |
| `diversification_benefit_percent` | number | % | Weighted average of the two volatilities minus the portfolio volatility (0 when ρ = 1). |

## Formula

`wA = weight_a_percent/100, wB = 1 − wA; E[r] = wA·rA + wB·rB; σp² = wA²·σA² + wB²·σB² + 2·wA·wB·ρ·σA·σB; w_min = (σB² − ρ·σA·σB) / (σA² + σB² − 2·ρ·σA·σB); benefit = wA·σA + wB·σB − σp`

Markowitz mean-variance arithmetic for two risky assets with no short sales (the minimum-variance weight is clamped to 0–100 %). Inputs are per-period figures in percent; use the same period for returns and deviations. Informational mathematics only; not financial advice.

## Data Sources

- Wikipedia – Modern portfolio theory — https://en.wikipedia.org/wiki/Modern_portfolio_theory (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/two-asset-portfolio?weight_a_percent=…&return_a_percent=…&return_b_percent=…&std_dev_a_percent=…&std_dev_b_percent=…&correlation=…`
- `POST https://tttkmbb.com/api/v1/calculate/two-asset-portfolio` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/two-asset-portfolio · OpenAPI operationId `calculate_two_asset_portfolio` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "two-asset-portfolio", "inputs": {…}}`

## Example

- 60/40, returns 10/5 %, volatility 20/8 %, ρ 0.2: inputs `{"weight_a_percent":60,"return_a_percent":10,"return_b_percent":5,"std_dev_a_percent":20,"std_dev_b_percent":8,"correlation":0.2}` → `{"expected_return_percent":8,"portfolio_variance":169.6,"portfolio_std_dev_percent":13.02,"min_variance_weight_a_percent":8,"min_variance_std_dev_percent":7.84,"diversification_benefit_percent":2.18}`
- 50/50, returns 8/4 %, volatility 15/5 %, ρ −0.3: inputs `{"weight_a_percent":50,"return_a_percent":8,"return_b_percent":4,"std_dev_a_percent":15,"std_dev_b_percent":5,"correlation":-0.3}` → `{"expected_return_percent":6,"portfolio_variance":51.25,"portfolio_std_dev_percent":7.16,"min_variance_weight_a_percent":16.1,"min_variance_std_dev_percent":4.17,"diversification_benefit_percent":2.84}`

```
GET https://tttkmbb.com/api/v1/calculate/two-asset-portfolio?weight_a_percent=60&return_a_percent=10&return_b_percent=5&std_dev_a_percent=20&std_dev_b_percent=8&correlation=0.2
```

## Limitations

The portfolio has more than two assets (a covariance matrix is needed) or you want the tangency (maximum Sharpe) portfolio. Informational only; not financial advice. Markowitz mean-variance arithmetic for two risky assets with no short sales (the minimum-variance weight is clamped to 0–100 %). Inputs are per-period figures in percent; use the same period for returns and deviations. Informational mathematics only; not financial advice. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why is portfolio risk below the weighted average of the two risks?**

Unless the correlation is exactly 1, the assets do not fall together, so part of each one's variance cancels; the lower the correlation, the larger the diversification benefit.

**What if the minimum-variance formula gives a weight outside 0–100 %?**

That would require shorting one asset. The output is clamped to the nearest bound, which is the lowest-variance long-only portfolio.

## Related

- [Correlation Coefficient Calculator](https://tttkmbb.com/statistics/correlation.md) — Estimate the correlation coefficient from two return series.
- [Sharpe Ratio Calculator](https://tttkmbb.com/investing/sharpe-ratio.md) — Risk-adjusted return of the resulting portfolio.
- [Descriptive Statistics Calculator](https://tttkmbb.com/statistics/descriptive-statistics.md) — Standard deviation of each asset's returns.
