Yesterday Today and Tomorrow A Trip Through Computational
- Slides: 50
Yesterday, Today and Tomorrow: A Trip Through Computational Finance It’s Been a Long Journey and I’ve Had a Lot of Good Company John Bollinger, CFA, CMT R/Finance 2011, April 2011 Copyright 2011 Bollinger Capital Management
The First of a New Generation • Robert A. Levy • The Relative Strength Concept of Common Stock Price Forecasting • 1968 • Investors Intelligence Copyright 2011 Bollinger Capital Management 2
The Bad Old Days • Pre-1980 computing was mostly mainframes or minicomputers Copyright 2011 Bollinger Capital Management 3
Main Frames • • • Options analysis Data retrieval AOL Merlin FNN – DEC, VAX, VMS, DECBasic – Tickers, Cycliphase Copyright 2011 Bollinger Capital Management 4
Microcomputers • Microcomputers – S 100, 1974 – Apple II 1977 – IBM PC 2001 Copyright 2011 Bollinger Capital Management 5
S 100 • A backplane or buss to which you added boards – CPU – I/O – Memory – CP/M operating system Copyright 2011 Bollinger Capital Management 6
The Architecture Choice • User chooses – S 100 – Intel 8080 series (Zylog Z 80) • Memory mapped – Apple – MOS 6502 • Port driven – IBM PC – Intel 8080 series Copyright 2011 Bollinger Capital Management 7
A Huge Benefit • Quite often one had to write one’s own i/o for peripherals – Machine code or Assembly language • Learning was not a choice – Logic – Octal and hex math – Register manipulations – Bitwise operations Copyright 2011 Bollinger Capital Management 8
Now you could start computing • But there were no programs • Well, there was Adventure and Missile Command. . . Copyright 2011 Bollinger Capital Management 9
A Programming Language • BASIC – Beginners All-purpose Symbolic Instructional Code – Various flavors • Microsoft – Microcomputer Software – Bill Gates’ first product – MBASIC – BASIC for CP/M Copyright 2011 Bollinger Capital Management 10
A Database • • d. BASE II 1979 Aston Tate A horror, but it pointed the way Copyright 2011 Bollinger Capital Management 11
A Spreadsheet • • Super. Calc Sorcim 1980 Small, light and agile Copyright 2011 Bollinger Capital Management 12
And Then Came the PC • With those few tools we accomplished a lot • But the PC really opened up the horizon • The key was its open architecture Copyright 2011 Bollinger Capital Management 13
BASIC • • MBASIC (CP/M) BASICA / GWBASIC (DOS) Quick. BASIC (Compiler) (DOS) (IDE) Visual. BASIC (Windows) (GUI) Copyright 2011 Bollinger Capital Management 14
A Reach Too Far • . NET was a step more than I wanted to take • At the time there really weren’t any good cross-platform BASIC alternatives • So Microsoft left me behind and. . . • I started searching for a new language Copyright 2011 Bollinger Capital Management 15
My Language Specs • • Open / free (gnuplot) Very high level Widely adopted Simple syntax / easy to read Robust interfaces / play well with others Compact Good development tools Strong community Copyright 2011 Bollinger Capital Management 16
Python • My choice was Python • A choice I have had no reason to regret • Python remains my main programming language • We also use it in production for our websites as a ‘glue’ language Copyright 2011 Bollinger Capital Management 17
Crusher • Realizing the power I now had at my beck and call I almost immediately set out on a new project • Crusher – Technical Analysis tools, testing and deployment – open source Copyright 2011 Bollinger Capital Management 18
Crusher • Crusher went quickly and well • Almost immediately someone suggested building Crusher on top of R • After investigating I realized that R was developing into a powerful tool that I could easily access from Python • So, I off-loaded all Crusher’s statistics calculations to R Copyright 2011 Bollinger Capital Management 19
Crusher • I wasn’t happy leading an open source project • I wanted to get back to trading • So I forked Crusher and continued development in house as an adjunct to my trading / analytical process Copyright 2011 Bollinger Capital Management 20
So, My Solution Was: • Python / Pyscripter • Num. Py / Sci. Py • R / Tinn-R (moving to RStudio. . . ) – Tinn was my light editor of choice pre-R • gnuplot • My. SQL / SQLite • Various connectors Copyright 2011 Bollinger Capital Management 21
The Next Logical Step • Write your own very-high-level language • Trade – The first version – open source • BBScript – Real-time interactive interpreter – Written in Action. Script to take advantage of a real-time charting environment also written in Action. Script – Fully Trade compatible Copyright 2011 Bollinger Capital Management 22
Speaking of Logic • Write your own logic • Around 1990 FNN’s chief engineer, Gene Stratton, and I wrote a three valued logic for traders • 1, 0, -1 • long, flat, short • This proved to be VERY useful Copyright 2011 Bollinger Capital Management 23
The Fuzzy Logical Step • Equity. Trader. com needed fuzzy logic for its modeling approach • The problem with being an early adopter is that you have to write it. . . • And so we did. . . • That project ultimately led to a long involvement with fuzzy logic Copyright 2011 Bollinger Capital Management 24
• Speaking of being an early adopter and having to write it. . . Copyright 2011 Bollinger Capital Management 25
Bollinger Bands • Developed on an S 100 computer – Z 80 at 1. 1 megahertz – 64 kilobytes memory – Dual 180 k floppy disk drives – 10 megabyte hard disk – Lear Siegler ADM 3 a terminal Copyright 2011 Bollinger Capital Management 26
Volatility • At the time it was believed that volatility was a fixed quantity • A property of a security • Beta – Measured once a year – Five years of weekly data – IBM’s Beta was 1. 2 Copyright 2011 Bollinger Capital Management 27
Volatility • If beta changed at all it was thought to change very gradually • For example, over the life cycle of a firm • From high to low as the firm matured • This was GOSPEL Copyright 2011 Bollinger Capital Management 28
Trading Options • • • Options, rights, warrants, convertibles. . . Volatility estimates were key Rules of thumb Not at all efficient Loads of opportunities Copyright 2011 Bollinger Capital Management 29
Percentage Bands • A moving average plus/minus a given percent of itself • Different parameters from issue to issue • Different parameters from time to time • Setting the bands allowed emotions into the process Copyright 2011 Bollinger Capital Management 30
Bollinger Bands • There had to be a better way • One day I copied a formula for volatility down a column in Supercalc and noticed that the values were dynamic. . . • It was one of those Aha! moments Copyright 2011 Bollinger Capital Management 31
Bollinger Bands • Russ Herrold (Trading-shim) calls BBs: • Autoscaling variance bands • An apt description Copyright 2011 Bollinger Capital Management 32
A Nobel Prize • • Economics 2003 Robert F. Engle III “for methods of analyzing economic time series with time-varying volatility (ARCH)” • Tim Bollerslev (GARCH) mentioned, but not awarded Copyright 2011 Bollinger Capital Management 33
So, what are the opportunities today? • False beliefs create opportunities for the clear sighted • Much of modern finance is simply incorrect • The theories are quite nice • But, they do not model the realities well Copyright 2011 Bollinger Capital Management 34
Opportunities • • • Distributions are not normal Correlations converge on one Markets are not efficient Investors and traders are deeply flawed There is no such thing as a rational investor • There are many anomalies Copyright 2011 Bollinger Capital Management 35
Opportunities • Volatility is not mean reverting • Using volatility for position sizing is a mistake Copyright 2011 Bollinger Capital Management 36
Technical Analysis • A numerical approach to the markets • All the way back to Robert Levy technicians and quants have been of a piece Copyright 2011 Bollinger Capital Management 37
A Bridge • R-SIG-Finance • https: //stat. ethz. ch/mailman/listinfo/r-sigfinance • The Markets list • http: //mailman. bollingerbands. com/mailma n/listinfo/markets Copyright 2011 Bollinger Capital Management 38
The Markets List • • • A very old technical analysis forum Started in 1985 by Curt Kyhl Many homes over the years Just won’t die I have been hosting the Markets list since September 2003 Copyright 2011 Bollinger Capital Management 39
A Giveaway! • • “R Cookbook” Paul Teetor O’Reilly 2011 Copyright 2011 Bollinger Capital Management 40
First Copy • • • Who wrote S? And. . . In what year? And. . . Where? Copyright 2011 Bollinger Capital Management 41
First Copy • John Chambers • 1975/6 • Bell Labs – Murray Hill, New Jersey Copyright 2011 Bollinger Capital Management 42
Second Copy • Who was Nicolaus II Bernoulli • And. . . • Why do we care? Copyright 2011 Bollinger Capital Management 43
Second Copy • A Swiss mathematician living in St. Petersburg • St. Petersburg Paradox • Maximize the geometric growth rate – This is still heretical in some circles • Leads to modern position sizing (Kelly) Copyright 2011 Bollinger Capital Management 44
Third Copy • • • Who wrote R? And. . . In what year? And. . . Where? Copyright 2011 Bollinger Capital Management 45
Third Copy • Ross Ihaka and Robert Gentleman • 1976 • University of Auckland, New Zealand Copyright 2011 Bollinger Capital Management 46
Fourth Copy • • What was the first spreadsheet program? And. . . Who wrote it? And. . . In what year? And. . . For what platform? Copyright 2011 Bollinger Capital Management 47
Fourth Copy • • Visi. Calc Dan Bricklin and Bob Frankston 1979 Apple ][ Copyright 2011 Bollinger Capital Management 48
Correspondence • BBands@BBands. com Copyright 2011 Bollinger Capital Management 49
Bollinger Band Websites www. Bollinger. Bands. com www. BBForex. com Copyright 2011 Bollinger Capital Management 50
- Tomorrow and tomorrow and tomorrow creeps
- Tomorrow and tomorrow and tomorrow kurt vonnegut analysis
- Agriculture- yesterday today and tomorrow
- Royal family yesterday today is tomorrow
- Due tomorrow do tomorrow
- Due tomorrow do tomorrow
- How you use ict today and how you will use it tomorrow
- Computer today and tomorrow
- Find the 2’s complement number for 001101110
- Understanding computers today and tomorrow
- Same today tomorrow and forever
- Marketing today and tomorrow chapter 1
- I am a flower quickly fading here today and gone tomorrow
- 2moviego
- Yesterday is history tomorrow is a mystery
- Billy once upon a time
- Peach today's the day
- Learn today lead tomorrow
- Renew
- Students today leaders tomorrow
- Nursing now today's issues tomorrow's trends
- Recycle today for a better tomorrow
- Don't put till tomorrow what you can do today
- Scooping up the field mice and bopping them on the head
- Work today get paid tomorrow
- Where today meets tomorrow
- A dollar today is worth more than a dollar tomorrow
- A dollar today is worth more tomorrow
- Nursing now today's issues tomorrow's trends
- Creating a better tomorrow today
- You enjoy the school trip yesterday
- Management yesterday and today summary
- Yesterday, today and forever sermon
- Today's problems come from yesterday's solutions
- Yesterday is a lesson today is
- For today's meeting
- Todaysclass
- Proposal kickoff meeting agenda
- Galton details
- Today's lesson or today lesson
- Example of repitition
- A trip through geologic time answer key
- Disadvantages of tangential sawing
- Just for today i will try to live through this day only
- Through one man
- Furcation classification
- Night of the scorpion poem text
- Computational thinking algorithms and programming
- Using mathematics and computational thinking
- Purdue computational science and engineering
- Computational engineering and physical modeling