Bollinger bands

back to index

description: type of statistical chart characterizing the prices and volatility of a financial instrument or commodity

17 results

Learn Algorithmic Trading
by Sebastien Donadio
Published 7 Nov 2019

Finally, the , which is the difference in the two series, captures (a) the time period when the trend is starting or reversion, and (b) the magnitude of lasting trends when values stay positive or negative after reversing signs. Bollinger bands Bollinger bands (BBANDS) also builds on top of moving averages, but incorporates recent price volatility that makes the indicator more adaptive to different market conditions. Let's now discuss this in greater detail. Bollinger bands is a well-known technical analysis indicator developed by John Bollinger. It computes a moving average of the prices (you can use the simple moving average or the exponential moving average or any other variant).

This band represents the expected volatility of the prices by treating the moving average of the price as the reference price. Now, when prices move outside of these bands, that can be interpreted as a breakout/trend signal or an overbought/sold mean reversion signal. Let's look at the equations to compute the upper Bollinger band, , and the lower Bollinger band, . Both depend, in the first instance, on the middle Bollinger band, , which is simply the simple moving average of the previous time periods( in this case, the last days ) denoted by. The upper and lower bands are then computed by adding/subtracting to , which is the product of standard deviation, , which we've seen before, and , which is a standard deviation factor of our choice.

Choice of IDE – Pycharm or Notebook Our first algorithmic trading (buy when the price is low, and sell when the price is high) Setting up your workspace PyCharm 101 Getting the data Preparing the data – signal Signal visualization Backtesting Summary Section 2: Trading Signal Generation and Strategies Deciphering the Markets with Technical Analysis Designing a trading strategy based on trend- and momentum-based indicators Support and resistance indicators Creating trading signals based on fundamental technical analysis Simple moving average Implementation of the simple moving average Exponential moving average Implementation of the exponential moving average Absolute price oscillator Implementation of the absolute price oscillator Moving average convergence divergence Implementation of the moving average convergence divergence Bollinger bands Implementation of Bollinger bands Relative strength indicator Implementation of the relative strength indicator Standard deviation Implementing standard derivatives Momentum Implementation of momentum Implementing advanced concepts, such as seasonality, in trading instruments Summary Predicting the Markets with Basic Machine Learning Understanding the terminology and notations Exploring our financial dataset Creating predictive models using linear regression methods Ordinary Least Squares Regularization and shrinkage – LASSO and Ridge regression Decision tree regression Creating predictive models using linear classification methods K-nearest neighbors Support vector machine Logistic regression Summary Section 3: Algorithmic Trading Strategies Classical Trading Strategies Driven by Human Intuition Creating a trading strategy based on momentum and trend following Examples of momentum strategies Python implementation Dual moving average Naive trading strategy Turtle strategy Creating a trading strategy that works for markets with reversion behavior Examples of reversion strategies Creating trading strategies that operate on linearly correlated groups of trading instruments Summary Sophisticated Algorithmic Strategies Creating a trading strategy that adjusts for trading instrument volatility Adjusting for trading instrument volatility in technical indicators Adjusting for trading instrument volatility in trading strategies Volatility adjusted mean reversion trading strategies Mean reversion strategy using the absolute price oscillator trading signal Mean reversion strategy that dynamically adjusts for changing volatility Trend-following strategy using absolute price oscillator trading signal Trend-following strategy that dynamically adjusts for changing volatility Creating a trading strategy for economic events Economic releases Economic release format Electronic economic release services Economic releases in trading Understanding and implementing basic statistical arbitrage trading strategies Basics of StatArb Lead-lag in StatArb Adjusting portfolio composition and relationships Infrastructure expenses in StatArb StatArb trading strategy in Python StatArb data set Defining StatArb signal parameters Defining StatArb trading parameters Quantifying and computing StatArb trading signals StatArb execution logic StatArb signal and strategy performance analysis Summary Managing the Risk of Algorithmic Strategies Differentiating between the types of risk and risk factors Risk of trading losses Regulation violation risks Spoofing Quote stuffing Banging the close Sources of risk Software implementation risk DevOps risk Market risk Quantifying the risk The severity of risk violations Differentiating the measures of risk Stop-loss Max drawdown Position limits Position holding time Variance of PnLs Sharpe ratio Maximum executions per period Maximum trade size Volume limits Making a risk management algorithm Realistically adjusting risk Summary  Section 4: Building a Trading System Building a Trading System in Python Understanding the trading system Gateways Order book management Strategy Order management system  Critical components Non-critical components Command and control Services Building a trading system in Python LiquidityProvider class Strategy class OrderManager class MarketSimulator class TestTradingSimulation class Designing a limit order book Summary Connecting to Trading Exchanges Making a trading system trade with exchanges Reviewing the Communication API Network basics Trading protocols FIX communication protocols Price updates Orders Receiving price updates Initiator code example Price updates Sending orders and receiving a market response Acceptor code example Market Data request handling Order Other trading APIs Summary Creating a Backtester in Python Learning how to build a backtester  In-sample versus out-of-sample data Paper trading (forward testing) Naive data storage HDF5 file Databases Relational databases Non-relational databases Learning how to choose the correct assumptions For-loop backtest systems Advantages Disadvantages Event-driven backtest systems Advantages Disadvantages Evaluating what the value of time is Backtesting the dual-moving average trading strategy For-loop backtester Event-based backtester Summary Section 5: Challenges in Algorithmic Trading Adapting to Market Participants and Conditions Strategy performance in backtester versus live markets Impact of backtester dislocations Signal validation Strategy validation Risk estimates Risk management system Choice of strategies for deployment Expected performance Causes of simulation dislocations Slippage Fees Operational issues Market data issues Latency variance Place-in-line estimates Market impact Tweaking backtesting and strategies in response to live trading Historical market data accuracy Measuring and modeling latencies Improving backtesting sophistication Adjusting expected performance for backtester bias Analytics on live trading strategies Continued profitability in algorithmic trading Profit decay in algorithmic trading strategies Signal decay due to lack of optimization Signal decay due to absence of leading participants Signal discovery by other participants Profit decay due to exit of losing participants Profit decay due to discovery by other participants Profit decay due to changes in underlying assumptions/relationships Seasonal profit decay Adapting to market conditions and changing participants Building a trading signals dictionary/database Optimizing trading signals Optimizing prediction models Optimizing trading strategy parameters Researching new trading signals Expanding to new trading strategies Portfolio optimization Uniform risk allocation PnL-based risk allocation PnL-sharpe-based risk allocation Markowitz allocation Regime Predictive allocation Incorporating technological advances Summary Final words Other Books You May Enjoy Leave a review - let other readers know what you think Preface In modern times, it is increasingly difficult to gain a significant competitive edge just by being faster than others, which means relying on sophisticated trading signals, predictive models, and strategies.

pages: 327 words: 91,351

Traders at Work: How the World's Most Successful Traders Make Their Living in the Markets
by Tim Bourquin and Nicholas Mango
Published 26 Dec 2012

The process is different for each trader, and each trader must find his or her own way. As you might expect, I am often asked how to trade with Bollinger Bands. I usually reply with examples, some from my own process, some from the trading processes of others, some that I use, and some that I know to be valuable, even though I may not be using them. Why the diversity? Because it is hard to know what will click with any given investor or trader. Sometimes the “students” know more than the “teacher.” In fact, the feedback I get from Bollinger Band users is often as valuable as—and occasionally better than—the advice. The reason for this is clear: others have thought about things that I haven’t, which is the reason I read books like this.

Bourquin: So, for a typical trade, how many units are you trading? Wilson: At the moment, I’m normally trading about twenty bucks a point. Bourquin: And since one pip is equal to one point, that’s essentially two standard contracts. For determining dynamic support and resistance, is there a certain type of Bollinger band or a certain moving average that you like to use? Wilson: I use the Bollinger bands on the standard setting, so twenty-two, and I use the sixty-two-period exponential moving average [EMA], which seems to price pretty well in a trend. Bourquin: I don’t know that I’ve heard a lot of traders say they use the sixty-two EMA. How did you arrive at that one?

