Mutual Fund Fees Analysis

PythonSQLdbtDuckDBpolarsstatsmodelsTableauMatplotlibpytest

A dbt and DuckDB warehouse built from 42 quarters of SEC mutual fund prospectus data (7.55M fee and return facts), merging two reporting vocabularies the SEC switched between in 2024. The analysis shows that fees come almost straight out of returns, that the most expensive funds beat their index far less often, and that survivor-only averages flatter returns, delivered as a three-dashboard Tableau Public workbook with a fund lookup.

Mutual Fund Fees Analysis screenshot

Highlights

  • dbt star schema (14 models) from 7.55M SEC facts covering 58,862 share classes, enforced by 38 data tests
  • Merged the SEC's two XBRL reporting taxonomies and deduplicated returns restated in up to ten filings
  • Within-fund regression: each extra fee point cost 0.86 points of return (95% CI 0.82 to 0.90)
  • The priciest fifth of funds beat their index only 22.7% of the time, vs 37.7% for the cheapest
  • Survivor-only averages overstated yearly returns by 0.39 points
  • Byte-identical reruns through explicit tie-breaks in SQL
Mutual Fund Fees Analysis – Analytics Engineering | Mayur Bijarniya