A comprehensive tool for analyzing and optimizing debt repayment strategies
Project description
Financial Debt Optimizer 1.1.1
A comprehensive Python tool for analyzing and optimizing debt repayment strategies to help you become debt-free faster while minimizing interest costs.
Features
Core Optimization Strategies
- Debt Avalanche: Minimize total interest paid by targeting highest interest rates first
- Debt Snowball: Build momentum by paying off smallest balances first
- Hybrid Strategy: Balance psychological wins with mathematical optimization
- Custom Strategy: Define your own debt prioritization order
Advanced Financial Modeling
- Future Income Integration: Account for raises, bonuses, and additional income sources
- Recurring Expense Management: Track monthly, bi-weekly, quarterly, and annual expenses
- Extra Payment Allocation: Optimize how extra funds are distributed across debts
- Cash Flow Analysis: Monitor monthly financial health and surplus calculations
Comprehensive Reporting
- Excel Integration: Generate detailed spreadsheet reports with multiple worksheets
- Visual Charts: 6+ interactive charts showing debt progression, payment breakdowns, and cash flow
- Monthly Summaries: Track income, expenses, payments, and extra funds by month
- Decision Logging: Audit trail of optimization decisions and rationale
- Strategy Comparisons: Side-by-side analysis of different repayment approaches
Professional Excel Output
- Payment Schedule: Detailed chronological payment plan
- Monthly Summary: Income, expenses, and payment tracking
- Debt Progression: Individual debt balance evolution
- Strategy Comparison: Performance metrics across different approaches
- Charts & Visualizations: Professional charts and graphs
- Decision Log: Detailed rationale for optimization choices
Installation
PyPI Installation (Recommended)
pip install financial-debt-optimizer
Requirements
- Python 3.8 or higher
- Dependencies are automatically installed with the package
Install from Source
git clone https://github.com/bryankemp/financial-debt-optimizer.git
cd financial-debt-optimizer
pip install -e .
Development Installation
git clone https://github.com/bryankemp/financial-debt-optimizer.git
cd financial-debt-optimizer
pip install -e .[dev]
Quick Start
1. Generate an Excel Template
debt-optimizer generate-template my-debt-data.xlsx
2. Fill in Your Data
Open my-debt-data.xlsx and fill in:
- Debts: Name, balance, minimum payment, interest rate, due date
- Income: Sources, amounts, frequency (bi-weekly, monthly, etc.)
- Recurring Expenses: Monthly bills, subscriptions, etc.
- Future Income: Bonuses, raises, additional income streams
- Settings: Bank balance, optimization preferences
3. Run Analysis
debt-optimizer analyze --input my-debt-data.xlsx --output debt-analysis.xlsx
4. Review Results
Open debt-analysis.xlsx to see:
- Optimized payment strategy
- Month-by-month payment schedule
- Visual charts and progress tracking
- Interest savings and time to debt freedom
Usage Examples
Basic Analysis
# Analyze debts with default settings (minimize interest)
debt-optimizer analyze -i my-debts.xlsx -o results.xlsx
Advanced Options
# Compare all strategies with extra monthly payment
debt-optimizer analyze \
--input my-debts.xlsx \
--output comprehensive-analysis.xlsx \
--goal minimize_interest \
--extra-payment 500 \
--compare-strategies
Available Goals
minimize_interest: Pay least total interest (default)minimize_time: Become debt-free fastestmaximize_cashflow: Optimize monthly cash flow
Excel Template Structure
Debts Sheet
| Name | Balance | Min Payment | Interest Rate | Due Date |
|---|---|---|---|---|
| Credit Card 1 | 5000.00 | 150.00 | 18.99 | 15 |
| Student Loan | 25000.00 | 300.00 | 5.50 | 1 |
Income Sheet
| Source | Amount | Frequency | Start Date |
|---|---|---|---|
| Salary | 2500.00 | bi-weekly | 2024-01-01 |
Recurring Expenses Sheet
| Description | Amount | Frequency | Due Date | Start Date |
|---|---|---|---|---|
| Rent | 1200.00 | monthly | 1 | 2024-01-01 |
Future Income Sheet
| Description | Amount | Start Date | Frequency | End Date |
|---|---|---|---|---|
| Bonus | 5000.00 | 2024-12-15 | once | |
| Raise | 200.00 | 2024-07-01 | bi-weekly |
Output Analysis
Key Metrics
- Total Interest Saved: Compared to minimum payments only
- Time to Debt Freedom: Months until all debts are paid
- Monthly Cash Flow: Available funds after payments and expenses
- Strategy Efficiency: Comparison across different approaches
Charts Included
- Individual Debt Progression: Track each debt balance over time
- Payment Breakdown: Principal vs interest by month
- Total Debt Reduction: Overall debt elimination progress
- Cash Flow Analysis: Income vs expenses vs payments
- Debt Payoff Timeline: Order and timing of debt elimination
- Extra Funds Utilization: Efficiency of extra payment allocation
API Usage
from src.excel_io.excel_reader import ExcelReader
from src.core.debt_optimizer import DebtOptimizer, OptimizationGoal
from src.excel_io.excel_writer import ExcelReportWriter
# Load data
reader = ExcelReader("my-debts.xlsx")
debts, income, expenses, future_income, future_expenses, settings = reader.read_all_data()
# Initialize optimizer
optimizer = DebtOptimizer(debts, income, expenses, future_income, future_expenses, settings)
# Run optimization
result = optimizer.optimize_debt_strategy(
goal=OptimizationGoal.MINIMIZE_INTEREST,
extra_payment=500.0
)
# Generate report
writer = ExcelReportWriter("analysis.xlsx")
debt_summary = optimizer.generate_debt_summary()
writer.create_comprehensive_report(result, debt_summary)
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Setup
git clone https://github.com/bryankemp/financial-debt-optimizer.git
cd financial-debt-optimizer
pip install -e .[dev]
Running Tests
pip install -e .[test]
pytest
License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Documentation
- Installation Guide - Detailed installation instructions
- Quick Start - Get started in minutes
- User Guide - Comprehensive usage documentation
- Examples - Real-world use cases and scenarios
- API Reference - Complete API documentation
- FAQ - Frequently asked questions
Support
- 📖 Documentation: https://financial-debt-optimizer.readthedocs.io/
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📧 Email: bryan@kempville.com
Changelog
See CHANGELOG.md for version history and changes.
Disclaimer
This tool is for educational and informational purposes only. It does not constitute financial advice. Always consult with qualified financial professionals for personalized guidance on debt management and financial planning.
Author: Bryan Kemp (bryan@kempville.com)
Version: 1.0.0
License: BSD 3-Clause
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file financial_debt_optimizer-1.3.0.tar.gz.
File metadata
- Download URL: financial_debt_optimizer-1.3.0.tar.gz
- Upload date:
- Size: 80.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e504a9b779d30d3ede9337ad5670ea0879f5a0defc060702dee558ea8a50b5b
|
|
| MD5 |
0ba9dbf275d16a5eb33ee6acc6cb8177
|
|
| BLAKE2b-256 |
e71fbb18cc923786475d42ec42029b70c182423cac41363e7a0f1837fa139b16
|
File details
Details for the file financial_debt_optimizer-1.3.0-py3-none-any.whl.
File metadata
- Download URL: financial_debt_optimizer-1.3.0-py3-none-any.whl
- Upload date:
- Size: 57.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
647a52e95de2aa96643c26649a92fe9ded379159d4ca27f25625854bb59078fb
|
|
| MD5 |
d330da1e0e5417bc4f32657a873ef6c5
|
|
| BLAKE2b-256 |
95f16e2db224a818d8a3fec15d69ef530f74272b18aec1a2f62be460972230e5
|