Level 5 — MasteryWhat to Trade

What to Trade

90 minutes60 marksprintable — key stays hidden on paper

Chapter: 4.2 What to Trade Difficulty: Level 5 — Mastery (cross-domain: statistics + finance math + coding + proof) Time Limit: 90 minutes Total Marks: 60

Instructions: Answer all three questions. Show full working. Use ...... notation for mathematics. Code answers may be written in Python (pandas/numpy assumed available). Marks are indicated per part.


Question 1 — Liquidity, Instrument Choice & Screening (20 marks)

A trader is deciding what to trade between a liquid large-cap stock (A), an illiquid mid-cap stock (B), and the Nifty index via futures.

Given daily data:

Instrument Avg. Daily Volume (shares/lots) Avg. Bid-Ask Spread Price Daily σ (returns)
A (stock) 4,200,000 ₹0.05 ₹500 1.2%
B (stock) 90,000 ₹1.20 ₹300 2.6%
Nifty Fut 260,000 (lots) 0.5 pts 22,000 0.9%

(a) Define the round-trip transaction cost as a fraction of price for each of A and B using only the spread. Compute both and state which is more liquid on this metric. (4)

(b) A trader must enter a position worth ₹10,00,000 and expects to hold intraday. Define a liquidity-adjusted expected edge as Enet=EgrosscspreadλQADVE_{net} = E_{gross} - c_{spread} - \lambda\cdot \frac{Q}{ADV} where cspreadc_{spread} is the round-trip spread cost fraction, Q/ADVQ/ADV is order size as a fraction of average daily volume, and λ=0.15\lambda = 0.15 is an impact coefficient. If Egross=0.9%E_{gross}=0.9\% for both A and B, compute EnetE_{net} for each and decide which is tradeable. (6)

(c) Prove that, holding all else equal, an instrument with lower σ\sigma but lower spread cost can still be preferable on a risk-adjusted basis by deriving and comparing the metric R=Enet/σR = E_{net}/\sigma for A and Nifty Fut (assume Nifty spread cost fraction from the table, Egross=0.9%E_{gross}=0.9\%, and negligible impact term). (6)

(d) State two structural reasons (beyond the numbers) why the Nifty index may be preferred over a single illiquid stock for a systematic strategy. (4)


Question 2 — Correlation, Relative Strength & Watchlist Construction (22 marks)

A trader builds a watchlist and must avoid over-concentration by analysing correlation.

Two instruments have the following 5-day return series (in %):

X=[1.0, 0.5, 2.0, 0.5, 1.0],Y=[0.8, 0.2, 1.6, 0.6, 0.7]X = [1.0,\ -0.5,\ 2.0,\ 0.5,\ 1.0], \qquad Y = [0.8,\ -0.2,\ 1.6,\ 0.6,\ 0.7]

(a) Compute the Pearson correlation coefficient ρXY\rho_{XY} from first principles (means, covariance, standard deviations). Show all intermediate sums. (8)

(b) Explain, using your ρ\rho, why holding both X and Y in a watchlist for independent trade signals is problematic, and quantify the diversification benefit by computing the variance of an equal-weight portfolio σP2=14(σX2+σY2+2ρσXσY)\sigma_P^2 = \tfrac14(\sigma_X^2 + \sigma_Y^2 + 2\rho\sigma_X\sigma_Y) versus the naive 14(σX2+σY2)\tfrac14(\sigma_X^2+\sigma_Y^2) assuming ρ=0\rho=0. (6)

(c) Define relative strength (RS) of a stock versus its sector index as RSt=Ptstock/PtindexRS_t = P^{stock}_t / P^{index}_t, normalised to 100 at t=0t=0. Write a Python function relative_strength(stock_prices, index_prices) that returns the RS series, and state the rule that flags a sector leader. (8)


Question 3 — Cross-Domain: Commodity/Currency Contract Math & Screener Design (18 marks)

