Earnings surprises

Category : Uncategorized

Earnings surprises

Please make sure you have the most updated mfd_dm, mfd_ta and mfd_tex packages for Stata installed for this post.

*
net from "http://www.researchforprofit.com/stata/mfd_dm"
net from "http://www.researchforprofit.com/stata/mfd_ta"
net from "http://www.researchforprofit.com/stata/mfd_tex"
* click on the blue mfd_dm package and then "click here to install" 
*

Yahoo! Finance provides a nice list of earnings surprises. mfd_dm downloads these daily lists as a Stata data file.

*
clear all
cd "/users/mfd/desktop"

forval month=1/12 {
	forval day=1/31 {
		local tarih: di %tdCCYYNNDD date("2014-`month'-`day'","YMD")
		di "`tarih'"
		capture: mfd_dm_ea_surprises, date(`tarih')
		if (_N>0) {
			capture: append using 140205_earnings_surprises.dta
			save 140205_earnings_surprises.dta, replace
		}
	}
}
*

 

Sample data:
Screen Shot 2014-02-05 at 2.39.13 PM