What indicators do you like to put on a chart in addition to seeing the ratios that your software program provides you? Hemminger: I’ve never been a fan of oscillators. My whole life has been focused on keeping things simple and smart. I look at Bollinger bands not from a reversion perspective but from a momentum perspective. A group of guys that I traded with for three years taught me this way of reading Bollinger bands, and it’s been a great addition to some of the other basic technicals that I watch, including trend lines, time cycles, and support and resistance. I really try to keep things as simple as possible and avoid “quanting things out” in a complex way.

pages: 681 words: 64,159

Numpy Beginner's Guide - Third Edition
by Ivan Idris
Published 23 Jun 2015

To plot, we will use the following code (don't worry about it now; we will see how this works in Chapter 9 , Plotng with matplotlib ): t = np.arange(N - 1, C) plt.plot(t, c_slice, lw=1.0, label='Data') plt.plot(t, sma, '--', lw=2.0, label='Moving Average') plt.plot(t, upperBB, '-.', lw=3.0, label='Upper Band') plt.plot(t, lowerBB, ':', lw=4.0, label='Lower Band') plt.title('Bollinger Bands') plt.xlabel('Days') plt.ylabel('Price ($)') plt.grid() plt.legend() plt.show() Following is a chart showing the Bollinger Bands for our data. The jagged thin line in the middle represents the close price, and the dashed, smoother line crossing it is the moving average: What just happened? We worked out the Bollinger Bands that envelope the close price of our data. More importantly, we got acquainted with the NumPy fill() functon. This functon flls an array with a scalar value.

Table of Contents Python 1 Time for acton – installing Python on diferent operatng systems 2 The Python help system 3 Time for acton – using the Python help system 3 Basic arithmetc and variable assignment 4 Time for acton – using Python as a calculator 4 Time for acton – assigning values to variables 5 The print() functon 6 Time for acton – printng with the print() functon 6 Code comments 7 Time for acton – commentng code 7 The if statement 8 Time for acton – deciding with the if statement 8 The for loop 9 Time for acton – repeatng instructons with loops 9 Python functons 11 Time for acton – defning functons 11 Python modules 12 Time for acton – importng modules 12 NumPy on Windows 13 Time for acton – installing NumPy, matplotlib, SciPy, and IPython on Windows 13 NumPy on Linux 15 Time for acton – installing NumPy, matplotlib, SciPy, and IPython on Linux 15 NumPy on Mac OS X 16 Time for acton – installing NumPy, SciPy, matplotlib, and IPython with MacPorts or Fink 16 Building from source 16 Arrays 17 Time for acton – adding vectors 17 IPython – an interactve shell 21 Online resources and help 25 Summary 26 NumPy array object 28 Time for acton – creatng a multdimensional array 29 Selectng elements 30 NumPy numerical types 31 Data type objects 33 Character codes 33 The dtype constructors 34 The dtype atributes 35 Time for acton – creatng a record data type 35 One-dimensional slicing and indexing 36 Time for acton – slicing and indexing multdimensional arrays 36 Time for acton – manipulatng array shapes 39 Time for acton – stacking arrays 41 Time for acton – splitng arrays 46 Time for acton – convertng arrays 51 Summary 51 File I/O 53 Time for acton – reading and writng fles 54 Comma-seperated value fles 55 Time for acton – loading from CSV fles 55 Volume Weighted Average Price 56 Time for acton – calculatng Volume Weighted Average Price 56 The mean() functon 56 Time-weighted average price 57 Value range 58 Time for acton – fnding highest and lowest values 58 Statstcs 59 Time for acton – performing simple statstcs 59 Stock returns 62 Time for acton – analyzing stock returns 63 Dates 65 Time for acton – dealing with dates 65 Time for acton – using the datetme64 data type 69 Weekly summary 70 Time for acton – summarizing data 70 Average True Range 74 Time for acton – calculatng Average True Range 75 Simple Moving Average 77 Time for acton – computng the Simple Moving Average 77 Exponental Moving Average 80 Time for acton – calculatng the Exponental Moving Average 80 Bollinger Bands 82 Time for acton – enveloping with Bollinger Bands 83 Linear model 86 Time for acton – predictng price with a linear model 86 Trend lines 89 Time for acton – drawing trend lines 90 Methods of ndarray 94 Time for acton – clipping and compressing arrays 94 Factorial 95 Time for acton – calculatng the factorial 95 Missing values and Jackknife resampling 96 Time for acton – handling NaNs with the nanmean(), nanvar(), and nanstd() functons 97 Summary 98 Correlaton 100 Time for acton – trading correlated pairs 100 Polynomials 104 Time for acton – ftng to polynomials 105 On-balance volume 108 Time for acton – balancing volume 109 Simulaton 111 Time for acton – avoiding loops with vectorize() 111 Smoothing 114 Time for acton – smoothing with the hanning() functon 114 Initalizaton 118 Time for acton – creatng value initalized arrays with the full() and full_like() functons 119 Summary 120 Matrices 122 Time for acton – creatng matrices 122 Creatng a matrix from other matrices 123 Time for acton – creatng a matrix from other matrices 123 Universal functons 125 Time for acton – creatng universal functons 125 Universal functon methods 126 Time for acton – applying the ufunc methods to the add functon 127 Arithmetc functons 129 Time for acton – dividing arrays 129 Modulo operaton 131 Time for acton – computng the modulo 131 Fibonacci numbers 132 Time for acton – computng Fibonacci numbers 133 Lissajous curves 134 Time for acton – drawing Lissajous curves 135 Square waves 136 Time for acton – drawing a square wave 137 Sawtooth and triangle waves 138 Time for acton – drawing sawtooth and triangle waves 139 Bitwise and comparison functons 140 Time for acton – twiddling bits 141 Fancy indexing 143 Time for acton – fancy indexing in-place for ufuncs with the at() method 144 Summary 144 Linear algebra 145 Time for acton – invertng matrices 146 Solving linear systems 148 Time for acton – solving a linear system 148 Finding eigenvalues and eigenvectors 149 Time for acton – determining eigenvalues and eigenvectors 150 Singular value decompositon 151 Time for acton – decomposing a matrix 152 Pseudo inverse 154 Time for acton – computng the pseudo inverse of a matrix 154 Determinants 155 Time for acton – calculatng the determinant of a matrix 155 Fast Fourier transform 156 Time for acton – calculatng the Fourier transform 156 Shifing 158 Time for acton – shifing frequencies 158 Random numbers 160 Time for acton – gambling with the binomial 161 Hypergeometric distributon 163 Time for acton – simulatng a game show 163 Contnuous distributons 165 Time for acton – drawing a normal distributon 165 Lognormal distributon 167 Time for acton – drawing the lognormal distributon 167 Bootstrapping in statstcs 169 Time for acton – sampling with numpy.random.choice() 169 Summary 171 Sortng 173 Time for acton – sortng lexically 174 Time for acton – partal sortng via selecton for a fast median with the partton() functon 175 Complex numbers 176 Time for acton – sortng complex numbers 177 Searching 178 Time for acton – using searchsorted 178 Array elements extracton 179 Time for acton – extractng elements from an array 179 Financial functons 180 Time for acton – determining the future value 181 Present value 183 Time for acton – getng the present value 183 Net present value 183 Time for acton – calculatng the net present value 184 Internal rate of return 184 Time for acton – determining the internal rate of return 185 Periodic payments 185 Time for acton – calculatng the periodic payments 185 Number of payments 186 Time for acton – determining the number of periodic payments 186 Interest rate 186 Time for acton – fguring out the rate 186 Window functons 187 Time for acton – plotng the Bartlet window 187 Blackman window 188 Time for acton – smoothing stock prices with the Blackman window 189 Hamming window 190 Time for acton – plotng the Hamming window 190 Kaiser window 191 Time for acton – plotng the Kaiser window 192 Special mathematcal functons 192 Time for acton – plotng the modifed Bessel functon 193 s inc 194 Time for acton – plotng the sinc functon 194 Summary 196 Assert functons 198 Time for acton – assertng almost equal 198 Approximately equal arrays 199 Time for acton – assertng approximately equal 200 Almost equal arrays 200 Time for acton – assertng arrays almost equal 201 Equal arrays 202 Time for acton – comparing arrays 202 Ordering arrays 203 Time for acton – checking the array order 203 Object comparison 204 Time for acton – comparing objects 204 String comparison 204 Time for acton – comparing strings 205 Floatng-point comparisons 205 Time for acton – comparing with assert_array_almost_equal_nulp 206 Comparison of foats with more ULPs 207 Time for acton – comparing using maxulp of 2 207 Unit tests 207 Time for acton – writng a unit test 208 Nose test decorators 210 Time for acton – decoratng tests 211 Docstrings 213 Time for acton – executng doctests 214 Summary 215 Simple plots 217 Time for acton – plotng a polynomial functon 218 Plot format string 219 Time for acton – plotng a polynomial and its derivatves 219 Subplots 221 Time for acton – plotng a polynomial and its derivatves 221 Finance 223 Time for acton – plotng a year's worth of stock quotes 223 Histograms 226 Time for acton – chartng stock price distributons 226 Logarithmic plots 228 Time for acton – plotng stock volume 228 Scater plots 230 Time for acton – plotng price and volume returns with a scater plot 230 Fill between 232 Time for acton – shading plot regions based on a conditon 232 Legend and annotatons 234 Time for acton – using a legend and annotatons 235 Three-dimensional plots 238 Time for acton – plotng in three dimensions 238 Contour plots 240 Time for acton – drawing a flled contour plot 240 Animaton 241 Time for acton – animatng plots 241 Summary 243 MATLAB and Octave 245 Time for acton – saving and loading a .mat fle 246 Statstcs 247 Time for acton – analyzing random values 247 Sample comparison and SciKits 250 Time for acton – comparing stock log returns 250 Signal processing 253 Time for acton – detectng a trend in QQQ 253 Fourier analysis 256 Time for acton – fltering a detrended signal 256 Mathematcal optmizaton 259 Time for acton – ftng to a sine 259 Numerical integraton 263 Time for acton – calculatng the Gaussian integral 263 Interpolaton 264 Time for acton – interpolatng in one dimension 264 Image processing 266 Time for acton – manipulatng Lena 266 Audio processing 268 Time for acton – replaying audio clips 268 Summary 270 Pygame 271 Time for acton – installing Pygame 272 Hello World 272 Time for acton – creatng a simple game 272 Animaton 275 Time for acton – animatng objects with NumPy and Pygame 275 matplotlib 278 Time for Acton – using matplotlib in Pygame 278 Surface pixels 282 Time for Acton – accessing surface pixel data with NumPy 282 Artfcial Intelligence 284 Time for Acton – clustering points 284 OpenGL and Pygame 287 Time for Acton – drawing the Sierpinski gasket 287 Simulaton game with Pygame 290 Time for Acton – simulatng life 290 Summary 294 Python 299 Mathematcs and statstcs 300 Preface Scientsts, engineers, and quanttatve data analysts face many challenges nowadays.

., N)) # Normalize weights weights /= weights.sum() print("Weights", weights) c = np.loadtxt('data.csv', delimiter=',', usecols=(6,), unpack=True) ema = np.convolve(weights, c)[N-1:-N+1] t = np.arange(N - 1, len(c)) plt.plot(t, c[N-1:], lw=1.0, label='Data') plt.plot(t, ema, '--', lw=2.0, label='Exponential Moving Average') plt.title('5 Days Exponential Moving Average') plt.xlabel('Days') plt.ylabel('Price ($)') plt.legend() plt.grid() plt.show() Bollinger Bands Bollinger Bands are yet another technical indicator. Yes, there are thousands of them. This one is named afer its inventor and indicates a range for the price of a fnancial security. It consists of three parts: 1. A Simple Moving Average. 2. An upper band of two standard deviatons above this moving average—the standard deviaton is derived from the same data with which the moving average is calculated. 3.

