Using Linear Regression to Predict Future Monthly Maintenance Fees



(For the README file and code, please click here.)
Executive Summary
In June 2025, I used linear regression to forecast my future monthly maintenance fees for my apartment through the year 2082. My co-op's most recent financial report on fiscal year 2024 (7/1/2023-6/30/2024) said, "Seven years of 1% annual increases - preceded by two years with no increase - were insufficient to keep up with rising operating expenses, especially as inflation shot up in recent years. We also saw our reserves for important capital projects depleting at a rate that was not sustainable. ... In February 2024, the Board voted to increase Basic Maintenance by 7.5%, effective in July, the beginning of fiscal year 2025. The Board also increased the annual minimum maintenance increase to 3% (from the previous 1%) - a number that more accurately reflects what is required to keep pace with typical levels of inflation."
Looking forward, assuming that there is no change in the rate of increase every year for the monthly maintenance fee and, therefore, it stays at 3%, five years from now in 2030, I’ll owe $836.92 a month (not including electric), and in 10 years $970.22. My first year of retirement in the year 2047, I’ll owe $1383, and when I’m 100 in 2082, I’ll owe $3892 a month.
Tool Used
Python in a Jupyter Notebook via Visual Studio Code
Method
I created a csv file using each monthly bill from my co-op from 10/1/2019 to 6/1/2025. Then, I transformed the data type of column “Date” from object to datetime. (I decided to keep “Electric” separate from “Total maintenance fee” for now just because it fluctuates.) Then, using matplotlib, I visualized the data from the “Basic Maintenance Fee” and “Total Maintenance Fee” columns. Then, using numpy, pandas, and matplotlib, I created a visualization of projected fees to 2082. I also made an interactive viz using plotly that opens in a web browser and shows detailed pop-ups when you hover your mouse over each data point.