(a) A crude oil futures contract has lot size 100 barrels, quoted at ₹6,200/barrel. Margin is 8%. Compute the notional value, the margin required, and the leverage ratio. If price moves +2%, compute the return on margin. Comment on why this makes commodities capital-efficient but risky. (6)

(b) For a currency pair USD/INR trading at 83.20 with a lot size of $1,000, compute the rupee value of a 1 pip (0.0025) move per lot, and the number of lots needed so that a 10-pip stop equals a ₹5,000 risk budget. (6)

(c) Design (in pseudocode or Python) a stock screener that outputs a ranked trade watchlist. It must filter on: (i) average daily value traded >50> ₹50 crore (liquidity), (ii) relative strength rank in top 20% of universe, and (iii) pairwise correlation with already-selected names <0.7< 0.7. Write the core logic and explain the ordering of the filters for efficiency. (6)

Answer keyMark scheme & solutions

Question 1

(a) Round-trip spread cost fraction =2×spreadprice= \dfrac{2 \times \text{spread}}{\text{price}} (pay half-spread on entry, half on exit; conservatively use full spread each way ⇒ 2×spread). [method 1]

  • A: cA=2×0.05500=0.10500=0.0002=0.02%c_A = \dfrac{2\times 0.05}{500} = \dfrac{0.10}{500} = 0.0002 = 0.02\% [1]
  • B: cB=2×1.20300=2.40300=0.008=0.80%c_B = \dfrac{2\times 1.20}{300} = \dfrac{2.40}{300} = 0.008 = 0.80\% [1]
  • A is far more liquid: 0.02% vs 0.80%, a factor of 40× cheaper to trade. [1]

(b) Order size fraction Q/ADVQ/ADV: value ₹10,00,000.

  • A: shares =1,000,000/500=2000= 1{,}000{,}000/500 = 2000; Q/ADV=2000/4,200,000=4.76×104Q/ADV = 2000/4{,}200{,}000 = 4.76\times10^{-4}. Impact =0.15×4.76×104=7.14×105=0.00714%=0.15\times4.76\times10^{-4}=7.14\times10^{-5}=0.00714\%. [1] Enet,A=0.9%0.02%0.00714%0.873%E_{net,A} = 0.9\% - 0.02\% - 0.00714\% \approx 0.873\%. [2]
  • B: shares =1,000,000/300=3333=1{,}000{,}000/300 = 3333; Q/ADV=3333/90,000=0.0370Q/ADV = 3333/90{,}000 = 0.0370. Impact =0.15×0.0370=0.00556=0.556%=0.15\times0.0370 = 0.00556 = 0.556\%. [1] Enet,B=0.9%0.80%0.556%=0.456%E_{net,B} = 0.9\% - 0.80\% - 0.556\% = -0.456\%. [2]
  • Decision: A tradeable (+0.873%); B has negative net edge — spread + impact destroy the edge. Trade A. [1] (Illiquid stock B eaten alive by costs — core lesson of 4.2.2.)

(c) Nifty spread cost fraction: cN=2×0.522000=122000=4.55×105=0.00455%c_N = \dfrac{2\times 0.5}{22000} = \dfrac{1}{22000} = 4.55\times10^{-5} = 0.00455\%. [1]

  • Enet,N0.9%0.00455%0.8955%E_{net,N} \approx 0.9\% - 0.00455\% \approx 0.8955\%. [1]
  • RA=Enet,A/σA=0.873/1.2=0.7275R_A = E_{net,A}/\sigma_A = 0.873/1.2 = 0.7275. [1]
  • RN=Enet,N/σN=0.8955/0.9=0.9950R_N = E_{net,N}/\sigma_N = 0.8955/0.9 = 0.9950. [1]
  • Since RN(0.995)>RA(0.728)R_N (0.995) > R_A (0.728), Nifty is preferred on a risk-adjusted basis despite similar gross edge — its lower σ\sigma and near-zero cost dominate. [2] Proof: with EnetE_{net} near-equal, R1/σR\propto 1/\sigma, and σN<σA\sigma_N<\sigma_ARN>RAR_N>R_A.

