notes
  • Home
  • Blog

Blog

Posts and notes. From newest to oldest.

Posts and notes.

From newest to oldest.

Browse selected notes by topic.

THE ARCHIVE

83 entries

  • 202640
  • 202520
  • 202412
  • 20235
  • 20222
  • 20214

Posts and notes, from newest to oldest.

2026

26 October 2026

Explaining some .assign() idioms

Explaining pandas assignment, callable arguments, dictionary unpacking, and pandas 3 column expressions, with a comparison to dplyr across().

  • Python
  • pandas
  • R
  • Data cleaning
26 October 2026

Processing SEC submissions data

Using the sec-submissions package to prepare Parquet data, preserve timestamp evidence, and distinguish dated audits from subsequent corrections.

  • SEC
  • EDGAR
  • JSON
  • Datetimes
  • Python
  • DuckDB
26 October 2026

Solutions for Ball and Brown (1968)

Updated, freshly executed Python Polars solutions for the Ball and Brown (1968) chapter, including the income-versus-cash-flow comparison.

  • Accounting research
  • Replication
  • Python
  • Polars
26 October 2026

Solutions for Panel data

Updated, freshly executed Python Polars solutions for the panel-data chapter, including disclosure regressions and design checks.

  • Accounting research
  • Replication
  • Python
  • Polars
8 October 2026

Getting data out of Postgres: an update

Updated benchmarks comparing PostgreSQL-to-Parquet export paths, with newer packages and a local database.

  • PostgreSQL
  • Parquet
  • benchmarking
  • Polars
10 September 2026

Working with date and times

Dates, times, time zones, and the difficulties of moving temporal data between R and DuckDB, using SEC filings.

  • Datetimes
  • DuckDB
  • SEC
7 September 2026

Diff-in-diff as a causal design

A short comment on research design, parallel trends, and the interpretation of difference-in-differences.

  • Causal inference
  • Research methods
  • Difference-in-differences
7 September 2026

The SEC’s timestamp “fix”

An update on inconsistent time zones in SEC submissions data, linking to the longer dates-and-times note.

  • SEC
  • EDGAR
  • Datetimes
  • Data curation
4 September 2026

Spirit of Goodwill

A waterfall chart of Boeing’s purchase price allocation for Spirit AeroSystems, rebuilt from the reported data.

  • Accounting
  • Data visualization
  • Boeing
  • Goodwill
11 June 2026

Direct-method cash flow statements

An introduction to the June 2026 direct-method cash-flow finding, linking the existing XBRL analysis.

  • Accounting
  • Cash flows
  • SEC
  • XBRL
  • R
11 June 2026

How common are direct-method cash flow statements?

Using SEC XBRL data and R to investigate how often companies report direct-method cash flow statements.

  • Cash flows
  • Accounting
  • SEC
  • XBRL
  • R
  • dera.pq
2 June 2026

The R version of db2pq is on CRAN

A short introduction to the R package for exporting PostgreSQL tables to Parquet, including sources beyond WRDS.

  • R
  • db2pq
  • PostgreSQL
  • Parquet
20 May 2026

Why include code in teaching?

Why working through code and exercises can reveal what drives a research paper's results, illustrated by the panel-data chapter.

  • Teaching
  • Accounting research
  • Research methods
  • R
  • Python
14 May 2026

Taxonomy of researchers

Five types of researchers, in a 2019 presentation to prospective Honours students, shared again in 2026.

  • Research methods
  • Education
  • Academia
12 May 2026

What's the most important financial statement?

Using the Ball and Brown research design to examine the claim that the cash flow statement is the most important financial statement.

  • Accounting
  • Financial statements
  • Accounting research
  • Research methods
22 April 2026

A mini-textbook on consolidation accounting

An introduction to freely available consolidation accounting materials, with editable Quarto sources.

  • Accounting
  • Teaching
  • Consolidation
  • IFRS
20 April 2026

The Retail Sales Data Set

Using retail-sales queries from SQL for Data Analysis to explore visualization with ggsql.

  • Retail
  • ggsql
  • SQL
  • Visualization
