Budgeting with beancount?

4,151 views
Skip to first unread message

yegle

unread,
Mar 6, 2016, 10:45:55 AM3/6/16
to Beancount
Does anyone have experience using beancount as a budgeting tool? I'm currently using YNAB (youneedabudget.com) to manage my day to day expenses but wanting to explore the possibility of using beancount instead.

Things that I'd like to have in beancount (compare to YNAB):
1. Associate a transaction with a "category". E.g. a transcation from my Amex card to Safeway should be categorized as "grocery expense".
2. Set budget amount for each category every month. In the end of each month, if the remaining amount is negative for a category (over budgeted), I can choose between "subtract from next month's available to budget" and "subtract from next month's category budget".

To me #1 is the most wanted feature. It's possible to utilize the comment to do something like this:

2016-01-01 * "Safeway"
    Account:Amex:CC -10 USD
    Account:Budget:Grocery

Or

2016-01-01 * "Category: Grocery"
    Account:Amex:CC -10 USD
    Account:Safeway

But this way I can't record transactions like "I spent 10 USD from my Amex card to BestBuy as category Entertainment, the item I brought was Fallout4".

I'd also like to have some additional features but I can probably find workaround with the SQL or editor support
1. When entering a transaction, associate category automatically (e.g. a transaction to Safeway default to grocery category etc.)
2. Table showing all category budget and know which one is over budgeted.
3. List all unconfirmed transactions so I can reconcile each account. After reconcile, add a balance assertion automatically.
4. At the beginning of each month, set category budget based on out flow of last month/amount budgeted last month/average outflow of last 3 months etc.

--

ch...@gstaff.org

unread,
Mar 6, 2016, 3:21:53 PM3/6/16
to Beancount
Scroll down a few messages to the one titled: "[fava] Display budgets (#165)"

yegle

unread,
Mar 6, 2016, 3:31:33 PM3/6/16
to Beancount
Ah thanks, I'll add my 2cents in the issue tracker then.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/edddeb88-308d-448b-82c7-91193218b6b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Blais

unread,
Mar 6, 2016, 3:58:00 PM3/6/16
to Beancount
On Sun, Mar 6, 2016 at 7:45 AM, yegle <cny...@gmail.com> wrote:
Does anyone have experience using beancount as a budgeting tool? I'm currently using YNAB (youneedabudget.com) to manage my day to day expenses but wanting to explore the possibility of using beancount instead.

Things that I'd like to have in beancount (compare to YNAB):
1. Associate a transaction with a "category". E.g. a transcation from my Amex card to Safeway should be categorized as "grocery expense".

No.
The double-entry accounting method swallows the idea of categorization by reifying those categories into regular accounts.
What you're suggesting here only makes sense in the context of single-entry accounting, e.g. Quicken.
(more below)

 
2. Set budget amount for each category every month. In the end of each month, if the remaining amount is negative for a category (over budgeted), I can choose between "subtract from next month's available to budget" and "subtract from next month's category budget".

If you subtract the overflow from the current month into the next month, that's avoiding the budget in the first place. You don't need budgeting for that.    Budgets implicitly assume you reset every month.

If what you need is to simply report the difference between the actual expense per period against some allocated amount (e.g. (500-x) for each month where x is the expenses for that month) that's a new reporting feature, not a budgeting feature. You can probably do something with the SQL shell or by writing a script. (I should add the capability to subtract in the shell target values to support this, e.g., SELECT 500 - sum(position.units.number)


To me #1 is the most wanted feature. It's possible to utilize the comment to do something like this:

2016-01-01 * "Safeway"
    Account:Amex:CC -10 USD
    Account:Budget:Grocery

This is incorrect; what you should write is this:

2016-01-01 * "Safeway"
  Liabilities:Amex:CC -10 USD
  Expenses:Grocery

You simply need your budget to be a constraint on the "Expenses:Grocery" account, regardless of where the money came from to pay it, e.g. your Amex CC, cash, or otherwise.

(There is currently no constraint feature built-in to Beancount.)


Or

2016-01-01 * "Category: Grocery"
    Account:Amex:CC -10 USD
    Account:Safeway

Unless "Safeway" is a client - and I'll assume you mean the grocery store here - it's overkill to create a dedicated account for it. It should best belong to the payee/narration fields, as in your previous transaction.


But this way I can't record transactions like "I spent 10 USD from my Amex card to BestBuy as category Entertainment, the item I brought was Fallout4".

You have access to two distinct fields: payee & narration.


I'd also like to have some additional features but I can probably find workaround with the SQL or editor support
1. When entering a transaction, associate category automatically (e.g. a transaction to Safeway default to grocery category etc.)

