Chapter 4 · Introduction

Chapter 4 — Portfolio Mathematics

Why a basket of risky assets can be safer than any one of them, how to find the best mixes with vectors, matrices and Lagrange multipliers, what the market pays you for bearing risk, and how to keep a chosen allocation on track.

Every investor in India meets the same question sooner or later: put the money in the one thing you like best — a bank stock you know, a fund that did well last year, gold, a fixed deposit — or spread it out? The proverb says "don't put all your eggs in one basket", but it does not say how many baskets, which ones, or in what proportions. This chapter answers those questions with mathematics. The surprising first result is that mixing two risky assets can produce a portfolio less risky than either of them, as long as they do not move in perfect lockstep — and the amount of risk that disappears is controlled by a single number, the correlation. With many assets the bookkeeping becomes a vector of weights $w$ and a covariance matrix $\Sigma$, and the portfolio's variance is the quadratic form $w^{\mathsf T}\Sigma w$ — linear algebra doing real work on a real money question.

Once risk and return can be computed for every mix, we can ask for the best mixes. Minimising variance subject to the weights adding up to 1 is a calculus problem solved with Lagrange multipliers, and its answers trace the efficient frontier, the curve every portfolio manager draws. Add a risk-free asset such as a treasury bill and the picture simplifies dramatically: one risky portfolio, the tangency portfolio, is best for everybody, and the line through it — the capital market line — leads straight to the Capital Asset Pricing Model, which says the market rewards only the risk you cannot diversify away, measured by beta. We then look at factor ideas (size, value, momentum), at how to choose and maintain a long-term mix of equity, debt and gold, and finally, in §4.3, at the constraints real portfolios face — no short selling, weight caps, goals — solved as linear and quadratic programmes. Throughout, the numbers are illustrative assumptions, and the mathematics describes trade-offs; it does not pick investments for you.

Two assets & correlation→$w^{\mathsf T}\Sigma w$→Minimum variance (Lagrange)→Efficient frontier→Systematic vs specific risk→Tangency & CML→CAPM & SML→Factors→Asset allocation & rebalancing→Constraints & LP
🎯 By the end of this chapter you can…
  • compute the expected return and volatility of a two-asset and an $n$-asset portfolio, using $w^{\mathsf T}\mu$ and $w^{\mathsf T}\Sigma w$, and explain how correlation creates (or fails to create) diversification;
  • find the minimum-variance portfolio with Lagrange multipliers, trace the efficient frontier and decompose a portfolio's risk into each asset's contribution;
  • separate systematic from unsystematic risk and estimate how many stocks it takes to diversify;
  • build the capital market line, find the tangency portfolio and choose a mix of it with a risk-free asset for a target risk;
  • use CAPM and the security market line to compute a required return, a portfolio beta and an alpha, and describe size, value and momentum factors honestly;
  • plan a strategic allocation across equity, debt and gold, compute the trades that rebalance it, explain the "rebalancing bonus" and judge age-based rules of thumb;
  • set up constrained portfolio problems (no short sales, caps, goals) as linear or quadratic programmes and see how sensitive optimal weights are to their inputs.
Teaser — How Many Stocks Does It Take?

An equal-weighted portfolio of $N$ stocks, each with the same volatility and the same pairwise correlation (simulated, illustrative inputs). The blue curve is the portfolio's volatility as $N$ grows; the red dashed line is the floor that no amount of diversification can remove — the market-wide risk all the stocks share. Press Play to add stocks one by one, then change the correlation.

30%0.251
portfolio volatility—
floor (market risk)—
diversifiable risk removed—
stocks to get within 10% of floor—

Where this shows up in real life

You use this chapter whenever you decide how much of your savings goes into equity funds, debt funds, gold and deposits; when you wonder whether a tenth mutual fund adds anything to the nine you already hold; when a fund factsheet reports a beta, a Sharpe ratio or "number of stocks"; when a balanced-advantage or multi-asset fund describes its allocation rules; and when you rebalance a SIP portfolio once a year. Fund managers, pension and insurance investment desks, portfolio-management services and robo-advisers run exactly these calculations — covariance matrices, frontiers, CAPM required returns, factor exposures and rebalancing bands — and the CAPM cost of equity is the discount rate used in company valuation (§5.1). The certification examinations for distributors and investment advisers ask about diversification, beta and asset allocation, and finance interviews love "why does diversification work?" and "what is the tangency portfolio?". The ideas also explain why hedging with index futures uses beta (§6.1) and why portfolio VaR needs correlations (§7.4).

Sections in this chapter

✅ Before you start

You need the statistics of returns from Chapter 3: expected (mean) return, variance and volatility, and annualising with $\sqrt{252}$ or $\sqrt{12}$ (§3.1); covariance, correlation, beta and the Sharpe ratio (§3.2). From linear algebra you need only vectors, matrix multiplication, the transpose and the inverse of a small matrix — every computation is shown, and a spreadsheet's MMULT and MINVERSE do the work. From calculus you need partial derivatives; Lagrange multipliers are explained from scratch in §4.1. Returns are measured as in §1.3, and the risk-free rate is the time value of money of §1.1. If "variance of a sum" is unfamiliar, the formula $\operatorname{Var}(aX+bY)=a^2\operatorname{Var}X+b^2\operatorname{Var}Y$ $+\,2ab\operatorname{Cov}(X,Y)$ is all you need to begin.