Category Archives: Python

Use Python to download lawsuit data from Stanford Law School’s Securities Class Action Clearinghouse

Several papers borrow the litigation risk model supplied in Equation (3) of Kim and Skinner (2012, JAE, Measuring securities litigation risk). The logit model uses total asset, sales growth, stock return, stock return skewness, stock return standard deviation, and turnover to … Continue reading

Posted in Python | Leave a comment

Use Python to extract URLs to HTML-format SEC filings on EDGAR

I wrote two posts to describe how to download TXT-format SEC filings on EDGAR: Use Python to download TXT-format SEC filings on EDGAR (Part I) Use Python to download TXT-format SEC filings on EDGAR (Part II) Although TXT-format files have … Continue reading

Posted in Python | 14 Comments

Use Python to download data from the DTCC’s Swap Data Repository

I helped my friend to download data from the DTCC’s Swap Data Repository. I am not familiar with the data and just use this as a programming practice. This article gives an introduction to the origin of the data: http://www.dtcc.com/news/2013/january/03/swap-data-repository-real-time The … Continue reading

Posted in Data, Python | Leave a comment

Use Python to download TXT-format SEC filings on EDGAR (Part II)

As I said in the post entitled “Part I“, we have to do two steps in order to download SEC filings on EDGAR: Find paths to raw text filings; Select what we want and bulk download from the EDGAR FTP server using … Continue reading

Posted in Data, Python | 42 Comments

Use Python to extract Intelligence Indexing fields in Factiva articles

First of all, I acknowledge that I benefit a lot from Neal Caren’s blog post Cleaning up LexisNexis Files. Thanks Neal. Factiva (as well as LexisNexis Academic) is a comprehensive repository of newspapers, magazines, and other news articles. I first … Continue reading

Posted in Python | 8 Comments

Use Python to calculate the tone of financial texts

I find two internet resources for this task (thank both authors): https://iangow.wordpress.com/2014/07/22/get-tone-from-corporate-disclosures-postgresql-python-and-r/ http://conjugateprior.org/software/ca-in-python/ The first solution is way more efficient than the second, but the second is more straightforward. The first needs extra knowledge of PostgreSQL and R besides Python. I … Continue reading

Posted in Python | 7 Comments

Use Python to download TXT-format SEC filings on EDGAR (Part I)

Update on October 6, 2018: As I acknowledged in the very first edition of this post, I borrowed some codes from Edouard Swiac’s Python module “python-edgar” (version: 1.0). Edouard kindly informed me that he had updated his module (see his GitHub page). … Continue reading

Posted in Data, Python | 61 Comments