Overview

This course has been thoroughly revised and updated since Spring 2025.

Data analysis has shifted from manual downloads and Excel to code-first workflows. Analysts pull large datasets via APIs and scrapers, work with NumPy and Pandas at scale, and integrate ML and LLM into end-to-end pipelines. This course teaches how to do AI-driven financial analytics using Python, including implementing statistical and ML models, calling LLM APIs for text understanding and code generation, building simple RAG workflows over 10-Ks and earnings calls, and building AI agents.

MBA ACCT-GB-3328 specializations

Undergrad ACCT-GB-6028 concentrations

Takeaways

Use Python and AI agents to access and structure financial data

Use Python and AI agents for financial statement analysis

Build Python-based financial statement models with simulation and AI assistance

Use Python and AI agents to run finance simulations

Required Prerequisites

All ACCT courses have the core courses in Financial Accounting as a prerequisite.

Recommended Background

The course assumes you have taken a statistics course in your graduate or undergraduate program. It will also be extremely helpful if you have taken a half-semester Python course.

Materials

I write and distribute my materials. Therefore, no textbook is required, and you need not purchase anything.

LLMs

The course will use VSCode as an IDE with GitHub Copilot as an AI assistant. Please figure out how to sign up for it and do so before the class begins. You also have free access to NYU Gemini Pro if you log in to Gemini using your NYU (not Stern) account. We will also use it on a standalone basis. Last I checked, the Gemini academic version does not work with VSCode directly. I personally also subscribe to the paid versions of ChatGPT and Anthropic.

Attendance and penalty for missing classes

Requiring attendance is necessary for several reasons. First, you incorrectly assume you can catch up on a missed class by watching a recording (if available). Videos do not engage your brain as much as a live class. Second, less than 20% of you watch the recording (if available). You are then lost in class, which provides the wrong signals to me as an instructor. Third, your absence hurts class discussions. Fourth, you miss out on feedback if you do not work through the questions I pose in class. Fifth, I lose the feedback since there are fewer questions.

The policy below will be in effect only after the add/drop period.

Without mandatory attendance, attendance is often below 50%. Therefore, though I dislike doing this, I penalize absences. If you anticipate being absent for good reasons, please email me well in advance. Please enter "Excused" on the attendance sheet described below to avoid the penalty if I approve. If you miss a class due to emergencies and cannot tell me in advance, do not panic. Take care of the emergency first, and then email me. I will permit you to change the "Absent" to "Excused." But if you miss a class without a valid reason, there is a penalty, as stated below.

For sections meeting in 150-190 minute sessions, you will lose one grade (A to A-, A- to B+, B+ to B, B to B-, and so on) for EVERY missed session unless you were explicitly excused via email. Thus, if you miss two class sessions, you will lose two grades, and so on.

For sections meeting in 75-80 minute sessions, you will lose one grade (A to A-, A- to B+, B+ to B, B to B-, and so on) for EVERY TWO missed sessions unless you were explicitly excused via email. Thus, if you miss four class sessions, you will lose two grades, and so on.

Please sit in the same seat in every class and display your name tags. For Zoom classes, you must keep your video on AT ALL TIMES. You must also have a good working headset or mic, as it is extremely rude to be inaudible and force me to ask you to repeat yourself. After entering the class, please mark yourself present in the first 20 minutes on the OneDrive sheet (link posted on Brightspace). You will be marked absent if you are more than 20 minutes late unless it is because of factors beyond your control (traffic, subway, or interviews running late). You will also be marked absent if you leave the class early unless you have my permission or get it afterward. You will get an F in the course if you are caught cheating on the attendance sheet.

Exams and Grading

There are no in-class quizzes, midterms, or final exams.

System Requirements

Help and Office

Assignments

Topic 1: Data structures used to represent financial data

Analytical concepts

Organization of financial data: Row versus column orientation

Python skills

Numpy versus Pandas

Pandas essentials

Understand data types and simple operators

Manipulate rows and columns in Pandas

AI skills

Topic 2: Access external financial data and save it in files (APIs + AI extraction)

Analytical concepts

Understanding XBRL

Python skills

Application Programming Interfaces [API]

File formats

Handling dates

Data structures

AI skills

Topic 3: ROIC and free cash flow drivers: Size, growth, margins, and NOA turnover

Analytical concepts

Sales growth

ROIC drivers

Unlevered free cash flows

Python skills

Loops versus vectorized and broadcast operations

AI skills

Topic 4: Plotting ROIC, FCF drivers, and AI-assisted visualization

Analytical concepts

Cognitive factors

Peer company analysis

Python skills

Types of charts

Pandas plotting

Full power of Matplotlib plotting

AI skills

Topic 5: Discount rates, time value of money, loans, and bonds

Analytical concepts

Time value functions

Simple financial instruments

Python skills

Numpy

Date manipulation in Python

XLSXWriter

scipy.optimize

AI skills

Topic 6: How business risk raises discount rate

Analytical concepts

Operating leverage and business risk

Identifying time series patterns

Identifying discrete events

Python skills

Matplotlib

Statsmodels

AI/ML skills

Topic 7: Business risk drivers: Cyclicality and seasonality

Analytical concepts

Statistical techniques

Python skills

Introduction to statistical packages for time series analysis

AI/ML skills

Topic 8: Liquidity, leverage, and ROE

Analytical concepts

Liquidity

Leverage

Return on equity

Python skills

Advanced plotting with Matplotlib and Plotly

AI skills

Topic 9: Three-statement model of growth and ROIC

Analytical concepts

Three-statement financial model

Monte Carlo simulations

Python skills

Comparing Numpy, Pandas data series, and Pandas data frames

Challenges of developing iterative models in Python

AI skills

Topic 10: Valuation multiples and stock prices

Analytical concepts

Stock returns

Macroeconomic effects: Quantifying systematic business risk

Identifying discrete events

Key valuation multiples

Python skills

Using Python for regressions

AI skills

Using LLMs

Simple embedding workflows

Topic 11: Simulating portfolio returns

Analytical concepts

Simulating correlated stock returns

Optimal portfolios and capital asset pricing model (CAPM)

Python skills

Numpy matrices

AI skills

Building a simple portfolio “research assistant” agent