Level 5 — MasteryVolume, Fibonacci & Elliott Wave

Volume, Fibonacci & Elliott Wave

90 minutes60 marksprintable — key stays hidden on paper

Level 5 — Mastery (cross-domain: math + quant + coding) Time limit: 90 minutes Total marks: 60

Instructions: Show all working. Where code is requested, pseudocode or Python is acceptable but must be logically complete. Use ...... for math.


Question 1 — Fibonacci Geometry, Confluence & a Proof (24 marks)

A stock rallies in a clean impulse from a swing low L=100L = 100 to a swing high H=160H = 160, then begins a corrective pullback.

(a) Compute the price levels of the standard Fibonacci retracements 23.6%23.6\%, 38.2%38.2\%, 50%50\%, 61.8%61.8\% and 78.6%78.6\% of the LHL\to H move. Give a general formula P(r)P(r) for the retracement level at ratio rr. (5)

(b) The golden ratio φ\varphi satisfies φ2=φ+1\varphi^2 = \varphi + 1. Prove algebraically that the retracement ratio 0.618φ1=1/φ0.618 \approx \varphi - 1 = 1/\varphi and the extension ratio 1.618=φ1.618 = \varphi, and hence show that 0.618×1.618=0.618+0.3820.618 \times 1.618 = 0.618 + 0.382... more precisely prove the identity 1φφ=1\frac{1}{\varphi}\cdot\varphi = 1 and that 11φ=1φ2=0.3821 - \frac{1}{\varphi} = \frac{1}{\varphi^2} = 0.382\ldots Derive φ\varphi exactly from φ2=φ+1\varphi^2=\varphi+1. (6)

(c) After the correction ends at the 61.8%61.8\% retracement, the next impulse projects a Fibonacci extension. Using the ABC labelling where A=L=100A=L=100, B=H=160B=H=160, and CC is the 61.8%61.8\% retracement low, compute the 1.2721.272 and 1.6181.618 external extension targets measured as C+k(BA)C + k\,(B-A). (5)

(d) A horizontal support/resistance zone sits at 118118121121. Identify which Fibonacci retracement level(s) fall inside this zone and explain, in the language of confluence, why a trader treats an overlap of a Fib level and prior S/R as a higher-probability reaction zone than either alone. State one quantitative way to score confluence strength. (8)


Question 2 — Elliott Wave Structure, Rules & Volume Confirmation (22 marks)

(a) State the three inviolable rules of a 5-wave impulse (waves 1–5) and the two common guidelines (alternation, and equality/extension). Explain why breaking any one rule invalidates the count. (6)

(b) Consider the following price sequence forming a suspected impulse (prices at wave termini):

W0=50, W1=62, W2=56, W3=?, W4=?, W5=90W_0=50,\ W_1=62,\ W_2=56,\ W_3=? ,\ W_4=? ,\ W_5=90

Wave 3 travels 1.618×1.618\times the length of wave 1; wave 4 retraces 38.2%38.2\% of wave 3. Compute W3W_3 and W4W_4. Then verify all three impulse rules hold for your computed count. (9)

(c) Explain how volume should behave across a healthy impulse (waves 1–5) and across the corrective (A–B–C) phase, referencing accumulation/distribution and volume spread analysis. What volume signature would make you distrust a wave-3 breakout? (7)


Question 3 — Build an Algorithm: Automated Volume-Confirmed Fib Reaction Detector (14 marks)

You are given arrays high[], low[], close[], volume[] indexed by bar.

(a) Write pseudocode for a function fib_reaction_signal(swingLow, swingHigh, bars) that: (i) computes the 5 standard retracement levels, (ii) detects when close enters a tolerance band (±0.3%\pm 0.3\%) around any level, and (iii) confirms a bullish reaction only if that bar's volume exceeds the 20-bar average volume by 50%\geq 50\% AND the bar closes in the upper third of its range (a VSA-style demand bar). Return the level touched and a boolean confirmation. (9)

(b) State the time complexity of your function per bar and explain one edge case (e.g., an uptrend vs downtrend swing) your sign conventions must handle. (5)


Answer keyMark scheme & solutions

Question 1

(a) Move size =HL=60= H-L = 60. Retracement level formula (measuring down from the high): P(r)=Hr(HL)=16060r.P(r) = H - r\,(H-L) = 160 - 60r.