pages: 464 words: 117,495

The New Trading for a Living: Psychology, Discipline, Trading Tools and Systems, Risk Control, Trade Management
by Alexander Elder
Published 28 Sep 2014

Major market moves tend to erupt from flat bases. Bollinger bands help identify transitions from quiet to active markets. These bands are useful for options traders because option prices are largely driven by swings in volatility. Narrow Bollinger bands help you buy when volatility is low and options are relatively cheap. Wide bands help you decide to write options when volatility is high and options are expensive. When we return to options in the following chapters, you'll read that buying options is a losers' game. Professional traders write options. Wide Bollinger Bands can signal when to be more active with your writes.

Two Ways to Construct a Channel We may construct a channel by plotting two lines parallel to a moving average: one above and another below. We may also vary the distance between the channel lines depending on that market's volatility (standard deviation channels). A symmetrical channel, centered around a moving average, is useful for trading stocks and futures. A standard deviation channel (sometimes called Bollinger bands) is good for those who trade options. Channels mark the boundaries between normal and abnormal price action. It is normal for prices to stay inside a well-drawn channel, and only unusual events push them outside. The market is undervalued below its lower channel line and overvalued above its upper channel line.

Area F—pullback to value completed; MACD-Histogram breaks below zero, creating a setup for a possible bearish divergence. Still may buy to ride back to the prior high. Area G—sell and sell short. Prices have reached the upper channel line, while MACD-Histogram has traced out a bearish divergence between tops E and G, with a break at F. Standard Deviation Channels (Bollinger Bands) The unique feature of these channels is that their width changes in response to market volatility. Their trading rules differ from those of regular channels. Calculate a 21-day EMA. Subtract the 21-day EMA from each closing price to obtain all the deviations from the average. Square each of the deviations and get their sum to obtain the total squared deviation.

pages: 353 words: 88,376

The Investopedia Guide to Wall Speak: The Terms You Need to Know to Talk Like Cramer, Think Like Soros, and Buy Like Buffett
by Jack (edited By) Guinan
Published 27 Jul 2009

Related Terms: • Dow Jones Industrial Average—DJIA • New York Stock Exchange—NYSE • Standard & Poor’s 500 Index—S&P 500 • Large-Cap Stock • Stock Bollinger Band What Does Bollinger Band Mean? A band that is plotted two standard deviations away from a simple moving average. In the example below, the price of the stock is banded by an upper band and a lower band along with a 21-day simple moving average. 57.0 56.5 56.0 55.5 55.0 54.5 54.0 SMA 53.5 53.0 52.5 52.0 51.5 51.0 50.5 50.0 49.5 49.0 48.5 48.0 Notice how the upper and lower bands act as strong areas of support and resistance. 47.5 47.0 46.5 Chart by MetaStock Copyright © 2006 Investopedia.com Investopedia explains Bollinger Band Because standard deviation is a measure of volatility, Bollinger bands adjust to changing market conditions.

In the example below, the price of the stock is banded by an upper band and a lower band along with a 21-day simple moving average. 57.0 56.5 56.0 55.5 55.0 54.5 54.0 SMA 53.5 53.0 52.5 52.0 51.5 51.0 50.5 50.0 49.5 49.0 48.5 48.0 Notice how the upper and lower bands act as strong areas of support and resistance. 47.5 47.0 46.5 Chart by MetaStock Copyright © 2006 Investopedia.com Investopedia explains Bollinger Band Because standard deviation is a measure of volatility, Bollinger bands adjust to changing market conditions. When markets become more volatile, the bands widen (move farther away from the average), and The Investopedia Guide to Wall Speak 25 during less volatile periods, the bands contract (move closer to the average). A tightening of the bands often is used by technical traders as an early indication that volatility is about to increase sharply. This is one of the most popular technical analysis techniques. The closer prices move to the upper band, the more overbought the market is thought to be; the closer they move to the lower band, the more the market is considered oversold.

For example, a volatile stock will have a high standard deviation, whereas the deviation of a stable blue-chip stock will be lower. A large dispersion indicates how much the return on an investment deviates from the expected normal returns. 280 The Investopedia Guide to Wall Speak Related Terms: • Beta • Coefficient of Variation—CV • Volatility • Bollinger Bands • Covariance Stochastic Oscillator What Does Stochastic Oscillator Mean? A technical momentum indicator that compares a security’s closing price to its price range over a particular period. The oscillator’s sensitivity to market movements can be reduced by adjusting the time period or taking a moving average of the result.

Trade Your Way to Financial Freedom
by van K. Tharp
Published 1 Jan 1998

