Category Archives: R language

4 and a half myths about beta in finance

Much of what has been said and thought about beta in finance is untrue. Myth 1: beta is about volatility This myth is pervasive. Beta is associated with the stock’s volatility but there is more involved.  Beta is the ratio of the volatility of the stock to the volatility of the market times the correlation … Continue reading

Posted in Quant finance, R language | Tagged , , , | 12 Comments

Review of “R Graphs Cookbook” by Hrishi Mittal

Executive summary: Extremely useful for new users, informative to even quite seasoned users. Refereeing Once upon a time a publisher asked if I would referee a book (unspecified) about R.  In an instance that can only be described as psychotic I said yes.  That bit of insanity turned out to be a good thing. I … Continue reading

Posted in Book review, R language | Tagged , | 3 Comments

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 … Continue reading

Posted in Fund management in general, R language | Tagged , , | 1 Comment

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 … Continue reading

Posted in R language, Risk | Tagged , , , | 1 Comment

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 … Continue reading

Posted in Quant finance, R language | Tagged , | 26 Comments

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 … Continue reading

Posted in Fund management in general, R language | Tagged , | 2 Comments

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 market trends … Continue reading

Posted in Fund management in general, R language | Tagged , | 4 Comments

Creating prediction distributions

Here we give details and code for the prediction distributions exhibited in yesterday’s blog post “Tis the season to predict”. [Revision: There was a problem with the plots published in that post.  For corrected plots and an explanation of the error, see Revised market prediction distributions.] Eight years of returns The equity indices use daily … Continue reading

Posted in Fund management in general, R language | Tagged , , | 4 Comments

Blog year 2010 in review

The blog year started in August and consists of 30-something posts.  Here is a summary. Most popular Ideas for World Statistics Day A quant review of “The Quants” by Scott Patterson A tale of two returns The tightrope of the random walk What the hell is a variance matrix? Most under-valued Most read is not … Continue reading

Posted in Blog, Book review, Fund management in general, Quant finance, R language, Risk, Statistics | Tagged , , | 8 Comments

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 … Continue reading

Posted in Fund management in general, R language | Tagged , , , , | 4 Comments