rr P(r)P(r)
0.236 16014.16=145.84160-14.16 = 145.84
0.382 16022.92=137.08160-22.92 = 137.08
0.500 16030=130.00160-30 = 130.00
0.618 16037.08=122.92160-37.08 = 122.92
0.786 16047.16=112.84160-47.16 = 112.84

Marks: formula (1), each correct level (0.8 each ≈ 4). (5)

(b) Solve φ2=φ+1φ2φ1=0\varphi^2=\varphi+1 \Rightarrow \varphi^2-\varphi-1=0. φ=1+52=1.6180339\varphi = \frac{1+\sqrt5}{2} = 1.6180339\ldots (taking positive root). (2) From φ2=φ+1\varphi^2=\varphi+1 divide by φ\varphi: φ=1+1φ1φ=φ1=0.6180\varphi = 1 + \tfrac1\varphi \Rightarrow \tfrac1\varphi = \varphi-1 = 0.6180\ldots — this proves 0.618=1/φ=φ10.618=1/\varphi=\varphi-1. (2) Also 11φ=1(φ1)=2φ=21.618=0.3821-\tfrac1\varphi = 1-(\varphi-1)=2-\varphi = 2-1.618=0.382, and 1φ2=(1φ)2=0.6182=0.382\tfrac1{\varphi^2}=(\tfrac1\varphi)^2=0.618^2=0.382, so 11/φ=1/φ2=0.3821-1/\varphi=1/\varphi^2=0.382. (2) Trivially 1φφ=1\tfrac1\varphi\cdot\varphi=1. (6)

(c) C=P(0.618)=122.92C = P(0.618) = 122.92. Leg BA=60B-A = 60.

  • 1.2721.272 target: C+1.272×60=122.92+76.32=199.24C + 1.272\times60 = 122.92 + 76.32 = 199.24.
  • 1.6181.618 target: C+1.618×60=122.92+97.08=220.00C + 1.618\times60 = 122.92 + 97.08 = 220.00.

Marks: CC (1), each target (2). (5)

(d) The 61.8%61.8\% level =122.92=122.92 lies just above the 118118121121 zone; the closest confluence is the 50%50\% level 130130 (outside) — so within 118118121121 none of the exact standard levels fall inside, but 61.8%61.8\% (122.92) is nearest, ~2 points above. A careful answer notes the zone slightly undercuts 61.8%61.8\%; a reaction near 121121123123 combines prior S/R (118–121) with the 61.8%61.8\% Fib, giving confluence. (award marks for reasoning even if noting the near-miss.)

Confluence argument: independent methods (structural S/R memory + Fibonacci proportion) predicting the same price zone means more market participants place orders there, so liquidity and probability of a reaction increase — a coincidence of signals raises posterior probability. Quantitative scoring: e.g. confluence score = number of independent levels within a fixed price window, or an inverse-distance weighted sum iwiexp(di2/2σ2)\sum_i w_i \exp(-d_i^2/2\sigma^2) where did_i is distance of each level from the test price.

Marks: identify nearest level & note zone position (3); confluence rationale (3); quantitative scoring method (2). (8)

Question 2

(a) Three inviolable rules (2 each):

  1. Wave 2 never retraces more than 100% of wave 1 (cannot go below wave 1 start).
  2. Wave 3 is never the shortest of the three impulse waves (1,3,5).
  3. Wave 4 does not overlap the price territory of wave 1 (in a standard impulse; end of 4 must not enter wave-1 range).

Guidelines: alternation (if wave 2 is sharp, wave 4 is sideways, and vice-versa); equality/extension (typically one impulse wave extends—often wave 3—and the other two tend toward equality). Breaking a rule means the labelling is structurally impossible, so the count must be redrawn. (6)

(b) Wave 1 length =6250=12= 62-50 = 12. Wave 3 length =1.618×12=19.416=1.618\times12 = 19.416, starting from W2=56W_2=56: W3=56+19.416=75.416.W_3 = 56 + 19.416 = 75.416. Wave 4 retraces 38.2%38.2\% of wave 3 length: 0.382×19.416=7.4170.382\times19.416 = 7.417: W4=75.4167.417=67.99968.00.W_4 = 75.416 - 7.417 = 67.999 \approx 68.00.