20 April 2026

First Git commit

Working with DERA Notes data using Polars

Using Polars to query the SEC's DERA financial-statement notes data.

  • SEC
  • DERA
  • Polars
15 April 2026

Learning Python Polars

A fast-paced introduction to Python Polars and statistics, with current setup instructions and templates.

  • Python
  • Polars
  • Teaching
  • Data analysis
4 April 2026

Making plotnine more 'Pythonic'

Exploring how plotnine's grammar of graphics can fit more naturally into Python code.

  • Python
  • plotnine
  • graphics
  • Polars
3 April 2026

Moving notes to Typst

A short account of moving the notes PDF workflow to Typst, linking the maintained collection and sources.

  • Quarto
  • Typst
  • PDF
  • Publishing
2 April 2026

Solutions for 'Beaver (1968)'

Discussion and coding solutions for the Beaver (1968) chapter, using Python Polars to examine market reactions to earnings announcements.

  • Accounting research
  • Replication
  • Python
  • Polars
26 March 2026

Benchmarking local PostgreSQL-to-Parquet export paths

Comparing ways to move data from PostgreSQL into Parquet for analysis with modern dataframe tools.

  • PostgreSQL
  • Parquet
  • benchmarking
  • Polars
23 March 2026

Converting lazy data frames into Parquet files (Python version)

Using Python, Ibis, and db2pq to turn database queries into local Parquet data.

  • Python
  • Parquet
  • db2pq
  • Polars
22 March 2026

Converting lazy data frames into Parquet files

Moving the results of lazy R database queries into Parquet files with db2pq.

  • R
  • Parquet
  • db2pq
  • WRDS
  • Tidy Finance
15 March 2026

Ball and Brown (1968): Replication using Python Polars

Replicating a classic accounting study with Python Polars, and examining what its results tell us about earnings and stock returns.

  • Accounting research
  • Replication
  • Python
  • Polars
25 February 2026

Data management ideas for researchers

Practical ways to manage research data with Python, Parquet, and a local library of WRDS data.

  • Python
  • Parquet
  • db2pq
  • WRDS
  • Polars
25 February 2026

Data management ideas for researchers (R version)

An R version of the guide to managing research data with Parquet and db2pq.

  • R
  • Parquet
  • db2pq
  • WRDS
22 February 2026

A whole research paper in Quarto

From data preparation to a PDF manuscript with a single click.

  • Quarto
  • Reproducibility
  • Research
18 February 2026

Data curation: The case of Call Reports

Building a data library from US bank Call Reports, with Polars and DuckDB.

  • Data curation
  • Polars
  • DuckDB
11 February 2026

R packages on Linux without compiling from source

A short tip for RStudio users on Linux, with current Posit Package Manager setup guidance.

  • R
  • Linux
  • WRDS
5 February 2026

Data collection (with spreadsheets)

The often overlooked work of collecting research data, and the useful role spreadsheets can play.

  • Data curation
  • Spreadsheets
2 February 2026

Working with JSON data: The case of SEC submissions data

Working with hierarchical JSON data using the SEC's filing-submissions records.

  • SEC
  • EDGAR
  • JSON
29 January 2026

Data curation and the data science workflow

Where data curation fits into the data science workflow, illustrated with Australian stock-market data.

  • Data curation
  • Australia
  • ASX
  • SIRCA
21 January 2026

Some benchmarks with comp.g_secd

Comparing approaches to querying Compustat Global's daily security data, from SAS on WRDS to local Parquet files.

  • SAS
  • WRDS
  • CRSP
  • Parquet
  • Python
20 January 2026

The best of both worlds: Using modern data frame libraries to create pandas data

Using Polars and Ibis to prepare large datasets for analysis in pandas.

  • WRDS
  • Polars
  • Ibis
  • pandas
20 January 2026

Using SAS to create pandas data

Running SAS on WRDS and bringing the results into a pandas dataframe with wrds2pg.

  • SAS
  • pandas
  • wrds2pg
15 January 2026

ChatGPT as a copy editor, with Git

Using ChatGPT for feedback and Git to track changes in complex writing projects.

  • AI
  • Git
  • Writing
