Publications by Pat
Bear hunting
When were there bear and bull markets in US stocks since 1950? Smoothing While we’d really like to estimate the expected return at each point in time, finding bear markets is ambitious enough. The plan starts by smoothing the daily returns through time, as in Figure 1. Figure 1: Smoothed returns with a 4 year window. Note that for each time p...
3879 sym 14 img
Some quibbles about “The R Book” by Michael Crawley
A friend recently bought The R Book and I said I would tell him of problems that I’ve noticed with it. You can eavesdrop. Page 4 The word “library” is used instead of “package”. This (common) error substantially raises the blood pressure of some people — probably to an unwarranted extent. An R package is a group of functions, da...
3722 sym 2 img
The tightrope of the random walk
We’re really interested in markets, but we’ll start with a series of coin tosses. If the coin lands heads, then we go up one; if it lands tails, we go down one. Figure 1: A coin toss path.Figure 1 is the result of one thousand coin flips. It is a random walk. The R command that created Figure 1 was: > plot(cumsum(sign(rnorm(1000))), type=...
3195 sym 6 img
Blog year 2010 in review
The blog year started in August and consists of 30-something posts. Here is a summary. Quant concepts backtesting: Backtesting — almost wordless cointegration: American TV does cointegration efficient frontier: Anomalies meet volatility implied alpha: Implied alpha — almost wordless portfolio theory: Ancient portfolio theory random walk: T...
5447 sym 2 img 1 tbl
Creating prediction distributions
Here we give details and code for the prediction distributions exhibited in yesterday’s blog post Tis the season to predict. Eight years of returns The equity indices use daily closing levels from the start of 2003. This data comes from Yahoo. A roughly equivalent technique of selecting the last 2000 daily prices is used for oil. The data a...
5589 sym 6 img
Revised market prediction distributions
This provides revised plots of the prediction distributions published yesterday. The previous plots of prediction distributions should be ignored — they are not doing as advertised. We show the prediction distribution of levels of several equity indices (plus oil price) at the end of 2011 assuming nothing happens. That is, we’ve taken out...
3524 sym 42 img
Some market predictions
We look at a few forecasts for the year 2011 that we’ve run across, and compare them with the prediction distributions presented in Revised market prediction distributions. FTSE 100 There is a “range forecast” on an Interactive Investor page of 5350 to 6565. It isn’t clear (to me at least) what this means, but I find it fascinating that...
2966 sym 16 img 7 tbl
The number 1 novice quant mistake
It is ever so easy to make blunders when doing quantitative finance. Very popular with novices is to analyze prices rather than returns. Regression on the prices When you want returns, you should understand log returns versus simple returns. Here we will be randomly generating our “returns” (with R) and we will act as if they are log retur...
5322 sym 8 img
Normal market accidents
We think of accidents as abnormal events, but there is “normal accident” theory. We don’t think of accidents happening in markets, but they do. That’s why it’s called a market crash. For normal accidents to come into play, two conditions need to hold: the system is complex the system is tightly coupled Certainly the financial syst...
3557 sym 10 img
Paying interest and the number e
Suppose I borrow a dollar from you and I’ll pay you 100% interest at the end of the year. How much money will you have then? $1 * (1 + 1) = $2 What happens if instead the interest is calculated as 50% twice in the year? $1 * (1.5 * 1.5) = $2.25 After 6 months I owe you $1.50 and then at the end of the year I pay 50% interest on that amount....
2275 sym 6 img