Fun with yahoo buzz

Nov 09, 2005 07:46


Last weekend, Richard prompted me to finally get off my arse and write some code to analyze the Yahoo Buzz markets. Since I am heavily focused on dividends -- perhaps wrongly so, but that's my focus regardless -- I wrote a program that predicts the dividend payout resulting from buying $1000 worth of a stock.

Using their handy-dandy allinfo.xml data dump, I was able to pretty easily run this on all the stocks in the market. Sorting numerically by expected dividend gave us a list of the top stocks to choose from. Richard dutifully sold all his holdings, and bought equal shares in the top 10 listed at the time. Whether this was wise or foolish is currently a judgement call, but come Friday's dividend payout we'll know for sure.

Fairly soon thereafter, I created a cron job to download the latest allinfo.xml, make a dividend-prediction dump of it, and save both to datestamped filenames. This runs once an hour. After that, it was only a matter of time before I created a graph to go along with it. So now I have a graph of the top 5 predicted dividends over time. Kinda neat to watch.

I just now finished a program to add up the value of the dividends given a basket of stocks. It assumes $1000 worth was purchased of each stock, which matches my dividend prediction, so the numbers can be compared to calculate a ROI. This is what it looks like for the basket Richard purchased on Friday:

$ ./basketvalue YAD LIVEJOURNAL TREO650 WILMA MSNIM YIM SUSE YMUSIC JAVAWA ACTIVEX < 20051109-0700-stock_dump
Basket cost: 10000.00
Basket value: 723.91
Basket ROI: 7.24

If he had bought $1000 in each one (which he didn't, but that's besides the point), he'd have spent $10,000, and as of now his dividend would be $723.91. 7.24% ROI is not bad, not bad at all. Especially when you consider that's just the dividend ROI -- those stocks are still gaining value based on share price.
Previous post Next post
Up