Goal: Monthly rollups for revenue & expense, KPIs (Net Income, Margin %), anomaly flags, and a 3-month revenue forecast.
Stack: SQLite (SQL), pandas, matplotlib, statsmodels (Holt-Winters ETS).
- 12-month revenue growth:
<paste from summary cell> - Avg margin (last 12m):
<paste from summary cell>% - Anomaly months (margin < 5%):
<paste list> - Next 3-month revenue forecast:
<paste dict>
- Notebook:
financial-performance-sql-python.ipynb - Figures:
figures/revenue_vs_expense.png,figures/profit_margin.png - Outputs:
outputs/monthly_company.csv,outputs/forecast_next_3_months.csv - SQL:
sql/monthly_rollup.sql - Repro:
requirements.txt
pip install -r requirements.txt
# then open the notebook and Run All