What to Trade
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 where is the round-trip spread cost fraction, is order size as a fraction of average daily volume, and is an impact coefficient. If for both A and B, compute for each and decide which is tradeable. (6)
(c) Prove that, holding all else equal, an instrument with lower but lower spread cost can still be preferable on a risk-adjusted basis by deriving and comparing the metric for A and Nifty Fut (assume Nifty spread cost fraction from the table, , 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 %):
(a) Compute the Pearson correlation coefficient from first principles (means, covariance, standard deviations). Show all intermediate sums. (8)
(b) Explain, using your , 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 versus the naive assuming . (6)
(c) Define relative strength (RS) of a stock versus its sector index as , normalised to 100 at . 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 crore (liquidity), (ii) relative strength rank in top 20% of universe, and (iii) pairwise correlation with already-selected names . 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 (pay half-spread on entry, half on exit; conservatively use full spread each way ⇒ 2×spread). [method 1]
- A: [1]
- B: [1]
- A is far more liquid: 0.02% vs 0.80%, a factor of 40× cheaper to trade. [1]
(b) Order size fraction : value ₹10,00,000.
- A: shares ; . Impact . [1] . [2]
- B: shares ; . Impact . [1] . [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: . [1]
- . [1]
- . [1]
- . [1]
- Since , Nifty is preferred on a risk-adjusted basis despite similar gross edge — its lower and near-zero cost dominate. [2] Proof: with near-equal, , and ⇒ .
(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:
- . [1]
- . [1]
Deviations : ; : .
- Covariance sum . [2]
- . [1]
- . [1]
- . [2]
(b) ⇒ 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 : , ; . [1]
- . [1.5]
- Naive (): . [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 . [1]
- Margin . [1]
- Leverage . [1]
- +2% price move ⇒ P&L . Return on margin . [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 per pip. [2]
- 10-pip stop risk per lot . [1]
- Lots for ₹5,000 budget 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 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)"}
]