Figure 5.2 An example of static moving average bands: 20-day simple moving average bands at ± 5 percent Figure 5.3 shows how Bollinger Bands adjust as volatility expands or contracts. Note how close together the bands are in times of low volatility (point 1) and how the bands widen when volatility expands (point 2). How to Trade Using Bands I have seen all three types of bands used effectively in trading systems. I personally write a newsletter based on using adaptive dynamic bands (though not Bollinger Bands) that has both tested well and traded well in real time. Here are some guidelines for trading using bands. Figure 5.3 Bollinger Bands as an example of dynamic bands Whether you use static or dynamic bands, setting the width of the bands is a large part of the art and science of band trading.

Dynamic bands start out the same as static bands—with a basis line (typically an SMA). But with dynamic bands, the distance between the basis line and the upper and lower bands varies—most typically as a function of current volatility. The most common type of dynamic bands is Bollinger Bands, named for their originator, John Bollinger. Figure 5.3 shows a set of Bollinger Bands using the default settings: the basis line represented by a 20-day simple moving average, with the upper and lower bands drawn 2 standard deviations above and below the basis line. (The standard deviation is a statistical measure that is commonly used to quantify volatility.)

., 79 on band trading, 110–116 Basis trading, 127 Basso, Tom, 35, 77, 253 on objectives, 50–59 on trend following, 98–102 Bearish patterns, entry based on, 263 Bear market, 163–168 Beliefs, 71–72, 452 Bernanke, Ben, 161–162 Beyond Technical Analysis (Chande), 74 Biases: of gambler’s fallacy, 41–42 of not giving yourself enough protection, 39–40 (See also Judgmental heuristics) Big-picture scenarios, 153–186 author’s vision of big picture and, 156–157 changes in rules, regulations, and taxes and, 176–180 globalization and, 168–172 global warming and, 182 health crisis and, 183 human inefficiency and, 180–182 monitoring, 183–185 mutual funds and, 172–176 secular bear market and, 163–168 trade wars and, 183 U.S. debt and, 157–163 wars and, 182–183 Blue Chip Growth, 398 Boating industry, Tax Reform Act of 1986 and, 177 Boeing, 159 Bollinger, John, 112–113 Bollinger Bands, 113 Bottom patterns, entry based on, 263 Branscomb, Chuck, 28–29 Brinson, Gary, 406 Broker commissions, 391 Buffett, Warren, 108, 196, 237 value model of, 240–242, 280, 304–305, 321–322, 430–431 Buffett: The Making of an American Capitalist (Lowenstein), 240 Bullish patterns, entry based on, 263 Business evaluation model, 240–242 entries in, 280 exits in, 321–322 position sizing in, 430–431 stops in, 304–305 Business fundamentals, setups and, 237 Butterfly spreads, 127 Calendar spreads, 125 Campaign trading, 294 Campaign Trading (Sweeney), 288 Campbell, Joseph, 7, 8 Candlestick charts, 22–23, 24 entry based on, 263–264 CANSLIM trend-following model, 238–240 entries in, 279–280 exits in, 321 position sizing in, 430 stops in, 303–304 Capital, amount needed to live on, 50–51 Capitalization, market selection and, 223 Cash-and-carry strategy, 128 Chande, Tushar, 74, 273 Channel breakouts: as entries, 255–262 as stops, 301, 302 trailing stops and, 313 Channels, 112 Charts, 23 bar, 23–26 candlestick, 22–23, 24, 263–264 entry based on patterns in, 263–264 representativeness bias and, 23–26 trailing stops based on patterns in, 313 visual entry based on, 262–263 Climate change, 182 Climax setups, 230–231 Colby, Robert W., 271 Commissions, 391 Commodities: intercontract spreading and, 127–128 prices of, growth of emerging economies and, 169–170 Commodity trading advisors (CTAs), 49 Component data, setups and, 235 Computer Analysis of the Futures Market (LeBeau and Lucas), 74, 85, 102 Concepts, 97–151 arbitrage, 79–80, 129–136 band trading, 78–79, 110–116 fundamental analysis, 102–107 intermarket analysis, 136–142 market orderliness, 142–148 seasonal tendencies, 81, 117–124 spreading, 80–81, 124–129 for trading system development, 76–81 trend following, 98–102 value trading, 79, 107–110 Connors, Laurence A., 227, 231 Consensus, 104 Conservatism bias, 34 Conservative-with-profits-and-risky-with-losses bias, 42–43 Consolidations, trailing stops based on, 313 Consumer debt, of United States, 159–160 Continuation patterns, entry based on, 263 Contradictory evidence, failure to recognize, 34 Corporate debt, of United States, 159 Cost-of-trading opportunity, 390–394 CPR model for risk, 422–423 Crittenden, Eric, 257 Currency cross rates, 127 Cycles, components of, 118 Daily Graphs, 238 Day trading, regulations affecting, 178 Deceleration, entry signals and, 276–279 The Definitive Guide to Expectancy and Position Sizing (Tharp), 15 Degrees-of-freedom bias, 38–39 Derman, David, 108 Dev-stops, 301 Diligence, 398–399, 402 Directional movement, 267–270 Discipline, 448–450 Discretionary stops, 303 Displaced moving averages, 273 Distorting information, 21 (See also Judgmental heuristics) Distribution of trades, 209–212 Dollar (see U.S. dollar) Dollar stops, 299–300 Dollar trailing stop, 312–313 Donchian channels, 112 Double-blind tests, 33–34 Dynamic bands, 112–113 Easterling, Ed, 165, 167–168 Elliott Wave theory, 142–143, 217–218, 223–224 Emerging countries, growth of, 169 Encyclopedia of Technical Market Indicators (Colby and Meyers), 271 The End of Our Century (Masson), 145 Entry phases, 219–226 determining if conditions are appropriate for use of system, 219–220 market direction, 224–225 market timing, 226 selection of markets to trade, 220–224 setup conditions, 225–226 Entry signals, 251–285 channel breakouts, 255–262 designing, 275–279 directional movement and average directional movement, 267–270 evaluation of, 279–284 high-R-multiple winners and, 252 moving averages and adaptive moving averages, 271–274 oscillators and stochastics, 274–275 patterns, 263–264 prediction techniques, 264–265 reliability of trading systems and, 251–252 sense of control with, 31–32 trying to beat random entry and, 253–255 visual entry based on charts, 262–263 volatility breakouts, 265–267 Entry testing, 86 Envelopes, 112 Equal value units model, for position sizing, 419–421 The Essays of Warren Buffett (Buffett), 240 Evaluating trading systems, 90–91, 385–404 cost-of-trading opportunity and, 390–394 expectancy and, 386–390 newsletter recommendations and sample systems and, 397–403 opportunity and, 388–390 peak drawdowns and, 394–397 EWY, comparison of approaches and, 348–353, 372–374 Exchange-traded funds (ETFs), 222 Excursion, 294–297 Execution costs, 391–392 Exhaustion pattern setups, 230–231 Exits (see Profit-taking exits) Expectancy, 89, 196–200 opportunity and, 388–390 positive, systems with, 386–388 Exponential moving averages, 273 Extreme Value, 399, 402 Failed-test setups, 227–230 Fibonacci numbers, 147 Filters, setups versus, 232–237 Financial freedom, as goal, 16 Fundamental analysis: employing successfully, 104–107 limitations of, 104 setups and, 218–219, 234 Fundamental Analysis (Schwager), 74 Fundamental trading method: entries in, 282–283 exits in, 323 of Gallacher, 245–246 position sizing in, 432–434 stops in, 305–306 Futures markets: exits in, 322–324 position sizing in, 431–434 setups in, 243–248 stops in, 305–306 Gabellio, Mario, 108 Gallacher, William, 243, 432 fundamental trading method of, 245–246, 282–283, 305–306, 323, 432–434 Gambler’s fallacy, bias of, 41–42 Game, 452 Gann, W.

pages: 257 words: 13,443

Statistical Arbitrage: Algorithmic Trading Insights and Techniques
by Andrew Pole
Published 14 Sep 2007

Greater stability is obtained between extremes. Projecting the central location of the spread is done with considerably greater confidence than projecting the extremes. Therefore, most implementations modify the ‘‘go short’’ and ‘‘go long’’ limits to be computed as offsets from the center rather than offsets from the extremes. Bollinger bands, mean plus or minus a standard deviation, are a classic example. In spite of the rationale though, it is arguable how much stability is improved by this switch of focus: The standard deviation is computed from all the data, extremes included, and since observations are squared, the extreme values actually receive proportionally greater weight!

