127.0.0.1:8000 budget / master
master

Tree @master (Download .tar.gz)

Budgeting software thats hopefully better than an excel spreadsheet

Goal:
Create an at a glance budget visualization that can evaluate the feasibility of spending

Data values:
Current amount of money in account
Current amount of money in savings

Components:
A graph with 3 lines.
Red line is the absolute minimum amount of money required at any given time to get by. It is created by adding up all the withdrawal events that occur before an income event
Blue line is the current amount of money. Its value will go down with known withdrawal events
Green line is the value of the savings account. The red line is generated by summing the actual value of the red line assuming zero savings with the current savings account
Each line is extended into the future by X amount based on known upcoming withdrawals and income

Withdrawal events
A user can view existing as well as add new withdrawal events
A withdrawal event consists of:

1. A dollar amount
2. Reccurring information (monthly, yearly, on what day, or day of week, or maybe it doesn't recur at all)
3. A type (utility, credit card payment, loan repayment, subscription, wishlist item, savings contribution)
4. A name

A savings contribution withdrawal event has a special effect such that it contributes to a separate savings quantity
It is also unique in that the dollar amount is distributed daily up until the withdrawal day
Note that this is different from a savings account contribution where we just put away a chunk of income into a savings buffer
savings events are displayed on the graph in a unique random color that is sufficiently different from the standard red green and blue color (maybe pastel color palet)

Income events
Same as withdrawals, but money goes in

So how do you use this whole thing??
Adding withdrawal events for recurring bills and whatnot will generate the red line on the graph
The blue line will be static (with a starting value of however much money is in your account) until you add income events
If you get a paycheck every 2 weeks the blue line will splike twice a month in the graph and then go down incrementally as known withdrawals occur

If there is more money going in than out then the blue line will move further and further away from the red line over time. This is a sign that you have a lot of disposable income
In a highly effective budget the blue line should follow the red line as closely as possible while the savings cointribution is set to as high of a number as possible (savings going up will push the red line up as well since it is the sum of savings + withdrawals)

Ok, so I want to go on a vacation in lets say 3 years. Can I? Yes! The budget of the vacation needs to be estimated individually, but then it can simply be entered as a whthdrawal savings event that is 3 years in the future. Lets assume a budget of 10k for the vacation. The red line will have a constant increase in slope equal to the amount of money that would need to be saved every day in order to break even on the upcoming large withdrawal. As long as the blue line is kept above the red line up until the vacation happens, then you can afford it

# Budget thoughts

Red line starts from present day -> but next year and calculates backwards.
The calculation is slope of income vs slope of incoming recurring spending

If the lines ever cross, incoming is coming in slower than spending for a long enough time that spending will overtake it (debt)
Savings values are added as a slope to the red line after it is calculated based on withdrawals. Savings have a constant slope that starts at 0 (upon creating a savings goal) and ends at the savings value on the due date. Fro that the slope can be calculated and values added for each day of red slope. Savings values should be added such that the blue line maintains an average slope equal to the red line (distance Y between red and blue line should be as constant as possible).
This distance is found in a calculation that takes in all distances between the red and blue lines and makes them all an average (that cannot exceed a certain minimum buffer). The average is the added / subtracted from the real value of each day distance between red and blue lines to create a savings withdrawal event. Savings withdrawal events are recalculated for each meaningful change in the budget (large credit card purchase for example) a meaningful change is defined by an change in the blue slope that is significant enough to cause a distance between the red and blue lines (on any day) to fall outside a delta constant (maybe +/- 10% of distance?)
Then the entire set of future savings goals is recalculated based on the new blue line.
This approach makes it so that the savings goals aren't recalculated constantly for small purchases / unexpected income