Achievement unlocked.

206 views
Skip to first unread message

Martin Blais

unread,
May 8, 2016, 6:25:41 PM5/8/16
to Beancount
Big progress on the long awaited 'booking' branch today, I'm really excited about this:
I managed to implement automatic, working FIFO and LIFO booking methods on my gigantic personal file!
This means that for the very first time I'm able to process my personal ledger entirely with the new code, and so I'll begin using that exclusively.

I'm not ready for unveiling yet, but this is the culmination of a fair amount of changes.
The 'booking' branch will bring many features useful for investing:
- The original acquisition dates will be kept on all lots (already working)
- Many lot reduction methods will be supported: strict identification (like now), FIFO, LIFO, average cost, etc. (done except for average cost).
- It will be possible to easily extract and report all trades carried out within a period.
- The interpolation will be significantly more powerful (also already done).

I know a few of you are waiting on the average cost booking.
It shouldn't be too hard to implement it on top.
I'll work on that very next.

Jason Chu

unread,
May 8, 2016, 7:38:52 PM5/8/16
to Beancount

Huzzah! Super exciting to hear.


--
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/CAK21%2BhN-LQyjZEb5H%3D6A36VgpB9ua04u5f_ay%2Bjp-xzT6GBNHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Alok Parlikar

unread,
May 8, 2016, 11:17:50 PM5/8/16
to Beancount
Awesomme!!

yegle

unread,
May 8, 2016, 11:45:34 PM5/8/16
to Beancount
Awesome, thank you Martin for your work!

--
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.

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



--

Simon Michael

unread,
May 11, 2016, 12:06:32 PM5/11/16
to bean...@googlegroups.com
Congrats! Sounds good.

yegle

unread,
Jul 18, 2016, 3:10:39 AM7/18/16
to Beancount
Martin, I saw the booking branch has been merged into default. Is average cost booking implemented? Where can I find the document for this feature?

Thank you!

--
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.

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

Martin Blais

unread,
Jul 19, 2016, 1:03:31 AM7/19/16
to Beancount
Everything but that, unfortunately. The default branch contains both the old method and the new one right now, as you correctly point out, but the old method is selected by default. Turning on the new method has vastly improved interpolation powers as well as FIFO, LIFO automatic booking methods. However, AVERAGE is not implemented yet.  If you want to turn on the new method, you'll have to also set either FIFO or LIFO to ensure that booking on accounts with NONE booking method are quiet.

This is how I run Beancount these days, like this:

option "experiment_booking_algorithm" "FULL"
option "booking_method" "FIFO"

I'm not ready to unleash this as "official" just yet though. Use at your own risk. I plan to make this the default when I have AVERAGE completed and working well.



Martin Blais

unread,
Jul 19, 2016, 9:14:36 AM7/19/16
to Beancount
On Tue, Jul 19, 2016 at 1:03 AM, Martin Blais <bl...@furius.ca> wrote:
to ensure that booking on accounts with NONE booking method are quiet.

I'm sorry I think I made a mistake in this explanation. Scratch just that bit. 

The reason for having to make the default booking method "FIFO" or "LIFO" is not because of the accounts with "NONE" booking, those actually work as previously, but rather, because of the fact that with the new method, individual lots will _always_ carry a date and will not be merged automatically (as in the old method, where if you don't specify an explicit date on an augmentation the lot doesn't carry one), and lot specifications, e.g. {101.23 USD}, now become partial match specifications, that is, two lots with the same cost 101.23 USD but with different lot dates will both match {101.23 USD} and need to be disambiguated. In the old method, because the lots didn't carry a date (again, unless when you create one you'd specify a date) those were merged and didn't require disambiguation.

That's the real reason why in the new method if you want your old file to work you possibly have to select a default booking method which allows resolving ambiguities (FIFO or LIFO). 

Note that it's most likely that most people won't have problems with leaving the default as STRICT. The issue occurs for me because in one account I have many lots of a bond fond whose price is always 10 CAD, and in the new method all these lots are individual because all lots now carry their acquisition date, and sales of those resolve to many individual lots. The AVERAGE booking method - not implemented in full - will be another way to deal with those, but for now, having FIFO do it's job works as well.

Also note that all lots carrying their acquisition date through time is a really useful feature, because it'll allow us to generate reports of sales and to figure out whether the sale has long or short term tax implications, and will allow dealing with wash sales without having to do hacks (you can see this hack by diff'ing the "carry_date_and_book_cost" branch, which is intended for deletion).

Anyhow... I didn't make the announcement because I didn't want to have to explain all this just yet and it may not make sense to those unfamiliar with how the inventory booking process works (it would help if I finished the doc). I hope this makes at least some sense to you.

(Everything else is accurate.)
Reply all
Reply to author
Forward
0 new messages