Financial Statement Analytics Using Python [ACCT-GB 3328]


Bio Overview Help Prerequisites Materials Assignments Grading Topics

Spring 2019

9 Sundays (not 12 Sundays), 1-5 pm:
February 17, 24
March 3, 10, 31
April 7, 14, 21, & 28


You will learn how to manipulate and analyze financial statement data using Python as a tool. The course teaches the following skills using Python:

Structured thinking

How to think about analytical tasks in an organized and structured manner so that they can be automated using Python.

Using design concepts such as DRY (Don’t repeat yourself) and Single Source of Truth (SSOT).

Automating financial statement analysis tasks

Interacting with financial statement data stored in XBRL
Classifying and summarizing datasets that are inconvenient to handle via Excel
Automating creation and retrieval of Excel data
Visualizing financial data

Financial data analytics

Identifying peer groups for comparing multiples
Forecasting sales and earnings
Identifying abnormal accruals and divergence of earnings and cash flows
Predicting credit rating changes and defaults [We are not going to try the almost impossible task of predicting future stock and bond returns.]

Identifying LBO and acquisition targets


This self-contained course does not assume any background in programming. It teaches the necessary Python and SQL skills. The course presumes that you have taken the core courses in Financial Accounting and Statistics.

Target audience

If you expect to write code to manipulate or analyze financial data, you will benefit from this course. This course will teach you how to code in Python to process accounting and financial markets data based on financial analysis and statistical concepts. This course is not suitable for those who want a managerial overview of data analytics techniques without the hands-on coding.

Help and Office



Exams and Grading


Topic 1: Computing basic financial metrics from data stored in files

Analytical tasks

Compute key financial statement metrics for companies

Compounded annual growth rate, margins, and net operating asset intensity

Python skills learned

Access data in external files

Read financial statement data stored in external files

Data delimiters

Use control structures such as loops

Reading records using a loop

Understand data types

Numbers versus strings

Use mathematical operators

Key mathematical operators

Topic 2: Working with XBRL (Extensible Business Reporting Language)

Analytical tasks

Understanding XBRL

What is structured data? What is the XBRL taxonomy? Current financial reporting landscape and the limits of XBRL

Python skills learned

Language syntax

Dictionaries and Tuples


Understanding application programming interfaces [API]

Interacting with web-based data

Topic 3: Reading data stored in databases using SQL

Analytical tasks

Relational databases

Understand the organization of relational databases

Efficient storage of financial statement data in databases

Python skills learned

SQL Using SQL with Python to read from and write to databases

Topic 4: Computing key statistical metrics for financial data

Analytical tasks

Operating leverage, financial leverage, and variances

Using the difference between sales variance and the variance of various earnings measures to infer the extent of fixed costs

Industry effects

Correlating sales to sales and earnings of peer companies

Macroeconomic effects: Quantifying systematic business risk

Behavior of sales and earnings in recessions

Python skills learned

Using numpy

Numpy and scientific computing

Using Statmodels

Using basic statistical functions in Statmodels

Using Sci-Kit Learn

Running regressions with Sci-Kit


Working with large data sets

Excel pivot tables are very useful but can get unwieldy when large amount of data is present. Python skills are indispensable when processing large amounts of data.

Topic 5: Plotting key financial metrics

Analytical tasks

Cognitive factors

What are design principles for displaying quantitative information? We will using the guidelines provided by Edward Tuftie in his book “Visual Display of Quantitative Information.”

Key financial metrics for analysis and valuation

Key accounting metrics

Key valuation metrics

Python skills learned

Using MatPlotLib

Automating charting with MatPlotLib

Using Sci-Kit Learn

Plotting advanced metrics with Sci-Kit Learn

Topic 6: Identifying peer companies

Analytical tasks

Unsupervised learning and cluster analysis

What is unsupervised learning? SIC codes versus FAMA-FRENCH Classification versus machine learning

Comparing the traditional methods of clustering that are based on intuition with the modern machine learning based methods Making sense of clustering based on machine learning

Python skills learned

Cluster analysis

Using Sci-Kit Learn for cluster analysis

Topic 7: Forecasting sales and earnings

Analytical tasks

Understanding growth drivers

Business cycles: Opex versus capex commodities

Seasonal growth: Identifying seasonal patterns

Python skills learned

Pandas for time series analysis

Using Pandas for time series analysis

Challenges of time series analysis vis-à-vis cross sectional analysis

Topic 8: Identifying abnormal accruals and deferrals

Analytical tasks

Accruals and deferrals relating to revenues

Unexplained increase in receivables

Unexplained decrease in deferred revenues

Accruals and deferrals relating to expenses

Unexplained increase in prepayments and deferred expenses

Unexplained decrease in payables and accrued expenses

Understanding the divergence of earnings and cash flows

The “good” and “bad” causes of divergence of earnings and cash flows

Python skills learned

Regression analysis and outliers

Identifying outliers using Sci-Kit learn

Dimensionality reduction

Reducing the number of independent variables using Sci-Kit learn

Topic 9: Interacting with Valuation Models in Excel

Analytical tasks

Excel financial models

Building and populating a simple financial model using external data

Python skills learned

Using OpenPyXL

Reading XLSX

Writing XLSX

Calling VBA routines stored in Excel

Topic 10: Parsing Management Discussion and Analysis and news

Analytical tasks

Qualitative versus quantitative disclosures

Understanding how qualitative disclosures complement quantitative disclosures

Identifying non-GAAP disclosures

Python skills learned

Connecting with news and financial reports via web interfaces Using API to connect to new and financial reports available on the web Using Natural Language Toolkit (NLTK) Using NLTK for Natural Language Processing

Topic 11: Credit ratings and distress

Analytical tasks

Leading indicators of distress

Understanding the causes of distress

Understanding which financial metrics could be leading indicators of distress

Understanding the determinants of credit ratings

Python skills learned

Logit regression

Using Sci-Kit Learn for logit regressions

Cluster analysis

Using Sci-Kit Learn for cluster analysis

Topic 12: Acquisitions and leveraged buyouts

Analytical tasks

Identifying potential acquisition and LBO targets

Which financial metrics distinguish companies that are the target of acquisitions from those that are not acquired?

Which financial metrics distinguish companies that are the target of LBOs from those that are not taken private?

Relative valuation of targets

What is the typical premium paid for targets?

What are the determinants of premium paid?

Python skills learned

Logit regression

Using Sci-Kit Learn for logit regressions

Cluster analysis

Using Sci-Kit Learn for cluster analysis

Multi-variate regression

Using Sci-Kit Learn for regression analysis