OpenSourceAP / CrossSection

Code to accompany our paper Chen and Zimmermann (2020), "Open source cross-sectional asset pricing"
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3604626
GNU General Public License v2.0
716 stars 215 forks source link

ffind.ado auto download #105

Closed AlecErb closed 1 year ago

AlecErb commented 1 year ago

Issue: command ffind not defined by ffind.ado (r199)

The automatic download for ffind.ado in /Signals/Code/settings.do no longer works. STATA doesn't speak will with https via the "net install" command. As a band-aid, users can manually download ffind.ado into their /ado/personal/per directory.

tomz23 commented 1 year ago

This command appears to do the same (just much slower) and can be installed via ssc : https://github.com/van-alfen/sicff. Not sure it's worth switching.

chenandrewy commented 1 year ago

@tomz23, can you help us resolve this? Please go ahead and make an executive decision.

tomz23 commented 1 year ago

I compared results between ffind and sicff and found that they almost always agree. If they do not agree, sicff seems to be correct because of an inaccurate treatment of the "other" or "everything else" categories in ffind. sicff is somewhat slower but that does not really matter here. It appears also wieldly used (see https://tysonvanalfen.com/#research). I will swap ffind for sicff throughout the entire code base.

For the record, here is some code one can use to compare the behavior of both commands:

` use "$pathDataIntermediate/SignalMasterTable", clear

destring sicCS, replace

foreach nn of numlist 5 10 12 17 30 38 48 49 {

preserve

ffind sicCS, newvar(ffindvar) type(`nn')
sicff sicCS, generate(sicffvar) industry(`nn')

count if ffindvar != sicffvar

* For inspection
keep if ffindvar != sicffvar
save tmp`nn'    

restore

} `

tomz23 commented 1 year ago

Updated here https://github.com/OpenSourceAP/CrossSection/commit/3c2183231e993f73e232ddd2d8ec99caa4baf13d