One needs to flag volume increase during the build-up before a peak is identifiable because identification after the fact is usually too late for ameliorating impact on a portfolio. 26 2.4.3 STATISTICAL ARBITRAGE Correlation Search in the Twenty-First Century Several vendors now offer software tools for managing aspects of pairs trading, from identifying tradable pair candidates to execution channels and portfolio management. Correlation searches of the type described here were manually programmed and carried out in the 1980s. No longer is this necessary. Credit Suisse First Boston, for one, offers a tool that allows a user to optimally fit a Bollinger band–type pair trading model to any specified pair of stocks. The program searches over a range of fixed-width windows simulating trading of a mean plus or minus standard deviation model; simulation ‘‘profit’’ is the metric used to compare models (data window length, Bollinger bandwidth) and the maximum profit generating model is identified.

., 205–206n3 Asian bird flu, 175 Autocorrelation, 129–130 Automatic trading, see Algorithmic trading (Black Boxes) Autoregression and cointegration, 47–49 Autoregressive conditional heteroscedastic (ARCH) models, 75–76 Autoregressive fractionally integrated moving average (ARFIMA), 49 Autoregressive integrated moving average (ARIMA), 48–49 Avarice, catastrophe process and, 205–209 Ball bearing analogy, 211–212 Bamberger, Gerry, 1n1 Bank of America, 165, 185, 189 Barra model, 21 Barron’s, 161 Bid-ask spread, declining, 156–159 Binomial distribution, 88–89 Black Boxes, 1, 3, 183–190 dynamic updating, 188 market deflation and, 189–190 modeling transaction volume and market impact, 185–188 Block trading activity, 173 Bollinger bands, 17, 26 Bond futures, 85–87 Box, G.E.P., 1, 9, 48, 191 Brahe, Tyco, 6n3 British Petroleum (BP)–Royal Dutch Shell (RD) spread, 46–47 Calibration, 12–16, 13n1, 32–36 Carroll, Lewis, 67 Catastrophe process, 191–221, 205n3 contrasted to popcorn process, 194–198 Cuscore statistics and, 200–205, 211–221 cusp, 206, 208 forecasts with, 198–200 move, 194–200 normal factor, 206, 207 risk management and, 209–211 splitting factor, 206, 207 surface, 205–206, 207 theoretical interpretation of, 205–209 trend change identification and, 200–205 Catastrophe Theory (Arnold), 205–206n3 Cauchy distribution, 74, 126 Change point identification, 200 Chi-square distribution, 96 Classical time series models, 47–52 autoregression and cointegration, 47–49 dynamic linear model, 49–50 fractal analysis, 52 pattern finding techniques, 51–52 volatility modeling, 50–51 225 226 Cointegration and autoregression, 47–49 Competition, return decline and, 160–162 Conditional distribution, 118–119, 121–122 Conditional probability, 69 Consumer surplus, 159, 162 Continental Airlines (CAL)–American Airlines (AMR) spread, 2, 10–16, 37–39, 40–45 Continuity, 114–117 Correlation: first-order serial, 77–82 during loss episodes, 151–154 Correlation filters, 21–22 Correlation searches, with software, 26 Covariance, 103 Credit crisis of 1998, risk and, 145–148 Credit Suisse First Boston, 26, 38–39, 185, 189 Cuscore statistics, 200–205, 211–221 Daimler Chrysler, 24 Debt rating, risk and, 145–148 Decimalization, 156–159 Defactored returns, 55–57, 65–66 D.E.

pages: 571 words: 105,054

Advances in Financial Machine Learning
by Marcos Lopez de Prado
Published 2 Feb 2018

Snippet 2.4 The symmetric CUSUM filter The function getTEvents receives two arguments: the raw time series we wish to filter (gRaw) and the threshold, h. One practical aspect that makes CUSUM filters appealing is that multiple events are not triggered by gRaw hovering around a threshold level, which is a flaw suffered by popular market signals such as Bollinger bands. It will require a full run of length h for gRaw to trigger an event. Figure 2.3 illustrates the samples taken by a CUSUM filter on a price series. Figure 2.3 CUSUM sampling of a price series Variable St could be based on any of the features we will discuss in Chapters 17–19, like structural break statistics, entropy, or market microstructure measurements.

On dollar bar series of E-mini S&P 500 futures and Eurostoxx 50 futures: Apply Section 2.4.2 to compute the vector used by the ETF trick. (Hint: You will need FX values for EUR/USD at the roll dates.) Derive the time series of the S&P 500/Eurostoxx 50 spread. Confirm that the series is stationary, with an ADF test. Form E-mini S&P 500 futures dollar bars: Compute Bollinger bands of width 5% around a rolling moving average. Count how many times prices cross the bands out (from within the bands to outside the bands). Now sample those bars using a CUSUM filter, where {yt} are returns and h = 0.05. How many samples do you get? Compute the rolling standard deviation of the two-sampled series.

Use as trgt the daily standard deviation as computed by Snippet 3.1. Train a random forest to decide whether to trade or not. Note: The decision is whether to trade or not, {0,1}, since the underlying model (the crossing moving average) has decided the side, {−1,1}. Develop a mean-reverting strategy based on Bollinger bands. For each observation, the model suggests a side, but not a size of the bet. Derive meta-labels for ptSl = [0,2] and t1 where numDays = 1. Use as trgt the daily standard deviation as computed by Snippet 3.1. Train a random forest to decide whether to trade or not. Use as features: volatility, serial correlation, and the crossing moving averages from exercise 2.

Quantitative Trading: How to Build Your Own Algorithmic Trading Business
by Ernie Chan
Published 17 Nov 2008

Sometimes the authors whose strategies you read about will disclose that they have included transaction costs in their backtest performance, but more often they will not. If they haven’t, then you just to have to assume that the results are before transactions, and apply your own judgment to its validity. As an example of the impact of transaction costs on a strategy, consider this simple mean-reverting strategy on ES. It is based on Bollinger bands: that is, every time the price exceeds plus or minus 2 moving standard deviations of its moving average, short or buy, respectively. Exit the position when the price reverts back to within 1 moving standard deviation of the moving average. If you allow yourself to enter and exit every five minutes, you will find that the Sharpe ratio is about 3 without transaction costs—very excellent indeed!

See Factor models Artificial intelligence, 116 and stock picking, 26–27 B Backtesting, 20, 22, 24, 31–67, 144–148 common pitfalls to avoid, 50–60 data-snooping bias, 52–60 look-ahead bias, 51–52 common platforms, 32–36 Excel, 32 high-end, 35–36 R , 32–34 MATLAB TradeStation, 35 historical databases, finding and using, 36–43 high and low data, use of, 42–43 split and dividend-adjusted data, 36–40 survivorship bias, 40–42 January effect, 144–146 performance measurement, 43–50 strategy refinement, 65–66 transaction costs, 61–65 year-on-year seasonal trending strategy, 146–148 Bank of Montreal, 150 Bayes Net toolbox, 168 Behavioral bias, 108–109 Behavioral finance, 108–111 Beta, 14 Black Monday, 106 “Black swan” events, 105 Bloomberg, 14, 36, 75 Bollinger bands, 23 Brett Steenbarger Trading Psychology, 10 Bright Trading, 70 Business, setting up a, 69–78 choosing a brokerage or proprietary trading firm, 71–75 physical infrastructure, 75–77 structure, 69–71 175 P1: JYS ind JWBK321-Chan October 2, 2008 14:7 176 C C#, 80, 85, 164 C++, 80, 85, 164 Calendar effect.

Systematic Trading: A Unique New Method for Designing Trading and Investing Systems
by Robert Carver
Published 13 Sep 2015

Forecasts Instruments Trading rule A, A1 forecast for variation 1 instrument X Trading rule B, variation 1 Combined forecast Y targeting sizing Position weights Subsystem position in Y Instrument Trading rule A, A2 forecast for variation 2 instrument Y Volatility Trading rule A, A1 forecast, variation 1 instrument Y weights B1 forecast for instrument X Forecast Trading rule B, variation 1 Portfolio weighted position in X Subsystem position in X Combined forecast X Trading rule A, A2 forecast for variation 2 instrument X Portfolio weighted position in Y B1 forecast for instrument Y Customising for speed and size W HAT DO THESE TERMS ALL HAVE IN COMMON: BREAKOUTS, Elliott waves, Fibonacci waves, exponentially weighted moving average crossover and Bollinger bands? Answer: They can all form the basis of trading rules. These rules give you forecasts of what they think will happen to the prices of instruments you are trading or investing in. Staunch systems traders use multiple systematic rules like these. But rules can also be extremely simple, like the single rule used by asset allocating investors.