(d) Any two: [2 each]

  • Index cannot go to zero / is not subject to single-firm event risk (fraud, delisting) — diversified basket.
  • Deeper, more consistent liquidity and tighter spreads across all market conditions.
  • No single-stock news gaps; cleaner technical/statistical behaviour for systematic models.
  • (Also acceptable: high-leverage F&O access, no borrow constraints for shorting.)

Question 2

(a) Means:

  • Xˉ=(1.00.5+2.0+0.5+1.0)/5=4.0/5=0.8\bar X = (1.0-0.5+2.0+0.5+1.0)/5 = 4.0/5 = 0.8. [1]
  • Yˉ=(0.80.2+1.6+0.6+0.7)/5=3.5/5=0.7\bar Y = (0.8-0.2+1.6+0.6+0.7)/5 = 3.5/5 = 0.7. [1]

Deviations XXˉX-\bar X: [0.2,1.3,1.2,0.3,0.2][0.2, -1.3, 1.2, -0.3, 0.2]; YYˉY-\bar Y: [0.1,0.9,0.9,0.1,0.0][0.1, -0.9, 0.9, -0.1, 0.0].

  • Covariance sum (XXˉ)(YYˉ)=0.02+1.17+1.08+0.03+0=2.30\sum(X-\bar X)(Y-\bar Y) = 0.02 + 1.17 + 1.08 + 0.03 + 0 = 2.30. [2]
  • (XXˉ)2=0.04+1.69+1.44+0.09+0.04=3.30\sum(X-\bar X)^2 = 0.04+1.69+1.44+0.09+0.04 = 3.30. [1]
  • (YYˉ)2=0.01+0.81+0.81+0.01+0=1.64\sum(Y-\bar Y)^2 = 0.01+0.81+0.81+0.01+0 = 1.64. [1]
  • ρ=2.303.30×1.64=2.305.412=2.302.3264=0.9886\rho = \dfrac{2.30}{\sqrt{3.30\times1.64}} = \dfrac{2.30}{\sqrt{5.412}} = \dfrac{2.30}{2.3264} = 0.9886. [2]

(b) ρ0.99\rho\approx 0.99 ⇒ X and Y move almost identically; treating them as two independent signals doubles exposure to the same risk factor — false diversification. [2]

  • Actual portfolio variance uses population σ2\sigma^2: σX2=3.30/5=0.66\sigma_X^2 = 3.30/5 = 0.66, σY2=1.64/5=0.328\sigma_Y^2 = 1.64/5 = 0.328; σX=0.8124,σY=0.5727\sigma_X=0.8124,\sigma_Y=0.5727. [1]
  • σP2=14(0.66+0.328+2×0.9886×0.8124×0.5727)=14(0.66+0.328+0.9199)=14(1.9079)=0.4770\sigma_P^2 = \tfrac14(0.66 + 0.328 + 2\times0.9886\times0.8124\times0.5727) = \tfrac14(0.66+0.328+0.9199)=\tfrac14(1.9079)=0.4770. [1.5]
  • Naive (ρ=0\rho=0): 14(0.66+0.328)=14(0.988)=0.2470\tfrac14(0.66+0.328)=\tfrac14(0.988)=0.2470. [1]
  • The real variance (0.477) is nearly double the assumed-diversified (0.247) ⇒ almost no diversification benefit; keep only one on the watchlist. [0.5]

(c)

def relative_strength(stock_prices, index_prices):
    import numpy as np
    s = np.asarray(stock_prices, dtype=float)
    i = np.asarray(index_prices, dtype=float)
    ratio = s / i
    return 100.0 * ratio / ratio[0]   # normalised to 100 at t=0

[5 for correct ratio, normalisation, base-100]

  • Sector-leader rule: a stock is a leader if its RS series is rising (RS_t > RS_{t-k}) i.e. it outperforms the sector index — slope of RS > 0, or RS above its own moving average. Leaders are chosen for long trades, laggards avoided/shorted. [3]

