Trading Psychology
Chapter: 4.8 Trading Psychology Level: 5 — Mastery (cross-domain: probability, coding, systems design & proof) Time limit: 90 minutes Total marks: 60
Instructions: Answer all three questions. Show all derivations. Where code is required, write clean pseudo-Python. Justify every modelling assumption. Use / for mathematics.
Question 1 — Discipline, Losing Streaks & Risk of Ruin (24 marks)
A disciplined trader follows a written plan (4.8.6) with a fixed edge. Each trade independently either wins with probability (net gain times risked amount) or loses with probability (loss of unit risked). The trader risks a fixed fraction of current bankroll per trade.
(a) For a discrete fixed-fraction model, derive the expected log-growth per trade Show that the growth-optimal fraction (Kelly) is Explain, in terms of process over outcome (4.8.10) and fear/greed (4.8.2), why a disciplined trader typically deploys a fraction rather than full Kelly. (8 marks)
(b) Take , . Compute , the full-Kelly growth rate , and the half-Kelly growth rate . Comment on the risk trade-off. (8 marks)
(c) A losing streak (4.8.11) of length occurs with probability for consecutive independent losses. With , compute the probability of a run of at least consecutive losses starting on a given trade, and the expected number of trades between the start of such runs. Explain how this statistic should be pre-committed in the trading plan to prevent tilt (4.8.5) and revenge trading (4.8.4). (8 marks)
Question 2 — Backtesting, Overfitting & the FOMO Filter (20 marks)
(a) A trader backtests (4.8.8) independent random strategies with no real edge, each producing an annual Sharpe ratio that is approximately under the null. Show that the expected maximum Sharpe of the best of strategies grows like Compute this for and explain why the "best backtest" is a FOMO trap (4.8.3). (8 marks)
(b) Write pseudo-code for a walk-forward backtest that (i) splits data into in-sample/out-of-sample folds, (ii) selects parameters in-sample, (iii) records out-of-sample performance, and (iv) flags a strategy as overfit if in-sample Sharpe exceeds out-of-sample Sharpe by more than a threshold . Justify each design choice against a discipline/consistency criterion (4.8.1). (8 marks)
(c) Explain quantitatively why paper/demo trading (4.8.9) with realistic slippage is a necessary but not sufficient validation step before live deployment. Give one psychological variable that paper trading fails to test. (4 marks)
Question 3 — Build a Journaling & Emotional-Control System (16 marks)
Design a quantitative trade-journal + pre-market-routine system (4.8.7, 4.8.12) that enforces process discipline.
(a) Define an Emotional-Discipline Score as a weighted function of measurable per-trade flags: plan-adherence , position-size-within-limit , no-revenge-entry , journaled-within-1h . Propose weights summing to , justify the ordering of weights, and give the formula for the rolling 20-trade mean . State the threshold below which the trader must halt (tilt lock-out). (8 marks)
(b) Prove that if a trader's decisions maximise expected process score independently of outcome, then over many trades the realised P&L converges (in probability) to the strategy's true expectation per trade, invoking the Weak Law of Large Numbers. State the assumptions clearly. (8 marks)
Answer keyMark scheme & solutions
Question 1
(a) [8 marks]
- Bankroll after trades: . Taking log and dividing by , the per-trade expected log return is the expectation of the log multiplier: . (3)
- Maximise: . (2)
- Cross-multiply: . Collect: . Hence . (2)
- Half-Kelly rationale: variance of log-growth scales roughly with while growth is near-flat around the optimum (concave, zero first derivative at ); half-Kelly captures ~75% of growth with ~half the volatility → reduces drawdown-induced fear/greed deviations and keeps the trader in the process (4.8.10). (1)
(b) [8 marks] With :
- . (2)
- . (3)
- Half-Kelly : . (2)
- Comment: half-Kelly gives ≈75% of the growth rate () with substantially lower drawdown variance — favourable risk trade-off. (1)
(c) [8 marks] .
- . (3)
- Expected trades between starts of such runs trades. (3)
- Plan use: because a 5-loss streak is expected roughly every ~54 trades, it is a normal statistical event, not a signal of broken edge. Pre-committing a max-consecutive-loss stop and a cooling-off rule prevents interpreting variance as failure → blocks tilt (4.8.5) and revenge trading (4.8.4). (2)
Question 2
(a) [8 marks]
- For i.i.d. standard normals, the maximum concentrates near the level where , i.e. . (3)
- Using tail bound , set . (3)
- : . So the best of 1000 no-edge strategies shows Sharpe ≈3.7 by chance. (1)
- FOMO trap (4.8.3): chasing the top backtest = selecting noise; disciplined process rejects the strategy unless it survives multiple-testing correction/out-of-sample. (1)
(b) [8 marks] Sample pseudo-code (mark for correct structure):
def walk_forward(data, param_grid, folds, tau):
flags = []
for train, test in split_folds(data, folds): # chronological, no leakage
best_p = argmax(param_grid, key=lambda p: sharpe(backtest(train, p)))
is_sharpe = sharpe(backtest(train, best_p))
oos_sharpe = sharpe(backtest(test, best_p))
flags.append(is_sharpe - oos_sharpe > tau) # overfit flag
overfit = mean(flags) > 0.5
return overfit- Chronological split (no lookahead) — enforces realism/consistency (4.8.1). (2)
- Params chosen in-sample only, scored out-of-sample — separates fitting from validation. (2)
- threshold operationalises "degradation" objectively → removes discretionary/emotional override. (2)
- Majority-of-folds decision → robust to single-fold luck. (2)
(c) [4 marks]
- Paper trading validates mechanics/slippage/logic (necessary) but P&L is not real, so it does not test loss-aversion, fear, greed and tilt under real financial/emotional stress (not sufficient). Named psychological variable: emotional response to real capital loss / fear of realising losses. (4)
Question 3
(a) [8 marks]
- Proposed weights (ordering justified by severity of rule-breach): risk control first. (position-size breach can cause ruin), (revenge entries are highest-EV-destroying), (plan adherence), (journaling supports learning but is lowest immediate risk). Sum . (3)
- Per-trade score . (2)
- Rolling mean . (1)
- Lock-out threshold: halt trading if (i.e. discipline slipping) until a review is logged — enforces cool-down. Any justified threshold in accepted. (2)
(b) [8 marks]
- Assumptions: per-trade P&L are i.i.d. with finite mean and finite variance ; decisions depend only on the process (entry rules), so outcomes don't alter the rule set → i.i.d. preserved. (3)
- Sample mean . WLLN: for any , as . (3)
- (Chebyshev proof) . (2)
- Interpretation: process-focused discipline keeps the distribution stationary; realised P&L then converges to the true edge, which is why traders must judge process not short-run outcome (4.8.10). Emotional deviation breaks the i.i.d. assumption and invalidates the guarantee.
[
{"claim":"Kelly fraction f* = 0.10 for p=0.55,R=1","code":"p=Rational(55,100);q=1-p;R=1;fstar=(p*R-q)/R;result=(fstar==Rational(1,10))"},
{"claim":"Full-Kelly growth rate ~0.005008","code":"import sympy as sp;p=sp.Rational(55,100);q=sp.Rational(45,100);f=sp.Rational(1,10);g=p*sp.log(1+f)+q*sp.log(1-f);result=abs(float(g)-0.005008)<1e-5"},
{"claim":"Half-Kelly growth ~0.003753 and about 75% of full","code":"import sympy as sp;p=sp.Rational(55,100);q=sp.Rational(45,100);gf=p*sp.log(sp.Rational(105,100))+q*sp.log(sp.Rational(95,100));gk=p*sp.log(sp.Rational(11,10))+q*sp.log(sp.Rational(9,10));result=abs(float(gf)-0.003753)<1e-5 and abs(float(gf/gk)-0.75)<0.02"},
{"claim":"P(>=5 losses)=0.45**5 ~0.01845 and expected gap ~54.2","code":"q=0.45;p5=q**5;gap=1/p5;result=abs(p5-0.0184528)<1e-6 and abs(gap-54.19)<0.5"},
{"claim":"sqrt(2 ln 1000) ~ 3.717","code":"import sympy as sp;val=sp.sqrt(2*sp.log(1000));result=abs(float(val)-3.717)<1e-3"}
]