Thank you for that, and for everything. 301 Index 2001: A Space Odyssey, 19f 2008 crash, 170 Active management, 3 AIG, 2 Algorithms, 175, 199 Alpha, 3, 37, 106, 136 Alternative beta, 3-4 Amateur investors, 4, 6, 16, 48, 177, 210 and lack of diversification, 20 and over-betting, 21 and leverage, 35 and minimum sizes, 102 as day traders, 188 Anchored fitting: see Back-testing, expanding out of sample Annual returns, 178-179 Annualised cash volatility target, 137, 139, 149, 151, 159, 161, 171, 230, 250 Asset allocating investors, 3, 7, 42, 69, 98, 116, 147, 188, 225-244, 259 and Sharpe ratios, 46 and modular frameworks, 96 and the ‘no-rule’ rule, 116, 167, 196, 225, 228 and forecasts, 122-123, 159 and instrument weights, 166, 175, 189, 198-199 and correlation, 170 and instrument diversification multiplier, 175 and rules of thumb, 186 and trading speeds, 190-191, 205 and diversification, 206 Asset classes, 246&f Automation, 18-19 Back-testing, 5, 13-15, 16, 18, 19&f, 28, 53, 64, 67, 87, 113, 122, 146, 170, 182f, 187, 197, 205 and overfitting, 20, 29, 53f, 54, 68, 129f, 136, 145, 187 and skew, 40 and short holding periods, 43 in sample, 54-56 out of sample, 54-56 expanding out of sample, 56-57, 66, 71f, 84, 89f, 167f, 193-194 rolling window, 57-58, 66, 129f and portfolio weights, 69-73 and handcrafting, 85 and correlations, 129, 167&f, 175 and cost of execution, 179 simple and sophisticated, 186 need for mistrust of, 259 See also: Bootstrapping Barclays Bank, 1-2, 11, 31, 114 Barings, 41 Barriers to entry, 36, 43 Behavioural finance, 12 Beta, 3 Bid-Offer spread, 179 Block value, 153-154, 161, 182-183, 214, 219 Bollinger bands, 109 303 Systematic Trading Bond ETFs, 226 Bootstrapping, 70, 75-77, 80, 85-86, 146, 167, 175, 193-194&f, 199, 230, 248, 250 and forecast weights, 127, 205 see also Appendix C BP, 12, 13 Braga, Leda, 26 Breakouts, 109 Buffett, Warren, 37, 42 Calibration, 52-53 Carry, 67, 119, 123, 126, 127-128, 132, 247 and Skew, 119 Koijen et al paper on, 119f Central banks, 36, 103 Checking account value, recommended frequency, 149 Clarke, Arthur C, 19f ‘Close to Open’, 120-121 Cognitive bias, 12, 16, 17, 19-20, 28, 64, 179 and skew, 35 Collective funds, 4, 106, 116, 225 and derivatives, 107 and costs, 181 Commitment mechanisms, 17, 18 Compounding of returns, 143&f Contango: see Carry Contracts for Difference, 106, 181 Contrarians, 45 Corn trading, 247f Correlation, 42, 59f, 63, 68, 70, 73, 104, 107, 122, 129, 131, 167-168, 171 and Sharpe ratios, 64 and trading subsystems, 170 and ETFs, 231 Cost of execution, 179-181, 183, 188, 199, 203 Cost of trading, 42, 68, 104, 107, 174, 178, 181, 230 Credit Default Swap derivatives, 105 Crowded trades, 45 Crude oil futures, 246f Curve fitting: see over-fitting Daily cash volatility target, 137, 151, 158, 159, 161, 162, 163, 172, 175, 217, 218, 233, 254, 262. 270, 271, 217 Data availability, 102, 107 Data mining, 19f, 26-28 Data sources, 43-44 Day trading, 188 Dead cat bounces, 114 Death spiral, 35 DeMiguel, Victor, 743f Derivatives, 35 versus cash assets, 106 Desired trade, 175 Diary of trading, for semi-automatic trader, 219-224 Diary of trading, for asset allocating investor, 234- 244 Diary of trading, for staunch systems trader, 255- 257 Diversification, 20, 42, 44, 73f, 104, 107, 165, 170, 206 and Sharpe ratios, 65f, 147, 165 of instruments rather than rules, 68 and forecasts, 113 Dow Jones stock index, 23 Education of a Speculator, 17 Einstein, 70 Elliot waves, 109 Emotions, 2-3 Equal portfolio weights, 72-73 Equity value strategies, 4, 29, 31 Equity volatility indices, 34, 246, 247 Eurex, 180 Euro Stoxx 50 Index Futures, 179-180, 181, 182, 187-188, 193, 198 Eurodollar, trading recommendation, 247 Exchange rate, 161, 185 Exchange traded funds (ETFs), 4, 106, 183-184, 189, 197, 200, 214, 225, 226-228 holding costs of, 230 daily regearing of, 230f correlations, 231 Exchanges, trading on, 105, 107 Exponentially Weighted Moving Average Crossover 304 Index (EWMAC), 117-123, 126, 127-128, 132, 247 see also Appendix B Human qualities of successful traders, 259-260 Hunt brothers, 17 Fannie Mae and Freddie Mac, 2 Fees, 3 Fibonacci, 37, 109 Forecasts, 110-115, 121-123, 159, 175, 196, 211 scaling of, 112-113, 115, 133 combined, 125-133, 196, 248, 251 weighted average of, 126 and risk, 137 and speed of trading, 178 and turnover, 185 not changing once bet open, 211 see also Appendix D Forecast diversification multiplier, 128-133, 193f, 196, 249, 251 see also Appendix D Foreign exchange carry trading, 36 Fortune’s Formula, 143f FTSE 100 futures, 183, 210 Futures contracts, 181 and block value, 154-155 ‘Ideas First’, 26-27, 52-54, 103, 146 Ilmanen, Antti, 30f Illiquid assets, 198 Index trackers, 106 Inflation, 67 Instrument blocks, 154-155, 175, 182-183, 185, 206 Instrument currency volatility, 182-183, 203, 214 and turnover, 185, 195, 198 Instrument diversification multiplier, 166, 169-170, 171, 173, 175, 201, 206, 215, 229, 232, 253 Instrument forecast, 161, 162 Instrument riskiness, 155, 182 Instrument subsystem position, 175, 233 Instrument weights, 166-167, 169, 173, 175, 189, 198, 201, 202, 203, 206, 215, 229, 253 and Sharpe ratios, 168 and asset allocating investors, 226 and crash of 2008, 244 Gambling, 15, 20 Gaussian normal distribution, 22, 32&f, 39, 111f, 113, 114, 139f German bond futures, 112, 155, 181, 198 Gold, 246f Google, 29 Gross Domestic Product, 1 ‘Handcrafting’, 78-85, 116, 167-168, 175, 194, 199, 230, 248, 259 and over-fitting, 84 and Sharpe ratios, 85-90 and forecast weights, 127, 205 worked example for portfolio weights, 231-232 and allocation for staunch systems traders, 253 Hedge funds, 3, 177 High frequency trading, 6, 16, 30, 36, 180 Holding costs, 181 Housekeeping, daily, 217 for staunch systems traders, 254 Japan, 36 Japanese government bonds, 102, 112, 114, 200 JP Morgan, 156f Kahn, Richard, 42 Kaufman, Perry, 117 Kelly, John, and Kelly Criterion, 143-146, 149, 151 ‘Half-Kelly’ 146-147, 148, 230, 260 Koijen, Ralph, 119 Law of active management, 41-42, 43, 44, 46, 129f and Sharpe ratios, 47 Leeson, Nick, 41 Lehman Brothers, 2, 237 Leverage, 4, 21&f, 35, 95f, 138f, 142-143 and skew, 44-45 and low-risk assets, 103 and derivatives, 106 and volatility targeting, 151 realised leverage, 229 Life expectancy of investor, and risk, 141 305 Systematic Trading Limit orders, 179 Liquidity, 35, 104-105, 107 Lo, Andrew, 60f, 63f Long Term Capital Management (LTCM), 41, 46 Sharpe ratio of, 47 Low volatility instruments, need to avoid, 143, 151, 210, 230, 260 Lowenstein, Roger, 41, 46f Luck, need for, 260 Lynch, Peter, 37 Markowitz, Harry, 70, 72 Maximum number of bets, 215 Mean reversion trading, 31, 43, 45, 52, 213f ‘Meddling’, 17, 18, 19, 21, 136, 260 and forecasts, 115 and volatility targets, 148 Merger arbitrage, 29 Mid-price, 179, 181 Minimum sizes, 102, 107 Modular frameworks, 93, 95-99 Modularity, 5 Momentum, 42, 67, 68, 117 Moving averages, 94, 195, 197 MSCI, 156f Narrative fallacy, 20, 27, 28, 64 NASDAQ futures, 188 Nervousness, need for, 260 New position opening, 218 Niederhoffer, Victor, 17 Odean, Terence, 13, 20f Odysseus, 17 Oil prices, standard deviation of, 211 O’Shea, Colm, 94f Online portfolio calculators, 129f Overbetting, 21 Over the counter (OTC) trading, 105, 106, 107, 183f Overconfidence, 6, 17, 19f, 54, 58, 136 and lack of diversification, 20 and overtrading, 179 306 Over-fitting, 19-20, 27-28, 48, 51-54, 58, 65, 68, 121f, 156, 259 and Sharpe ratios, 46f, 47, 146 avoiding fitting, 67-68 of portfolio weights, 68-69 possibility of in ‘handcrafting’, 84 Overtrading, 179 Panama method, 247&f Passive indexing, 3 Passive management, 3, 4 Paulson, John, 31, 41 Pension funds, 3 ‘Peso problem’, 30&f Position inertia, 173-174, 193f, 196, 198, 217 Position sizing, 94, 153-163, 214 Poundstone, William, 143f Price movements, reasons for, 103, 107 Portfolio instrument position, 173, 175, 218, 254, 256, 257 Portfolio optimization, 70-90, 167 Portfolio size, 44, 178 Portfolio weighted position, 97, 99, 101, 109, 125, 135, 153, 165, 167, 177, 267 and diversification, 170 Price-to-earnings (P/E) ratios 4 Prospect theory, 12-13, 37 and momentum, 117 Quant Quake, the, 46 Raspberry Pi micro computers, 4 Relative value, 30, 43, 44-46, 213f Retail stockbrokers, 4 Risk, 39, 137-148, 170 Risk targeting, 136 Natural risk and leverage, 142 Risk parity investing, 38, 116&f Risk premia, 31, 119 RiskMetrics (TM), 156&f Roll down: see Carry Rolling up profits and losses, 149 Rogue Trader, 41 Rounded target position, 173, 175, 218 Index Rules of thumb, 186, 230 see also Appendix C Rumsfeld, Donald, 39&f Safe haven assets, 34 Schwager, Jack, 94f Self-fulfilling prophecies, 37 Semi-automatic trading, 4, 7, 11f, 18, 19f, 37, 38, 98, 163, 169, 209-224, 259 and portfolio size, 44, 203 and Sharpe ratios, 47, 147-148 and modular frameworks, 95 and trading rules, 109 and forecasts, 114, 122-123, 159 and eyeballing charts, 155, 195, 197, 214 and diversification, 166, 206 and instrument weights, 166, 175, 189 and correlation, 169 and trading subsystems, 169 and instrument diversification multiplier, 171, 175 and rules of thumb, 186 and overconfidence, 188 and stop losses, 189, 192 and trading speeds, 190-192, 205 Sharpe ratios, 25, 31-32, 34, 35, 42, 43, 44, 46-48, 53, 58, 60f, 67, 72, 73, 112, 184, 189, 210, 214, 250, 259 and overconfidence, 54, 136, 151 and rule testing, 59-60, 65 and T-Test, 61-63 and skew, 62f, 66 and correlation, 64 and diversification, 65f difficulty in distinguishing, 74 and handcrafting, 85-90 and factors of pessimism, 90 and risk, 137f, 138 and volatility targets, 144-145, 151 and speed of trading, 178-179, 196, 204 need for conservative estimation of, 195 and asset allocating investors, 225 and crash of 2008, 240 Schatz futures: see German bond futures Shefrin, Hersh, 13&f Short option strategies, 41 Short selling, 30, 37 Single period optimisation, 71, 85, 89 Skew, positive and negative, 32-34, 40-41, 48, 105, 107, 136, 139-141, 247, 259 and liquidity, 36 and prospect theory, 37 and risk, 39, 138 and leverage, 44-45, 142 and Sharpe ratios, 47, 62f, 146 and trend following, 115, 117 and EWMAC, 119 and carry, 119 and V2TX, 250 ‘Social trading’, 4f Soros, George, and sterling, 36f Speed of trading, 41-43, 47, 48, 104, 122, 174f, 177-205, 248 speed limits, 187-189, 196, 198-199, 204, 213, 228, 251, 260 Spread betting, 6, 106, 181, 197, 214 and block value, 154-155 and UK tax, 183f oil example, 214 Spreadsheets, 218 Stamp duty, 181 Standardised cost estimates, 203-205, 210, 226, 230 Standard deviations, 21-22, 31-32, 38, 40, 70, 103, 107, 111f, 129 and skew, 105 and forecasts, 112, 114, 128 recent, 155-158 returns, 167 and standardised cost, 182, 188, 192 and stop losses, 211 Static and dynamic trading, 38, 43, 168, 188 Staunch systems trading, 4, 7, 51-68, 69, 98, 109, 117-123, 167, 245-257 and Sharpe ratios, 46, 146, 189 and forecasts, 110-114, 122-123, 189 and instrument forecast, 161 and instrument weights, 166, 175, 198-199 and correlation, 170 and rules of thumb, 186 and trading speeds, 191-192, 205 307 Systematic Trading and back-testing, 193 and diversification, 206 Stop losses, 94-5, 115, 121f, 137f, 189, 192, 214, 216f, 217, 218 and forecasts, 211-212 and different instruments, 213 and price volatility, 216 Survivorship bias, 29 Swiss franc, 36, 103, 105, 142-143 System parameters, 186 Systematica hedge fund, 26 Taking profits and losses, 13-15, 16-18, 58, 94-95, 149 and trend following, 37 see also Appendix B Taleb, Nassim, 39f, 41 Tax (UK), 106, 183f Technical analysis, 18, 29 Technology bubble of 1999, 35 Templeton, John, 37 The Black Swan, 39f The Greatest Trade Ever, 31f, 41 Thorpe, Ed, 146f Thriftiness, need for, 260 Timing, 2 Too much/little capital, 206, 246f Trading capital, 150-151, 158, 165, 167, 178, 192, 199-202 starting low, 148 reducing, 149 and turnover, 185 daily calculation of, 217 Trading rules, 3-4, 7, 16, 25-26, 78, 95, 97-98, 101, 109, 121, 125, 135, 159, 161, 187, 249, 259 need for small number of, 67-68, 193 Kaufman, Perry’s guide to, 117 and speed of trading, 178, 205 cost calculations for, 204 see also Appendix B Trading subsystems, 98-99, 116, 159, 162, 163, 165, 166, 167&f, 169, 171f, 172, 175-176, 185, 187, 230, 251-252, 260 and correlation, 170 308 and turnover, 196 cost calculations for, 204 Traditional portfolio allocation, 167 Trend following, 28, 30, 37, 45, 47f, 67, 117, 137f, 194f, 212f, 247 and skew, 105, 115, 117, 213 Turnover, 184-186, 195, 197, 198, 205, 228, 260 methods of calculation, 204 back-testing of, 247-248 Twitter, 29 V2TX index, 246, 247, 249 Value at risk, 137 VIX futures, 105 Volatility, 21, 103, 107, 116, 129, 150, 226, 229 and targets, 95, 98, 106, 158, 159, 185 unpredictability of, 45 price volatility, 155-158, 162-163, 189, 196, 197, 200, 205, 214, 228, Appendix D and crash of 2008, 240-244 instrument currency volatility, 158, 161 instrument value volatility, 161, 172, 250 scalars, 159-160, 162, 185, 201, 206, 215, 217, 218, 229 look-back period, 155, 195-197 and speed of trading, 178 Volatility standardisation, 40, 71, 72, 73, 167, 182, 185 and forecasts, 112, 121, 129 and block value, 155 Volatility standardized costs, 247 Volatility targeting, 135-151, 171f, 188, 192, 201f, 213-215, 230, 233, 250, 259 Walk forward fitting: see Back testing, rolling window Weekly rebalancing process, for asset allocating investors, 233 When Genius Failed, 40, 46f Women as makers of investment decisions, 17&f www.systematictrading.org, 234 Zuckerman, Gregory, 31f THANKS FOR READING!

