Trade Options Like Nancy Pelosi

Python Tutorial

Tute Gomez E
2 min readApr 30, 2021

Tutorial by: Part Time Larry

In this tutorial, we learn how to programmatically retrieve Congressional Financial Disclosure Reports using Python. We first use requests to fetch a zip file containing data on all financial disclosure reports for a given year. We then extract the zipfile with Python and parse the tab-delimited file within. We then fetch the corresponding PDF files containing trades and extract the text from the PDF files using pymupdf.

Follow the best traders on Twitter!

What is STOCK Act?

The STOCK Act is an original bill to prohibit members of Congress and employees of Congress from using private information derived from their official positions for personal benefit, and for other purposes. With this bill in place, members of Congress are no longer allowed to use information garnered through official business for personal reasons. The Stop Trading on Congressional Knowledge (STOCK) Act prohibits members and employees of Congress from using “any nonpublic information derived from the individual’s position … or gained from performance of the individual’s duties, for personal benefit”.

Who is Nancy Patricia Pelosi?

Nancy Patricia Pelosi is an American politician serving as Speaker of the United States House of Representatives since 2019, and previously from 2007 to 2011. She has served as a U.S. representative from California since 1987. A member of the Democratic Party, Pelosi is the only woman in U.S. history to serve as speaker. She is second in the presidential line of succession, after vice president Kamala Harris. She is the dean of California’s Congressional delegation.

Financial status

The nonpartisan Center for Responsive Politics (CRP) estimated in 2009 that Pelosi’s average net worth was US$58,436,537, ranking her 13th among 25 wealthiest members of Congress. In 2014, CRP reported Pelosi’s average net worth was US$101,273,023 having ranked 8th out of 25 wealthiest members of Congress.[297] Business Insider reported that Pelosi’s worth was $26.4 million in 2012 and made her the 13th richest member of Congress. In 2014, Roll Call estimated that Pelosi’s net worth was $29.35 million, ranking her the 15th wealthiest member of Congress.

Roll Call said Pelosi’s earnings are connected to her husband’s heavy investments in stocks that include Apple, Disney, Comcast and Facebook. Roll Call reported that the couple have $13.46 million in liabilities including mortgages on seven properties. According to Roll Call, Pelosi and her husband hold properties “worth at least $14.65 million, including a St. Helena vineyard in Napa Valley worth at least $5 million and commercial real estate in San Francisco”.

Here is the code…

--

--