A simple budget projection tool.
The project as a whole, including this readme, is still very much a work in progress!
budgie uses its own Bill
class to organize its data.
Each Bill
represents an adjustment to current balance, whether recurring or not.
Bill
s are specified in bills.csv
, one per line.
Attributes and rules of each Bill
are separated by commas.
The first three attributes must always be present, and must always be in the right order:
- Name.
This can be anything, and doesn't even have to be unique.
A
Bill
's name is only for your own reference. - Value.
How much of an adjustment to make.
Should be negative for a debit and positive for a credit.
Positive values can be, but do have to be, preceded by a
+
. Negative values have to be preceded by a-
. budgie is currency-agnostic, and assumes you specify everyBill
in the same currency. Currency symbols or designators should not be supplied. - Date.
The date that the
Bill
is first valid. Must be specified asYYYY-MM-DD
, where month and day are always two digits (09
, not9
).
There are several optional rules which may be specified, and their order does not matter:
every N days
: Specifies that theBill
should be repeated everyN
days after the first occurrence specified above.every N months
: Specifies that theBill
should be repeated everyN
months after the first occurrence specified above. Note that this does take month length into account; aBill
with this attribute will always repeat on the same day of eachN
th month. The behavior of aBill
with this attribute with a day 29, 30, or 31 is currently undefined.occurs N times
: Specifies that theBill
should occur at mostN
times. Without this specification, theBill
repeats indefinitely (assuming that anevery
attribute is specified).repeat N times
: Specifies that theBill
should repeat at mostN
times. Similar to theoccurs
rule, but specifies number of repeats after the first application - sorepeat 3 times
causes the bill to be applied 4 times total.until YYYY-MM-DD
: Specifies that theBill
should not be repeated past the given date. This does not guarantee that theBill
is applied on the given date.distribution X Y Z
: Specifies that theBill
should be distributed across the discretionary, emergency, and living balances as given byX
,Y
, andZ
, respectively. If unspecified, the default isdistribution 0 0 100
- theBill
is applied entirely to the living balance. The three numbers should add to 100.actual
: Specifies that theBill
represents an actual transaction, as opposed to a projected transaction. ActualBill
s are applied regardless of what date they occur on.projected
: Specifies that theBill
represents one or more projected transactions. ProjectedBill
s are not applied at dates that are in the past.Bill
s are projected by default (but seePROJECTED_BY_DEFAULT
insettings.py
).
budgie splits balance into three categories: discretionary, emergency, and living.
By default, all Bill
s are applied entirely to the living balance.
If the distribution
rule is never set for any Bill
, the living balance is the only balance that will change under normal circumstances.
If discretionary balance goes negative, nothing special happens.
If living or emergency balances go negative, the deficit is instead withdrawn from the discretionary balance.
For instance, if the living balance is 200 and discretionary is 20, and a Bill
is applied which subtracts 300 from living,
then living is set to 0 while discretionary goes to -80.
Initial balance, 2000, 2019-07-22, distribution 20 30 50
This Bill
is applied only once.
Because its value is positive, it is a credit.
Its distribution
splits it into 20% discretionary, 50% emergency, and 30% living.
An initial balance should always be supplied, or budgie assumes that the initial balance is zero.
Initial balance should be an actual
Bill
, so that it is applied even if it is in the past.
Paycheck, +450, 2019-07-28, every 14 days, distribution 20 10 70
This Bill
is a credit applied biweekly.
Paycheck, 453.22, 2019-07-28, actual, distribution 20 10 70
Paycheck, 437.29, 2019-08-11, actual, distribution 20 10 70
These Bill
s are the actual
instances of the above Paycheck Bill
.
Since the recurring Bill
is not actual
, it will not be applied at dates in the past.
These two actual
Bill
s will be applied instead, and they also contain exact values whereas the recurring Bill
only provides an estimated value.
Rent, -725, 2019-06-13, every 1 month
This Bill
is applied on the 13th of every month, starting with June 2019.
Because neither until
nor occurs
is specified, it will repeat indefinitely.
Rent paid, -723.57, 2019-06-13, actual
This Bill
is applied only once.
If both this Bill
and the previous are in the same file, and the current date is past 2019-06-13
, then the first Bill
is not applied at 2019-06-13
, because it is only a projection.
This latter Bill
, on the other hand, is applied regardless.
Cell data plan for old phone (cancelling in September), -50.00, 2019-06-30, every 1 month, until 2019-09-25
This Bill
is applied monthly, but will not be applied after 2019-09-25
.
This means the last valid date for this Bill
is actually 2019-08-30
.
Weekly installments, -12.50, 2019-07-25, every 7 days, repeat 10 times
This Bill
is applied weekly, and expires after repeating 10 times.
This means that the Bill
is applied a total of 11 times.
Video streaming service, -15.00, 2019-08-01, every 30 days, distribution 100 0 0
This Bill
is applied every 30 days, which means it will not necessarily be on the first of each month.
The distribution
is specified, which in this case indicates that it is entirely discretionary.
Lorem ipsum, -30, 2019-07-15, every 1 day, until 2019-07-31, occurs 10 times
This Bill
is applied daily, and expires after 10 applications.
If both until
and occurs
are specified, the Bill
expires after either limit is reached - in this case, the number of repeats.