We're busy college students. We don't always track every purchase we make, and we definitely don't have the time to sit down and plan out a monthly budget from scratch. This is a common problem for adults out of college too. Existing budget planner worksheets make YOU do all the work, and all the number crunching. Even further, their budget suggestions might not work for you. A family of 7 has a very different grocery budget than a family of 3. Someone who is self-employed and travels a lot for their work may need less money for groceries and much more for travel costs, restaurants, etc.

What it does

We wanted to take the work out of budgeting, but we also wanted the budget to actually work for people. Anyone can take 10% of your monthly income, spit it back at you, and say "Here's all you should spend on your groceries." But if you're that family of 7, that might not be a realistic budget you can actually follow. We developed a budget planner that analyzes all of your past purchases and bill payments, aggregates them by month and category (shopping, groceries/essentials, entertainment/dining, and bills), and predicts what your spending for each category may look like in the next month. This can be directly used as a customized budget planner, or this information can be used to reveal excessive spending or other spending problems to the client.

How we built it

We used Capital One's Nessie API to generate and analyze data on a customer's purchase and bill payment history. After extracting all purchase amounts and aggregating them as monthly totals per category, we used time series forecasting using the ARIMA model to predict the customer's spending per category for the next month.

Challenges we ran into

When we started this, we thought that Nessie came with mock data for customer transactions. However, customers did not have any purchase or bills history, so we randomly generated data for each category of spending. We were limited by our ability to generate many months worth of realistic data, and it was simplified for the sake of time. Furthermore, we couldn't find any way to change the timestamps on the purchases and bill payments we were creating, so we had no way to split transactions by month. Later, after many months of data have been collected, our predictions will be more realistic, but for now we treated each purchase as an aggregate for a month.

Accomplishments that we're proud of

We had no experience with directly using APIs, and especially with using APIs in Python, so we were happy to have it mostly working in 24 hours. We are also proud that our models are running and are able to create a realistic forecast for someone's future spending.

What we learned

We learned how to make API request calls in python and parse JSON objects. We learned how to use Jupyter notebooks, and we learned how to use a time series forecasting model and tried to understand the statistics behind it. We now have an understanding of stationarity of data, and its necessity, and we know of methods to stationarize our data like first and second difference, and seasonal difference.

What's next for SmartWallet

We would like to keep working on the models for better results and a predictions. For example, a model that can adjust predictions by season (to account for holiday season and summer vacations). We would like to add a GUI--maybe a Django website, or some other website using our python script data. We would like to add some interactivity to the budget planner, so that people can see their spending over time, and adjust the budget made for them, if they want to save more money, or aim to spend less on a specific category. We would also like to add this as a feature to existing online/mobile banking programs. This way, customers can see their spending visualized and view their probable budget for the next month all within their usual banking system.

Built With

Share this project: