debt_optimizer.core.debt_optimizer module
Module documentation for debt_optimizer.py.
This module is part of the Financial Debt Optimizer project.
- class debt_optimizer.core.debt_optimizer.OptimizationGoal(value)[source]
Bases:
EnumAvailable optimization goals.
- MINIMIZE_INTEREST = 'minimize_interest'
- MINIMIZE_TIME = 'minimize_time'
- MAXIMIZE_CASHFLOW = 'maximize_cashflow'
- class debt_optimizer.core.debt_optimizer.PaymentStrategy(value)[source]
Bases:
EnumAvailable payment strategies.
- AVALANCHE = 'debt_avalanche'
- SNOWBALL = 'debt_snowball'
- HYBRID = 'hybrid'
- CUSTOM = 'custom'
- class debt_optimizer.core.debt_optimizer.DecisionLogEntry(timestamp, month, decision_type, description, rationale, impact, data_snapshot)[source]
Bases:
objectIndividual decision log entry tracking priority changes and rationale.
- Parameters:
- class debt_optimizer.core.debt_optimizer.MonthlyExtraFunds(month, date, total_income, required_minimums, recurring_expenses, available_extra, allocated_extra, remaining_extra, allocation_decisions)[source]
Bases:
objectTrack extra funds available and their allocation for each month.
- Parameters:
- __init__(month, date, total_income, required_minimums, recurring_expenses, available_extra, allocated_extra, remaining_extra, allocation_decisions)
- class debt_optimizer.core.debt_optimizer.OptimizationResult(strategy, goal, total_interest_paid, total_months_to_freedom, monthly_cash_flow_improvement, payment_schedule, monthly_summary, debt_progression, savings_vs_minimum, decision_log, monthly_extra_funds)[source]
Bases:
objectResults from debt optimization analysis.
- Parameters:
strategy (str)
goal (str)
total_interest_paid (float)
total_months_to_freedom (int)
monthly_cash_flow_improvement (float)
payment_schedule (pandas.DataFrame)
monthly_summary (pandas.DataFrame)
debt_progression (pandas.DataFrame)
decision_log (List[DecisionLogEntry])
monthly_extra_funds (List[MonthlyExtraFunds])
-
decision_log:
List[DecisionLogEntry]
-
monthly_extra_funds:
List[MonthlyExtraFunds]
- __init__(strategy, goal, total_interest_paid, total_months_to_freedom, monthly_cash_flow_improvement, payment_schedule, monthly_summary, debt_progression, savings_vs_minimum, decision_log, monthly_extra_funds)
- Parameters:
strategy (str)
goal (str)
total_interest_paid (float)
total_months_to_freedom (int)
monthly_cash_flow_improvement (float)
payment_schedule (pandas.DataFrame)
monthly_summary (pandas.DataFrame)
debt_progression (pandas.DataFrame)
decision_log (List[DecisionLogEntry])
monthly_extra_funds (List[MonthlyExtraFunds])
- Return type:
None
- class debt_optimizer.core.debt_optimizer.DebtPaymentPlan(debt_name, current_balance, monthly_payment, months_to_payoff, total_interest, payoff_order)[source]
Bases:
objectIndividual debt payment plan.
- Parameters:
- class debt_optimizer.core.debt_optimizer.DebtOptimizer(debts, income_sources, recurring_expenses=None, future_income=None, future_expenses=None, settings=None)[source]
Bases:
objectMain debt optimization engine.
- Parameters:
- __init__(debts, income_sources, recurring_expenses=None, future_income=None, future_expenses=None, settings=None)[source]
Initialize the debt optimizer with debts, income, expenses, and future income.
- calculate_available_extra_payment(additional_extra=0.0)[source]
Calculate available extra payment amount.
- log_decision(decision_type, description, rationale, impact, data_snapshot=None)[source]
Log a decision for audit trail and learning purposes.
- track_monthly_extra_funds(month, date_val, total_income, required_minimums, recurring_expenses, available_extra, allocated_extra, allocation_decisions)[source]
Track extra funds and their allocation for each month.
- optimize_debt_strategy(goal=OptimizationGoal.MINIMIZE_INTEREST, extra_payment=0.0)[source]
Find the optimal debt repayment strategy based on the specified goal.
- Return type:
- Parameters:
goal (OptimizationGoal)
extra_payment (float)