Tuesday 11 August 2026

Quant interview

Pricing a floor on the terminal stock price

easy · Put-call parity and static replication

A non-dividend-paying assumption is not made here. The stock S pays a continuous dividend yield q, the continuously-compounded risk-free rate is r, and both are constant. European options of every strike on S maturing at T are freely traded, along with the stock and zero-coupon bonds. No transaction costs, no arbitrage.

Consider a contract that pays max(ST,K) at time T.

  1. Give two distinct static replicating portfolios for this payoff: one built from a bond and a call struck at K, and one built from the stock and a put struck at K. Write the time-0 price implied by each.
  2. Show that the two prices agree, and identify exactly which theorem forces this.
  3. Take S0=$100, K=$100, r=5%, q=2%, T=1 year, and an observed European call price C=$8. Compute the price of the max(ST,K) contract and the price of the European put struck at K.
Solution

Two decompositions of the payoff

For any real numbers, max(a,b)=b+max(ab,0)=a+max(ba,0). Applying this to the terminal payoff two ways:

max(ST,K)=K+(STK)+

max(ST,K)=ST+(KST)+

The first is a zero-coupon bond paying K at T plus a European call struck at K. The second is one share held to T plus a European put struck at K.

Because these are equalities of payoffs that hold state-by-state at T, the law of one price prices each replicating portfolio by summing the prices of its traded components. Let C and P be the call and put prices, and V the price of the contract.

From the bond-plus-call portfolio:

V=KerT+C

From the stock-plus-put portfolio, the value today of receiving one share at T (a prepaid forward) is S0eqT, since dividends accruing over [0,T] are forfeited by not holding the share directly:

V=S0eqT+P

The step candidates miss is exactly this last one: the stock leg is worth S0eqT, not S0. Discounting the share at the dividend yield is what keeps the two answers consistent.

Why the two prices must agree

Equating the two expressions for V:

KerT+C=S0eqT+P

This is precisely put-call parity with a continuous dividend yield. It is not an extra assumption — it is forced by no-arbitrage (the law of one price), because both portfolios have identical payoffs at T and hence identical value at every earlier time. So the two replications give the same V automatically.

Numbers

Discount factors:

erT=e0.05=0.951229,eqT=e0.02=0.980199

Contract price via bond-plus-call:

V=100·0.951229+8=95.1229+8=103.1229

Put price via parity, P=CS0eqT+KerT:

P=8100·0.980199+100·0.951229=898.0199+95.1229=5.1030

Consistency check with the stock-plus-put portfolio:

S0eqT+P=98.0199+5.1030=103.1229

Answer: the max(ST,K) contract is worth $103.12, and the European put struck at K is worth $5.10.

Closing note. The tempting wrong answer for the put uses S0 in place of S0eqT, giving P=8100+95.1229=$3.12 — an error of about a dollar here, and unbounded as q or T grows. Whenever the underlying pays a yield, replace the spot in every parity/replication relation by the prepaid forward S0eqT.

Statistics in machine learning

Shrinking the sample mean toward zero

easy · The bias-variance decomposition

Let X1,,Xn be i.i.d. N(μ,σ2) with σ2>0 known and μ unknown. Write X¯n=1ni=1nXi. For a fixed constant λ[0,1] consider the shrinkage estimator μ^λ=λX¯n. Measure risk by mean squared error, MSE(λ)=𝔼[(μ^λμ)2].

  1. Write out the bias-variance decomposition of MSE(λ) as an explicit function of λ,μ,σ2,n.

  2. Minimize MSE(λ) over λ. Give the minimizer λ\* and the resulting risk MSE(λ\*) in closed form.

  3. Compare MSE(λ\*) with the risk of the unbiased estimator X¯n (i.e. λ=1), and state the practical obstruction to actually using λ\*.

Solution

Setup

For any estimator T of μ, the identity 𝔼[(Tμ)2]=(𝔼[T]μ)2+Var(T) holds by adding and subtracting 𝔼[T] and noting the cross term 𝔼[(T𝔼T)(𝔼Tμ)] vanishes because 𝔼Tμ is constant and 𝔼[T𝔼T]=0. This is the whole engine of the problem.

Here X¯n has 𝔼[X¯n]=μ and Var(X¯n)=σ2/n, so for μ^λ=λX¯n: 𝔼[μ^λ]=λμ,Var(μ^λ)=λ2σ2n.

Part 1: the decomposition

The bias is 𝔼[μ^λ]μ=(λ1)μ, so MSE(λ)=(λ1)2μ2bias2+λ2σ2nvariance.

Shrinking (λ<1) trades increased squared bias for decreased variance.

Part 2: optimal shrinkage

MSE(λ) is a strictly convex quadratic in λ. Differentiate and set to zero: ddλMSE(λ)=2(λ1)μ2+2λσ2n=0.

Solving, λ\*=μ2μ2+σ2/n=nμ2nμ2+σ2(0,1).

To evaluate the minimized risk, use λ\*1=σ2/nμ2+σ2/n. Then (λ\*1)2μ2=(σ2/n)2μ2(μ2+σ2/n)2,(λ\*)2σ2n=μ4σ2/n(μ2+σ2/n)2.

Adding, the numerator factors as μ2(σ2/n)(σ2/n+μ2), cancelling one power of the denominator: MSE(λ\*)=μ2σ2/nμ2+σ2/n=μ2σ2nμ2+σ2.

A cleaner way to see the same value: MSE(λ\*)=(σ2/n)λ\*, since at the optimum (λ\*1)μ2=λ\*σ2/n makes bias2=(1λ\*)λ\*σ2/n and variance=(λ\*)2σ2/n, summing to λ\*σ2/n.

Part 3: comparison and the catch

For the unbiased estimator λ=1: MSE(1)=σ2/n. Since λ\*<1, MSE(λ\*)=λ\*σ2n<σ2n=MSE(1) strictly, for every μ0. So the unbiased estimator is inadmissible under squared error in this one-parameter family: a biased estimator dominates it.

The obstruction: λ\* depends on the unknown μ (through μ2), so it is not an estimator one can compute. This is exactly the tension that James-Stein shrinkage resolves in dimension 3 by estimating the shrinkage factor from the data, achieving uniform dominance without knowing μ.

Answers. 1. MSE(λ)=(λ1)2μ2+λ2σ2/n. 2. λ\*=nμ2nμ2+σ2, with MSE(λ\*)=μ2σ2nμ2+σ2. 3. MSE(λ\*)=λ\*σ2/n<σ2/n=MSE(1) for all μ0; but λ\* is not usable since it depends on the unknown μ.


Two new problems every morning at 8am · every day so far