How to build an XBRL parser in Python: SEC filings to JSON
Python code that flattens the SEC’s XBRL company facts into JSON and parses a filing’s XBRL instance for the regional and product figures the API leaves out, worked on ASML.
Python code that flattens the SEC’s XBRL company facts into JSON and parses a filing’s XBRL instance for the regional and product figures the API leaves out, worked on ASML.
Free Python code that pulls a company’s XBRL financial data from the SEC EDGAR API, worked on Alphabet and checked against its 10-K.
Welcome to the 10th post in our Python for Finance series! We’ve covered significant ground, from ratios to qualitative analysis. Catch up here: Now, we pivot towards valuation, starting with a cornerstone metric for Discounted Cash Flow (DCF) analysis: Free Cash Flow (FCF). FCF represents the cash generated by a company after accounting for all operational needs and…
Hello again, and welcome to the eighth installment of the Python for Finance series! We’ve journeyed from basic ratios to complex data retrieval and even dipped our toes into qualitative analysis by fetching earnings call transcripts and doing basic keyword searches. Catch up on the series here: In Post 8, we saw that keyword counts lack nuance…
Welcome back to the Python for Fundamental Analysis series! We’ve built a strong quantitative toolkit over the last posts: While numbers are essential, they don’t capture management strategy, competitive dynamics, outlook, or the nuances behind performance. For this, we turn to qualitative sources, and one of the richest is the earnings call transcript. These quarterly calls offer direct…
Welcome back to the Python for Fundamental Analysis series! We’ve built a solid foundation by calculating individual metrics and ratios for single companies. Check out the previous posts: Analyzing a company in isolation, however, only tells part of the story. Is a P/E ratio of 25 high or low? Is a Net Profit Margin of 15% good…
Introduction: How Well Are Assets Being Used? Welcome back to the Python for Finance series! We’ve journeyed through valuation, data retrieval, profitability, liquidity, and leverage. If you missed any previous posts, you can catch up here: Now, we shift our focus to Efficiency Ratios, also known as Activity Ratios or Turnover Ratios. These ratios measure how effectively a…
Welcome back to the Python for Finance series! Having explored valuation (Post 1), financial statements (Post 2), profitability (Post 3), and liquidity (Post 4), we now examine another crucial aspect: Leverage. Leverage involves using debt to finance operations and assets. While it can magnify returns, it also increases financial risk, making companies more vulnerable during downturns due to…
Welcome back to the Python for Finance series! In our previous posts, we’ve fetched specific metrics like P/E (Post 1), retrieved full financial statements (Post 2), and visualized profitability trends (Post 3). Now, we shift our focus from profitability to another critical aspect of fundamental analysis: Liquidity. Liquidity refers to a company’s ability to meet its short-term financial…
Welcome back to our Python for Finance series! In the previous post (Post 2), we successfully automated the retrieval of the three core financial statements – the Income Statement, Balance Sheet, and Cash Flow Statement – using Python and the Financial Modeling Prep (FMP) API. We saw how pandas helps structure this data effectively. But raw financial statements, while informative,…