This project presents Expense Edge, an advanced web-based solution designed to simplify and automate personal financial management through the application of machine learning. The system addresses the common challenges of manual expense tracking, lack of financial foresight, and the absence of personalized budgeting advice. Users can register and log in to a secure platform where they can add their financial transactions (both credits and debits). The backend, developed using the Python Flask framework with MongoDB as the database, ensures secure user authentication and flexible, document-oriented data storage.
For the user, the platform provides an intuitive dashboard that offers an at-a-glance summary of their recent financial health, including income, spending, and a list of transactions. The core intelligence is delivered by a dual machine learning engine. A Naive Bayes classifier, trained on a rich, persona-driven synthetic dataset, automatically categorizes user expenses from text descriptions. A Prophet time-series model analyzes the user\'s entire spending history to generate a sophisticated, 30-day spending forecast.
The system’s primary innovation is its hybrid recommendation engine, which synthesizes the raw statistical forecast with pragmatic financial rules, such as the user\'s current savings and recent income. This produces a transparent, multi-scenario financial summary and, if a savings goal is at risk, generates specific, proportional recommendations for budget cuts. Through its combination of real-time data entry, predictive modeling, and intelligent, personalized advice, the system improves financial literacy and empowers users to make informed decisions. Future developments may include mobile application integration and real-time bank account synchronization.
Introduction
In today’s complex financial landscape, many individuals struggle with proactive personal finance planning, as existing digital tools mostly serve as passive expense trackers without forward-looking guidance. Expense Edge addresses this gap by offering a web-based, data-driven platform built with Flask and MongoDB, designed to automate manual tasks and provide predictive financial insights.
Key Features:
Automated Expense Categorization: Uses a Naive Bayes classifier to classify expenses from text descriptions, eliminating tedious manual entry.
Spending Forecasting: Employs a Prophet time-series model to predict future spending patterns over the next 30 days, constrained by user income.
Intelligent Recommendations: Combines forecasted expenses, current savings, recent income, and user-defined savings goals to generate personalized, actionable budget advice.
Secure Multi-User Environment: Implements robust authentication and session management for privacy and data security.
User-Friendly Dashboard: Presents financial summaries and visualizations for easy tracking and decision-making.
Scalable Architecture: Modern full-stack design ensures robustness and smooth user experience.
Literature Survey:
Unlike popular platforms like Mint (retrospective and sometimes inaccurate categorization), YNAB (manual and learning-intensive), and Spendee (primarily digital ledgers), Expense Edge uniquely integrates machine learning to provide automated categorization and predictive budgeting, enabling proactive financial planning.
Methodology:
Users register and can upload their own data or use synthetic datasets generated based on realistic financial behavior.
Transaction data is stored securely in MongoDB.
When a user adds a transaction, the Naive Bayes model automatically categorizes it.
Upon a budget recommendation request, the system trains a personalized Prophet model on the user’s transaction history to forecast spending.
The Intelligent Recommendation Engine then analyzes this forecast against savings goals to provide tailored budgeting advice.
Machine Learning Models:
Naive Bayes: Trained on a synthetic dataset representing a young professional’s financial behavior; used for real-time categorization of expenses.
Prophet: Trained on user-specific data upon request to produce realistic 30-day spending forecasts, incorporating income constraints.
Database Design:
Two MongoDB collections store user credentials (with hashed passwords) and transaction records, linked securely by user IDs.
Conclusion
The project titled \"Expense Edge: An Intelligent Financial Wellness Platform with Predictive Budgeting\" successfully delivers on its objective to create an intelligent, user-centric application that simplifies personal finance management while empowering users with predictive insights and data-driven visual analytics.
Through the seamless integration of Python Flask, MongoDB, and a dual machine learning engine (Naive Bayes and Prophet), the system automates tedious tasks like expense categorization and provides sophisticated, forward-looking spending forecasts. The core innovation—the hybrid recommendation engine—synthesizes statistical predictions with pragmatic financial rules to produce advice that is transparent, personalized, and actionable.
The platform is simple to use, architected for scalability, and designed with modularity and security in mind. It directly addresses the limitations of traditional, retrospective expense trackers by offering a focused, proactive, and intelligent solution for modern financial planning. Expense Edge stands as a robust proof-of-concept and a strong foundation for a future-ready, data-driven financial wellness tool.
References
[1] Chart.js Team. (2024). Chart.js Documentation. Available at: https://www.chartjs.org/docs/latest/
[2] Harris, C. R., Millman, K. J., van der Walt, S. J., et al. (2020). Array programming with NumPy. Nature, 585, 357-362. Official documentation available at: https://numpy.org/doc/
[3] The Joblib Development Team. (2024). Joblib Documentation (for Model Persistence). Available at: https://joblib.readthedocs.io/
[4] Ling, M. (2024). Flask-Login Documentation. Available at: https://flask-login.readthedocs.io/
[5] MongoDB, Inc. (2024). MongoDB Compass Documentation. Available at: https://www.mongodb.com/docs/compass/current/
[6] The Pallets Projects. (2024). Werkzeug Documentation (for Password Security). Available at: https://werkzeug.palletsprojects.com/
[7] The Pandas Development Team. (2024). pandas-dev/pandas: Pandas. Zenodo. Official documentation available at: https://pandas.pydata.org/docs/
[8] Pedregosa, F., Varoquaux, G., Gramfort, A., et al. (2011). Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825-2830. Official documentation available at: https://scikit-learn.org/stable/documentation.html
[9] PlantUML Team. (2024). PlantUML Language Reference Guide. Available at: https://plantuml.com/
[10] Python Software Foundation. (2024). Python Language Reference, version 3.8. Available at: https://docs.python.org/3/
[11] Richardson, C. (2024). Flask-CORS Documentation. Available at: https://flask-cors.readthedocs.io/
[12] Ronacher, A., & The Pallets Projects. (2024). Flask Documentation. Available at: https://flask.palletsprojects.com/
[13] Taylor, S. J., & Letham, B. (2017). Prophet: Forecasting at Scale. Meta Research. Official documentation available at:
https://facebook.github.io/prophet/docs/quick_start.html
[14] Bishop, C. M. (2006). Pattern Recognition and Machine Learning. Springer. (This is a foundational academic text that provides the theoretical basis for probabilistic classifiers like Naive Bayes).
[15] Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and Practice. OTexts. Available at: https://otexts.com/fpp2/ (This is a widely respected open-source textbook on time-series analysis, providing the context for using forecasting models like Prophet).