Question 3

(a)

  • Notional =100×6200=6,20,000= 100 \times 6200 = ₹6{,}20{,}000. [1]
  • Margin =8%×620000=49,600= 8\% \times 620000 = ₹49{,}600. [1]
  • Leverage =620000/49600=12.5×= 620000/49600 = 12.5\times. [1]
  • +2% price move ⇒ P&L =0.02×620000=12,400= 0.02\times620000 = ₹12{,}400. Return on margin =12400/49600=25%= 12400/49600 = 25\%. [2]
  • Comment: 2% underlying move → 25% on capital = leverage amplifies both gain and loss ~12.5×; capital-efficient but a 2% adverse move wipes 25% of margin. [1]

(b)

  • 1 pip = 0.0025 INR per USD. Rupee value per lot =1000×0.0025=2.50= 1000 \times 0.0025 = ₹2.50 per pip. [2]
  • 10-pip stop risk per lot =10×2.50=25= 10 \times 2.50 = ₹25. [1]
  • Lots for ₹5,000 budget =5000/25=200= 5000 / 25 = 200 lots. [3]

(c)

def build_watchlist(universe):
    # Filter 1 (cheapest, most eliminative): liquidity
    liquid = [s for s in universe if s.avg_daily_value > 50e7]   # 50 cr
    # Filter 2: relative strength rank top 20%
    liquid.sort(key=lambda s: s.rs_rank, reverse=True)
    cutoff = int(0.20 * len(liquid))
    strong = liquid[:cutoff]
    # Filter 3: correlation de-duplication
    selected = []
    for s in strong:                      # already RS-ordered => best first
        if all(corr(s, k) < 0.7 for k in selected):
            selected.append(s)
    return selected
  • Ordering rationale: apply the cheapest, most eliminative filter first (liquidity is a simple threshold that removes most of the universe), then RS ranking (single sort), then the expensive O(n2)O(n^2) pairwise-correlation check on the small survivor set — minimising total computation. [correct logic 4, ordering explanation 2]
[
  {"claim":"Round-trip spread cost fractions for A and B",
   "code":"cA=2*0.05/500; cB=2*1.20/300; result=(abs(cA-0.0002)<1e-9) and (abs(cB-0.008)<1e-9)"},
  {"claim":"Net edge B is negative, A positive",
   "code":"EnetA=0.009-0.0002-0.15*(2000/4200000); EnetB=0.009-0.008-0.15*(3333.333333/90000); result=(EnetA>0) and (EnetB<0)"},
  {"claim":"Risk-adjusted R: Nifty beats stock A",
   "code":"EnetA=0.873; EnetN=0.8955; RA=EnetA/1.2; RN=EnetN/0.9; result=(RN>RA) and (abs(RA-0.7275)<1e-3) and (abs(RN-0.995)<1e-3)"},
  {"claim":"Pearson correlation of X,Y approx 0.9886",
   "code":"X=[1.0,-0.5,2.0,0.5,1.0]; Y=[0.8,-0.2,1.6,0.6,0.7]; mx=sum(X)/5; my=sum(Y)/5; cov=sum((a-mx)*(b-my) for a,b in zip(X,Y)); sx=sum((a-mx)**2 for a in X); sy=sum((b-my)**2 for b in Y); rho=cov/(sx*sy)**0.5; result=abs(rho-0.9886)<1e-3"},
  {"claim":"Crude leverage 12.5x and 25% return on margin for 2% move",
   "code":"notional=100*6200; margin=0.08*notional; lev=notional/margin; ret=0.02*notional/margin; result=(abs(lev-12.5)<1e-9) and (abs(ret-0.25)<1e-9)"},
  {"claim":"USDINR pip value and lots for 5000 budget",
   "code":"pip=1000*0.0025; stop=10*pip; lots=5000/stop; result=(abs(pip-2.5)<1e-9) and (abs(lots-200)<1e-9)"}
]