Posts Tagged ‘ R Language ’

Revised market prediction distributions

January 4, 2011
By
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...

Read more »

Creating prediction distributions

January 4, 2011
By
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 … Continue reading...

Read more »

Blog year 2010 in review

December 30, 2010
By
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: The tightrope of the random walk returns: A tale … Continue reading...

Read more »

High readings of VIX index during 2 days

December 28, 2010
By
High readings of VIX index during 2 days

During last two sessions (December 23th and 27th), VIX index posted returns (close to close) above 6 %. My question is – what return can we expect next day after such event? As you can see from the graph above, expected return is positive. During 1995-2010 were 53 such events and mean return was 1.02 %

Read more »

The tightrope of the random walk

December 27, 2010
By
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...

Read more »

Some quibbles about “The R Book” by Michael Crawley

December 13, 2010
By
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 … Continue reading...

Read more »

Interesting volatility measurement

December 10, 2010
By

Long time ago I stumbled across interesting volatility measurement at quantifiableedges.blogspot.com. The idea is following: take 3-day historical volatility of S&P 500 index and divide that by 10-day historical volatility. Then mark all points which are less that 0.25 and measure the volatility of 3 following days. On average, the volatility of following 3 days

Read more »

3 weak days in a row

December 6, 2010
By
3 weak days in a row

Recently, Trading the odds posted one of many flavors of mean reverting strategies and I decided to get my hands dirty by writing R code and testing it. You can find full description of the strategy by following latter link above. Long story short – if SPY shows lower open, high and close 3 days in

Read more »

Bear hunting

December 6, 2010
By
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 … Continue reading...

Read more »

Joy of Stats coming soon

November 29, 2010
By
Joy of Stats coming soon

The Joy of Stats really is a joy.  It will be shown on BBC4, apparently scheduled for December 7.  (That date comes from Hans Rosling on twitter, I haven’t found scheduling evidence at the BBC.) I saw its debut at the Royal Statistical Society on World Statistics Day. Here is a five minute excerpt: You … Continue reading...

Read more »