Moving Averages and Bollinger Bands Flashcards
Filtering Time Series Types
Low-pass filter - removes short-term fluctuations, but leaves the trend.
High-pass filter - removes the trend but keeps the fluctuations.
Causal Filters
A filter is:
* causal if its output depends only on past and present inputs.
* non-causal if its output also depends on future inputs.
Moving Averages (Rolling Average/Mean)
Type of digital low-pass filter.
Types of Moving Averages
Three types of moving averages:
- simple, where weights are equal.
- weighted, where weights form an arithmetic progression.
- exponential, weights form a geometric progression.
Simple v Exponential
- EMA responds more quickly to prices.
- EMA takes into account all past data; SMA takes into account only n most recent data points.
- EMA only needs the most recent EMA value to be kept; SMA requires all n most recent data points to be kept.
Bollinger Bands
A standard technical analysis indicator built with a moving average and standard deviation. The bands define “high” and “low” price levels on a continual, relative basis.
Mean Reversion with Bollinger Bands
A “mean-reversion” trading strategy uses Bollinger Bands to:
* buys when they suggest the market “oversold”;
* sells when they suggest the market “overbought”.
Overbought/Oversold Strategy
- Long when price is below lower band line
- Short when price is above upper band line
Attempts to trade corrections when the market has “overshot”.
Simple Moving Average Formula
sum(prices) / n
n is the number of periods.
Weighted Moving Average Formula
sum(price x weight) / sum(weights)
Exponential Moving Average Formula
EMA_t = smoothingFactor x price + (1 - smoothingFactor) x EMA_(t-1)