pages: 354 words: 26,550

High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems
by Irene Aldridge
Published 1 Dec 2009

The advanced returns generated before 2007 by many stat-arb shops popularized the technique. Yet some blame stat-arb traders for destabilizing the markets in the 2007 and 2008 crises. Stat-arb can lead to a boon in competent hands and a bust in semi-proficient applications. The technique is a modern cousin of a technical analysis strategy utilizing “Bollinger Bands” that was used to indicate maximum highs and lows at any given point in time by plotting a two-standard deviation envelope around the simple moving average of the price. Despite the recent explosive popularity of stat-arb strategies, many misconceptions about the technique are prevalent. This chapter examines the stat-arb technique in detail.

., 270 Biais, Bruno, 12, 67, 160, 163 Bid-ask bounce, tick data and, 120–121 Bid-ask spread: interest rate futures, 40–41 inventory trading, 133, 134–139 limit orders, 67–68 market microstructure trading, information models, 146–147, 149–157 post-trade analysis of, 288 tick data and, 118–120 Bigan, I., 183 Bisiere, Christophe, 12 INDEX BIS Triennial Surveys, 44 Black, Fisher, 193, 212 Bloomfield, R., 133 Bollerslev T., 106, 176–178 Bollinger Bands, 185 Bond markets, 40–42 Boscaljon, Brian L., 174 Boston Options Exchange (BOX), 9 Bowman, R., 174 Boyd, John H., 180 Bredin, Don, 184 Brennan, M.J., 147, 192, 195 Brock, W.A., 13 Broker commissions, post-trade analysis of, 285, 287 Broker-dealers, 10–13, 25 Brooks, C., 55 Brown, Stephen J., 59 Burke, G., 56 Burke ratio, 53t, 56 Business cycle, of high-frequency trading business, 26–27 Caglio, C., 142 Calmar ratio, 53t, 56 Cancel orders, 70 Cao, C., 131, 139, 142 Capital asset pricing model (CAPM), market-neutral arbitrage, 192–195 Capitalization, of high-frequency trading business, 34–35 Capital markets, twentieth-century structure of, 10–13 Capital turnover, 21 Carpenter, J., 253 Carry rate, avoiding overnight, 2, 16, 21–22 Cash interest rates, 40 Caudill, M., 113 Causal modeling, for risk measurement, 254 Chaboud, Alain P., 191 Chakravarty, Sugato, 158–159, 277 Challe, Edouard, 189 Chan, K., 67 Chan, L.K.C., 180, 289, 295 Index Chen, J., 208–209 Chicago Board Options Exchange (CBOE), 9 Chicago Mercantile Exchange (CME), 9, 198 Choi, B.S., 98 Chordia, T., 192, 195, 279 Chriss, N., 274, 275, 295 Chung, K., 67–68 Citadel, 13 Clearing, broker-dealers and, 25 CME Group, 41 Cohen, K., 130 Co-integration, 101–102 Co-integration-based tests, 89 Coleman, M., 89 Collateralized debt obligations (CDOs), 263 Commercial clients, 10 Commodities.

Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals
by David Aronson
Published 1 Nov 2006

