Lecture Three Technical Analysis II Andy Bower www.alchemetrics.org Advanced Chart Patterns Fibonacci Levels •Retracements •Clusters Elliott Wave Analysis •Impulse 5-waves •Corrective 3-Waves Indicators Moving Averages •Simple/Exponential/Weighted Oscillators •Momentum/CCI/RSI/MACD/Stochastics Fibonacci Levels Series •1, 1, 2, 3, 5, 8, 13 etc •Ratios 61.8%, 38.2%, 23.6% •Inverse 161.8% Retracements •Additional retracements 50%, 100% •23.6%, 38.2%, 50%, 61.8%, 100% Extensions •100%, 161.8% Fibonacci Retracements Examples Nasdaq 100 ETF Weekly 2005 Fibonacci Retracements Examples SPY S&P100 ETF Daily 2003-2004 Fibonacci Clusters Examples Broadcom 15min 2005 Elliott Wave Analysis Patterns •Impulse waves in direction of trend •Impulse waves have 5 steps •Correction waves against trend •Corrections have 3 steps Ratios •Retracement and extension follow fibonacci ratios Time •Multiple time frames Elliott Wave Analysis Patterns Impulse • W3 or 5 may “ extend” • W4 can’ t overlap w1 • Often, when w3 extends w1=w5 4 3 5 a b c 2 1 Corrections • Zig-zag • Flats • Triangles 162% Wave 3 Extension Example Nasdaq100 ETF Daily 2002-2005 3 1 2 4 Indicators Moving Averages Simple • Sum over period, divide by period • Smoothing • but.. Substantial lag Exponential • Weight each prior price point using: EMA% = 2/(n + 1) where n is the number of days • Faster response than Simple Moving Average (SMA) Uses • Crossover systems (poor in consolidating markets) • Support and Resistance trend lines Moving Average Trend Lines Long term trend using 178 period EMA Short term trend using 89 period SMA Indicators Oscillators Attempt to capture “ momentum”information from price action Oscillators vary between bounds • Upper bound=“ overbought” • Lower bound=“ oversold” Basic momentum: M=V0-Vn No upper/lower boundary Common Oscillators • Commodity Channel Index (CCI) • Relative Strength Index (RSI) • Stochastics (K%D) Relative Strength Index (RSI) RSI = 100-100/(1+RS) RS= Avg of n days’up closes Avg of n days’down closes • Varies between 0-100. • Overbought generally > 70 • Oversold generally < 30 • Often used to detect “ fading trend momentum” based on a divergence between RSI peaks/troughs compared with price action peaks/troughs RSI-Price Divergence Nasdaq 100 ETF Daily 2005 RSI RSI Smoothed Computer Pattern Matching Strategy • Isolate tradable patterns.. Then test Backtesting • Evaluation of a trading strategy using historical price data to measure performance. Metrics • Equity Curve • Profit Factor, Sharpe Ratio • Drawdown • Avg Trade % Backtesting Equity Curve Backtesting Period Returns Backtesting Performance Report Backtesting Optimization Strategies may have parameters •Optimize to maximize profitability •Need to be wary of “ curve fitting” Split data into segments •Backtest & Optimize on some segments •Then forward test on remaining segments Minimize number of variables Genetic Algorithms Parameter Optimization •Searching a large multi-dimensional space •Typically better at avoid local optima Use for Optimizing •Indicator based systems •Neural Network topology Backtesting •Curve fitting issues are very important Neural Networks Used to isolate “ unknown”patterns Backpropagation Neural Net Real Neurons Neural Networks Used to isolate “ unknown”patterns Inputs •Indicators/Other Networks Outputs •Profit/Sharpe Ratio/etc Network configuration •Optimize using Genetic Algorithms Backtesting •Curve Fitting issues are very important