Tuesday, October 16, 2012

Alpha Centauri has a planet

In this case, the planet is low mass but very close in. The Doppler shift in the starlight amounts to a mere half meter per second – slower than walking speed! When I read that I was stunned; that low of a signal is incredibly hard to detect. Heck, the star’s rotation is three times that big. But looking at the paper, it’s pretty convincing. They did a fantastic job teasing that out of the noise. 

The graph displayed shows the effect of the planet on the star. RV means "radial velocity", the speed toward and away from us as the star gets tugged by the planet. The x-axis is time, measured in units of the period of the planet (in other words, where it reads as 1 that means 3.24 days). The dots look like they’re just scattered around, but when you average them together – say, taking all the dots in a one hour time period – you get the red dots shown (the vertical lines are the error bars). The signal then pops right out, and you can see the tell-tale sine wave of a planet pulling its star.

This is now my only impression of British politics

http://www.bbc.co.uk/news/uk-politics-19967916

Thursday, October 11, 2012

Get Rich Quick

Background:
You may remember my work with the #1 best selling NES game of all time, Wall Street Kid.  In it, I found that the best strategy was to simply buy which ever stock did best on any given day.  As I watch actual stocks go up and down every day I had an idea.  It seems that the market tends to go in the same direction for a whole week, either up or down.  If you bought an S&P 500 index fund and then sold it on any day when the market closed down, rebuying it on any day the market closed up, you would tend to beat the market.

I feel obliged to point out that this sort of thinking is a cardinal sin of probability theory, ie, thinking that if an independent event occurs in a string that it will affect the outcome of the next event.  For example, thinking that if the roulette wheel has come up red 5 times in a row that it is due to be black (or that it'll continue being red for that matter) is wrong.  Its probability is 50/50 no matter what previous outcomes were.

That being said, the stock market is not an independent random event.  All it would take for this to be a valid method is for there to be some positive correlation between how the market does today and how it did yesterday.  Surely, that is not unreasonable.

I should also point out that there are trading fees which would create an overhead that would definitely negate any gain.  But spherical cows care not for these things.

Data:
I've often needed the historical stock market prices, and Yahoo Finance is the easiest place to get it.  I thought I was going to have to write a quick program, but I did all the work in LibreOffice.

In case the process is not clear, here is the strategy.  Buy $1 worth of S&P 500 in 1950.  If the S&P 500 closes down for the day sell at opening the next day.  If the S&P 500 closes up for the day, rebuy if you had previously sold (and haven't rebought yet).

In practice, this has the effect of skipping any day that follows a negative day.  The theory being that negative days will tend to follow other negatives days more often than positive days.

Analysis:
I didn't really expect this to work.  While the premise sounds plausible, the idea of an efficient market is that, if some common piece of information can be employed to beat the market, that this info will be exploited and the market will adjust such that it is no longer profitable.  For example, if we had a harsh winter, and you expect this to hurt orange farms, which will in turn raise prices of frozen concentrate orange juice futures, you might think you could buy them now safe in the knowledge that they will go up in price.  But, so does everybody else.  The net result is that the market adjusts the price to whatever level the best available knowledge would predict that it will be at in the future.  Now, if there were some sort of report that suddenly revealed the crop conditions and you got your hands on that, well that would change things.

Anyway, on to the graphs:
In this graph we see that this method actually dramatically outperforms the market.  After 62 years our $1 in the S&P 500 is worth about $90 (7.5% annualized), certainly good.  However, had we been using the proposed method we'd have about $1500 (12.5% annualized), and would have had $5500 a decade ago at the markets peak (18.8% annualized).

Here we see the ratio of the proposed method / normal S&P 500, graphed on the right axis (which is identical to the left here).   I put the S&P on the left axis for comparison.

This is largely the same as the previous graph but now the proposed method is graphed on the left axis instead of the S&P 500.  Note the axes are different here.

This is perhaps the most insightful graph, but also the most confusing.  It is very important to note that the proposed method is graphed on the right axis from 0 to 6000, while the S&P 500 is graphed on the left from 0 to 100.  This means that around the year 1998 where they seem to both be about equal in the middle of the graph, the S&P 500 is worth only $50, while the proposed method is worth $3000.

What this shows is that while the alternate method worked very well, it did not gain on the two recent spikes, but still lost on the down slopes of them.  This can be explained, somewhat obviously in retrospect, by the fact that the market has been very volatile in the last decade, and that eliminated the correlation. 

When I first did this I started in 1990.  The result was about a 400% gain for the S&P 500 and a mild loss for the alternate method.  This seemed so surprising to me that I decided to look further back.  If you look back at the graphs with the ratio plotted in green, any time that was increasing this was a good strategy, and any time it was decreasing this was a poor strategy.  So, from 1950 to about 1970 it did well, in the 70s it did extremely well, from 1980 to 2000 it was neutral, and in the 2000s it did very poorly.  There is a glimmer of hope, in that it has been neutral for the last few years.

Fell free to use this strategy and just send me 10% of your net profits.

Tuesday, October 9, 2012

The CIA Burglar Who Went Rogue

http://www.smithsonianmag.com/history-archaeology/The-CIA-Burglar-Who-Went-Rogue-169800816.html
The CIA station in Katmandu arranged for an official ceremony to be held more than an hour away from the capital and for all foreign diplomats to be invited. The agency knew the East Germans could not refuse to attend. That would leave Groat’s team about three hours to work. Posing as tourists, they arrived in Katmandu two days before the mission and slipped into a safe house. On the appointed day, they left the safe house wearing disguises crafted by a CIA specialist—whole-face latex masks that transformed them into Nepalese, with darker skin and jet-black hair. At the embassy, Groat popped the front door open with a small pry bar. Inside, the intruders peeled off their stifling masks and with a bolt-cutter removed a padlock barring the way to the embassy's security area. Once in the code room, Groat and two teammates strained to lift the safe from the floorboards and wrestled it down the stairs and out to a waiting van.

They drove the safe to the American Embassy, where it was opened—and found to contain no code machine. Based on faulty intelligence, the CIA had sent its break-in team on a Himalayan goose chase.

First CityWide Change Bank

I just cited this video in a economics paper I'm writing:
http://www.nbc.com/saturday-night-live/video/first-citywide-change-bank/229045

Protip to fellow students:  Referencing 25 year old parody commercials is how you wow your professors.