15 January 2026

Shared code

What academic research might learn from open-source software about sharing and improving code.

  • Research
  • web data
5 January 2026

Reproducible data collection

Making data collection reproducible, using employment data and a published research project as a case study.

  • Reproducibility
  • Research methods

2025

17 December 2025

Responsive open-source software: Two examples from dbplyr

Two examples of how requests from users become useful features in open-source software.

  • Data curation
  • dbplyr
  • SQL
  • DuckDB
17 December 2025

Writing better SQL without writing SQL

Rebuilding an SQL query with common table expressions and dbplyr, and checking what the query actually computes.

  • SQL
  • dbplyr
4 December 2025

Why aren't more data people talking about ibis?

A look at Ibis and the connection it offers between dataframe APIs and SQL databases.

  • Python
  • Ibis
  • DuckDB
  • SQL
11 October 2025

But not all research is bad

Why the existence of good research does not resolve the harder problem of distinguishing it from unreliable findings.

  • Research methods
  • p-hacking
12 September 2025

Analysis of IPOs on the ASX

An exploration of initial public offerings on the Australian Securities Exchange.

  • Australia
  • IPOs
11 September 2025

SIRCA ASX End of Day (EOD) collection

An introduction to SIRCA's daily prices for ASX-listed securities and their use in measuring returns.

  • Australia
  • SIRCA
  • ASX
  • CSV
  • Parquet
11 September 2025

SIRCA Mergers and Acquisitions collection

Exploring SIRCA's collection of Australian mergers and acquisitions data.

  • Australia
  • M&A
  • ASX
  • SIRCA
  • Parquet
4 September 2025

farr: reusable code and teaching data

Why packaging functions and small datasets helps teaching and research, with an update to the original release advice.

  • R
  • Teaching
  • Accounting research
  • Reproducibility
28 August 2025

Comparing skylines

Where Melbourne's skyline would fit in a published US ranking, with a reproducible calculation from historical building data.

  • Melbourne
  • R
  • Data curation
16 May 2025

Business valuation with ITCs

Working through Sunnova's investment tax credits, tax equity financing, and noncontrolling interests to understand value for shareholders.

  • Sunnova
  • Accounting
  • Valuation
  • Investment tax credits
  • Noncontrolling interests
14 April 2025

Universities and willing learners

Universities, willing learners, and meal completion certificates.

  • Education
  • AI
10 April 2025

Growth by industry

A rough replication of the McKinsey Valuation book's industry growth chart, with the original figure, source code, and discussion of the sample and industry mapping.

  • Valuation
  • Finance
  • Compustat
  • R
  • Data visualization
7 April 2025

Trump's tariff formula

Unpacking the elasticity and passthrough assumptions behind the April 2025 tariff formula, combining the LinkedIn post and its mathematical explanation.

  • Economics
  • Trade
  • Tariffs
24 March 2025

Digging into Tesla's reporting on PP&E

Reconciling Tesla's capital expenditure and PP&E disclosures, and testing explanations for an apparent discrepancy.

  • Tesla
  • Accounting
  • PP&E
  • Cash flows
17 March 2025

Accounting, finance and the bundling of education

Durable skills, job readiness, and what accounting and finance degrees offer.

  • Accounting
  • Finance
  • Education
10 March 2025

Defining winter and summer in Oxford

An exploration of Oxford's seasons using weather data and Python.

  • Weather
  • Oxford
  • Python
26 February 2025

Stock returns on Yahoo Finance

Examining how Yahoo Finance's closing and adjusted prices translate into stock returns.

  • Yahoo
  • finance
14 February 2025

Proposal for teaching data analytics

A proposal for learning data analytics through real data, complete code, visualisation, and core ideas from business and economics.

  • Education
  • Data analytics
  • R
14 February 2025

Retail sales

Working with Australian Bureau of Statistics retail-sales data in R.

  • Retail
  • ABS
  • R
28 January 2025

Severance and academic incentives

Meaning, incentives, and finger traps in academic research.

  • Research
  • Academia

2024

2 December 2024