An example of a rule based on two variable thresholds is the moving average band rule. See Figure 1.4. Here, the moving average is surrounded by an upper and lower band. The bands may be a fixed percentage above and below the moving average, or the deviation of the bands may vary based on of the recent volatility of the times, as is the case with the Bollinger Band.6 An output value of +1 is triggered by an upward piercing of the upper threshold. This value is retained Price Upper Band Price Lower Band Rule Output +1 -1 FIGURE 1.4 Moving average bands rule. Moving Average Objective Rules and Their Evaluation 21 until the lower threshold is penetrated in the downward direction, causing the output value to change to –1.

It is assumed that all market information required by the method is known and publicly available at the time the method produces the recommendation. 5. The possibility of the time series being equal to the moving average is eliminated by computing the value of the moving average to a greater degree of precision than the price level. 6. J. Bollinger, Bollinger on Bollinger Bands (New York: McGraw-Hill, 2002). 7. T. Hayes, The Research Driven Investor: How to Use Information, Data and Analysis for Investment Success (New York: McGraw-Hill, 2001), 63. 8. A diffusion indicator is based on an analysis of numerous market time series within a defined universe (e.g., all NYSE stocks).

pages: 394 words: 85,252

The New Sell and Sell Short: How to Take Profits, Cut Losses, and Benefit From Price Declines
by Alexander Elder
Published 1 Jan 2008

People keep asking me to teach them to write options. I give them a few stocks to follow and tell them to keep a daily list of their prices, along with several options prices. Not one person who came to me could keep that list up for a month. Lazy. Figure 8.7 ATI daily ATI hit the bottom of the Bollinger band on March 5th and was rebounding: The MACD had stopped going down—that was my trigger. At that time I had two choices. I could buy 1,000 shares of the stock at 97, but that would put $97,000 of my money at risk after a precipitous drop in the market. Alternatively, I could sell a put and take in about $4,800 for my promise to buy a good stock at a $2 discount from its current price.

pages: 321

Finding Alphas: A Quantitative Approach to Building Trading Strategies
by Igor Tulchinsky
Published 30 Sep 2019

They are derived from generic price activity in a stock or other asset and seek to predict the future price levels or general price direction of a security by looking at past patterns. Examples of common technical indicators are the relative strength index, the money flow index, moving average convergence/divergence (MACD), and Bollinger Bands. Descriptions of some of these indicators, along with formulae and corresponding interpretations, can be found on websites such as StockCharts and Incredible Charts. SAMPLE DATA TYPES The use of new and alternate datasets on the WebSim platform continues to increase, and the set of available data is expected to keep growing over time.

pages: 305 words: 98,072

How to Own the World: A Plain English Guide to Thinking Globally and Investing Wisely
by Andrew Craig
Published 6 Sep 2015

Technical analysis tries to generate rules along these lines to help the investor buy and sell with a high probability of success. The discipline has been developing for several decades and there is now a bewildering array of techniques and theories available to the investment community with scary names like “Bollinger bands”, “Donchian channels” and “exponential moving averages”. When you boil it down, however, technical analysis is really about waiting until other people are investing in something and then jumping on the bandwagon. This works because the main thing that causes the price of an asset to move is lots of money flowing towards it (up) or away from it (down).

pages: 443 words: 51,804

Handbook of Modeling High-Frequency Data in Finance
by Frederi G. Viens , Maria C. Mariani and Ionut Florescu
Published 20 Dec 2011

Finally, Towers and Burgess (2000) used principal components to capture arbitrage opportunities. Creamer and Freund (2007, 2010a) follow the tradition of the papers in this section that use machine learning algorithms to find profitable trading strategies and also build completely automated trading systems. The authors use very well-known technical indicators such as moving averages or Bollinger bands. Therefore, the capacity to anticipate unexpected market movements is reduced because many other traders are expected to be trying to profit from the same indicators. However, the authors reduce this effect because the algorithms try to discover new trading rules using Logitboost instead of following the trading rules suggested by each indicator.

pages: 467 words: 154,960

Trend Following: How Great Traders Make Millions in Up or Down Markets
by Michael W. Covel
Published 19 Mar 2007

Trend followers’ rules to enter and exit are driven by what many call technical indicators. The technical indicator for trend followers is price action. However, most traders remain preoccupied with the hundreds upon hundreds of other indicators that promise “prediction.” They discuss and debate which is better—MACD or Bollinger Bands? Which is more profitable—ADX or Williams %R? 261 262 “I didn’t necessarily have system creation as a goal…What I did have as a goal was supplementing my fundamental trading with some technical insights.” What resulted was his long-term technical system that he realized worked well for diverse markets, not just grains.