I'm going to be adding a hook to bean-extract to allow you to post-process extracted transactions with custom code.
(As I've said numerous times before, I think the benefits of this feature are usually overestimated.)

 
2. Table showing all category budget and know which one is over budgeted.

You need to build a new report for this.

 
3. List all unconfirmed transactions so I can reconcile each account. After reconcile, add a balance assertion automatically.

What's an "unconfirmed transaction"? If you're referring to some custom workflow you're executing, you can already make use of the flag character on the transactions. In your importer config, you can change the default imported flag of your transactions to '!' or otherwise, here:

 
4. At the beginning of each month, set category budget based on out flow of last month/amount budgeted last month/average outflow of last 3 months etc.

--

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.

yegle

unread,
Mar 7, 2016, 4:57:09 PM3/7/16
to Beancount
Thanks Martin for your reply. Now I think understand why I made those wrong assumptions. The correct syntax for a transaction is:
YYYY-MM-DD [txn|Flag] [[Payee] Narration]
   [Flag] Account       Amount [{Cost}] [@ Price]
   [Flag] Account       Amount [{Cost}] [@ Price]




For more options, visit https://groups.google.com/d/optout.

Gour

unread,
Sep 9, 2017, 4:35:21 AM9/9/17
to bean...@googlegroups.com
On Sun, 6 Mar 2016 12:57:31 -0800
Martin Blais <bl...@furius.ca> wrote:

Hello,

> If what you need is to simply report the difference between the actual
> expense per period against some allocated amount (e.g. (500-x) for
> each month where x is the expenses for that month) that's a new
> reporting feature, not a budgeting feature. You can probably do
> something with the SQL shell or by writing a script. (I should add
> the capability to subtract in the shell target values to support
> this, e.g., SELECT 500 - sum(position.units.number)

budgeting is the only thing which (still) prevents me to decide using beancount
over (h)ledger and I realize that in regard to budgets I'm only interesting to
see report how the money is spent, eg. whether our expenses for Food, Fuel etc.
are within some pre-defined monthly limit or not and to be able to adjust
spendings accordingly per year, so I wonder what is the current situation in
Beancount in regard to this, iow. whether the current set of features does
enable the above mentioned solution for budgeting?


Sincerely,
Gour

--
But for one who takes pleasure in the self, whose human life
is one of self-realization, and who is satisfied in the self only,
fully satiated — for him there is no duty.


Martin Blais

unread,
Sep 9, 2017, 6:12:57 PM9/9/17
to Beancount
On Sat, Sep 9, 2017 at 10:35 AM, Gour <go...@atmarama.com> wrote:
On Sun, 6 Mar 2016 12:57:31 -0800
Martin Blais <bl...@furius.ca> wrote:

Hello,

> If what you need is to simply report the difference between the actual
> expense per period against some allocated amount (e.g. (500-x) for
> each month where x is the expenses for that month) that's a new
> reporting feature, not a budgeting feature. You can probably do
> something with the SQL shell or by writing a script. (I should add
> the capability to subtract in the shell target values to support
> this, e.g., SELECT 500 - sum(position.units.number)

budgeting is the only thing which (still) prevents me to decide using beancount
over (h)ledger and I realize that in regard to budgets I'm only interesting to
see report how the money is spent, eg. whether our expenses for Food, Fuel etc.
are within some pre-defined monthly limit or not and to be able to adjust
spendings accordingly per year, so I wonder what is the current situation in
Beancount in regard to this, iow. whether the current set of features does
enable the above mentioned solution for budgeting?

Situation: 
- Me not really that interested (I don't need it)
- I do have opinions and think it should be done via a language of constraints on max account value or changes fo them (but what does it matter if I don't implement it)
- Fava people have already done work on this, see what they've done, they're the ones innovating on this.

(Note: I'm unlikely to spend much time doing any major feature changes like this over the next many many months, all free bandwidth is redirected to machine learning since I got a role in the research dept, there's so much meat there I have little time for anything else.)

Sincerely (from the South of France on vacay while sipping rose' in the sun),




Sincerely,
Gour

--
But for one who takes pleasure in the self, whose human life
is one of self-realization, and who is satisfied in the self only,
fully satiated — for him there is no duty.
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.

Gour

unread,
Sep 13, 2017, 11:06:21 AM9/13/17
to bean...@googlegroups.com
On Sun, 10 Sep 2017 00:12:34 +0200
Martin Blais <bl...@furius.ca> wrote:

> (Note: I'm unlikely to spend much time doing any major feature
> changes like this over the next many many months, all free bandwidth
> is redirected to machine learning since I got a role in the research
> dept, there's so much meat there I have little time for anything
> else.)

Thank a lot for your reply...

> Sincerely (from the South of France on vacay while sipping rose' in
> the sun),

and wishing you to have a nice time!


Sincerely,
Gour

--
Just try to learn the truth by approaching a spiritual master.
Inquire from him submissively and render service unto him.
The self-realized souls can impart knowledge unto you because
they have seen the truth.


Gour

unread,
Dec 25, 2017, 12:53:05 PM12/25/17
to bean...@googlegroups.com
On Sun, 10 Sep 2017 00:12:34 +0200
Martin Blais <bl...@furius.ca> wrote:

> - Me not really that interested (I don't need it)
> - I do have opinions and think it should be done via a language of
> constraints on max account value or changes fo them (but what does it
> matter if I don't implement it)
> - Fava people have already done work on this, see what they've done,
> they're the ones innovating on this.

Let me just say that Fava's implementation is not sufficient for my needs and
after reading the following article: "Budgeting and forecasting"
(http://hledger.org/budgeting-and-forecasting.html) it was deciding factor to
finally migrate from Gnucash to hledger.

In my case, I need Envelope budget and Forecasting features as described
above...


Sincerely,
Gour

--
One who is not disturbed in mind even amidst the threefold
miseries or elated when there is happiness, and who is free
from attachment, fear and anger, is called a sage of steady mind.


Reply all
Reply to author
Forward
0 new messages