Rule check:

  1. Wave 2 = 56 > 50 (start), retrace =(6256)/12=50%<100%= (62-56)/12=50\%<100\% ✓.
  2. Lengths: W1=12, W3=19.416, W5 =9068=22=90-68=22. Wave 3 (19.42) is not the shortest ✓ (shortest is W1=12).
  3. Wave 4 low =68.00>=68.00 > wave 1 high =62=62: no overlap ✓.

All three rules satisfied → valid impulse.

Marks: W3W_3 (2), W4W_4 (2), each rule check (1.5×3 ≈ 5). (9)

(c) Healthy impulse volume: highest on wave 3 (the strongest, most participated move — driven by accumulation completing and trend recognition); wave 1 moderate, wave 5 often on lower volume / divergence (fewer buyers, distribution begins). Corrections A–B–C run on lighter volume than impulses; wave C may spike as capitulation. Accumulation shows rising volume on up-bars with narrowing spreads at lows; distribution shows rising volume on up-bars that fail to make progress (wide spread, close off highs) near tops. Distrust a wave-3 breakout if it occurs on declining or below-average volume, or a wide-range up-bar closing in its lower third with high volume (no demand / supply overwhelming) — a VSA sign of weakness signalling a false breakout.

Marks: impulse volume pattern (3), corrective (2), distrust signature (2). (7)

Question 3

(a) Pseudocode:

function fib_reaction_signal(swingLow, swingHigh, bars):
    move = swingHigh - swingLow
    dir  = sign(move)                 # +1 uptrend swing, -1 downtrend
    ratios = [0.236,0.382,0.5,0.618,0.786]
    levels = [swingHigh - r*move for r in ratios]   # works for both dirs
    tol = 0.003
    for b in bars:
        avgVol = mean(volume[b-20 .. b-1])
        for (r, L) in zip(ratios, levels):
            if abs(bars[b].close - L) <= tol * L:
                rng = bars[b].high - bars[b].low
                if rng == 0: continue
                closePos = (bars[b].close - bars[b].low) / rng
                volOK  = bars[b].volume >= 1.5 * avgVol
                bullVSA = closePos >= 2/3          # upper third
                confirmed = volOK and bullVSA
                return (L, confirmed)
    return (None, False)

Marks: levels computation (2), tolerance band detection (2), volume ≥150% avg (2), upper-third close test (2), return structure (1). (9)

(b) Complexity: for each bar the 20-bar average is O(20)=O(1)O(20)=O(1) amortised (or maintain a running window), and the inner loop over 5 ratios is O(1)O(1), so O(1)O(1) per bar, O(n)O(n) overall for nn bars. Edge case: swing direction — using swingHigh - r*move with signed move keeps the level formula valid whether the impulse is up (swingHigh>swingLow, retracements below high) or down (swingHigh<swingLow, "retracements" above the low), so dir prevents inverted level ordering; also guard rng=0rng=0 (doji/no-range bar) to avoid division by zero.

Marks: complexity (2), edge-case explanation (3). (5)

[
  {"claim":"61.8% retracement of 100->160 is 122.92","code":"H=160;L=100;lvl=H-0.618*(H-L);result=abs(lvl-122.92)<1e-9"},
  {"claim":"1.618 extension target from C=122.92 is 220.00","code":"C=160-0.618*60;t=C+1.618*60;result=abs(t-220.0)<1e-9"},
  {"claim":"phi solves x^2=x+1 giving 1.618...","code":"from sympy import sqrt,Rational; phi=(1+sqrt(5))/2; result=simplify(phi**2-phi-1)==0"},
  {"claim":"1-1/phi = 1/phi^2 = 0.382","code":"from sympy import sqrt; phi=(1+sqrt(5))/2; result=simplify((1-1/phi)-(1/phi**2))==0 and abs(float(1-1/phi)-0.381966)<1e-4"},
  {"claim":"Wave3=75.416, Wave4=68.0, W3 not shortest, no overlap","code":"W2=56;len1=12;W3=W2+1.618*len1;W4=W3-0.382*(1.618*len1);W5=90;lenW3=1.618*len1;lenW5=W5-W4;ok=(W4>62) and (lenW3>len1) and not(lenW3<len1 and lenW3<lenW5);result=abs(W3-75.416)<1e-3 and abs(W4-68.0)<1e-2 and ok"}
]