Getting SEC EDGAR XBRL data

Getting financial-statement and footnote data from SEC EDGAR's bulk XBRL files.

  • SEC
  • XBRL
  • EDGAR
1 December 2024

Missing Form APs?

Comparing SEC XBRL records with PCAOB data to investigate potentially missing Form AP filings.

  • Research methods
  • PCAOB
  • XBRL
  • SEC
1 October 2024

ACNC Registry data: Arrow version

Using list columns and Parquet to represent Australian charity registry data in a single file.

  • Australia
  • Arrow
1 October 2024

Does Beardsley et al. (2021) show anything?

A simulation asks whether a reported pattern can arise without the earnings management it is claimed to reveal.

  • Research methods
19 September 2024

A quick look at City of Melbourne bike data

A short exploration of bicycle data from the City of Melbourne.

  • Melbourne
  • transport
16 May 2024

Working with Form AP data

Downloading and working with PCAOB Form AP data in R, illustrated by variations in engagement-partner names and audit workloads.

  • PCAOB
  • Form AP
  • R
  • DuckDB
  • Data curation
20 April 2024

Defining winter and summer in Boston

Using temperature data to examine when winter and summer begin and end in Boston.

  • Weather
  • Boston
20 April 2024

Defining winter and summer in Melbourne

Comparing calendar conventions with temperature-based definitions of Melbourne's seasons.

  • Weather
  • Australia
  • Melbourne
20 April 2024

Defining winter and summer in Sydney

Looking at Sydney's temperature data to think about the boundaries of winter and summer.

  • Weather
  • Australia
  • Sydney
20 April 2024

Sunrise and sunset times

Exploring sunrise and sunset times in Melbourne and Boston.

  • Datetimes
  • Weather
  • Australia
  • Melbourne
  • Boston
10 April 2024

Trading days per year (crsp.dsf)

Checking the familiar assumption of 252 trading days per year against CRSP's daily stock data.

  • CRSP
  • WRDS
5 April 2024

Data visualization challenge

A plotting challenge: how should a chart represent the cumulative return on a stock?

  • Data visualization
  • ggplot2

2023

29 December 2023

Improving performance of SQLite data

Exploring faster alternatives to SQLite for the analyses in Tidy Finance.

  • Tidy Finance
  • SQLite
23 December 2023

Calculating betas using DuckDB

Calculating stock betas with DuckDB, following the approach used in Tidy Finance.

  • Tidy Finance
  • DuckDB
  • WRDS
  • Finance
1 October 2023

The Gino-Colada Affair

Re-examining experimental results and the consequences of changing contested observations.

  • Reproducibility
  • Research methods
8 August 2023

The elephant in the room: p-hacking and accounting research

P-hacking, replication, and the incentives that shape the credibility of empirical accounting research.

  • Research methods
  • p-hacking
7 April 2023

Adding delisting returns to monthly data

Translating SAS code into R to incorporate delisting returns in monthly CRSP data.

  • SAS
  • Stock returns
  • CRSP

2022

13 October 2022

Should Bao et al. (2020) be retracted?

Examining how corrections affect the central claims of a machine-learning study of accounting fraud.

  • Research methods
  • Machine learning
2 February 2022

The purpose of an accounting professor?

A response to Alex Edmans on research, institutional loyalty, collaboration, and impact in accounting academia.

  • Accounting
  • Research
  • Academia

2021

22 December 2021

Do we need accounting research?

A historical argument about the costs and benefits of accounting research, its connection to teaching, and institutional demand.

  • Accounting
  • Research
  • Academia
8 September 2021

Observations on accounting education in 2021

Reflections on teaching accounting, including the role of concepts, context, and judgment.

  • Accounting
  • Education
28 July 2021

GitHub for accounting researchers

How GitHub can fit into a research workflow that preserves code and makes results easier to reproduce.

  • GitHub
  • Git
  • Reproducibility
  • Research methods
20 July 2021

What a Journal of Finance retraction gets right

What a retraction reveals about the value of accessible data, code, and incentives to check published findings.

  • Replication
  • Reproducibility
  • Research methods