Stock Splits

64 views
Skip to first unread message

Alen Šiljak

unread,
May 3, 2019, 10:39:09 AM5/3/19
to Beancount
I've just gone through the Stock Splits section of Trading with Beancount document. Based on the info there, which may be outdated, there is no way to refer to exact lots.

However, other docs do list the option to use dates in the lot spec { price, date }, similar to what ledger does. I've tried this approach in the following way:


As a result, both bean-report and fava seem to show the correct info. Fava reports the lot acquisition date to be May 1 and July 1, not September 1, when the stock split occurred.



Could someone confirm that this is correct? I'm not sure how to list the lots via command-line. Tried a few bean-report commands but did not see the date info in the report.
If this is correct, I'd like to add it to the Stock Split section of the documentation.
I need to adjust a few such records after conversion so I would like to know the best way to do this.

Alen Šiljak

unread,
May 3, 2019, 10:42:48 AM5/3/19
to Beancount
bean-report <file> ledger

option seems to ignore the date info completely for the lots. Meaning that the export would not be accurate. The lot information would be based only on the cost, which is incomplete.

Alen Šiljak

unread,
May 3, 2019, 10:48:43 AM5/3/19
to Beancount
bean-report export_holdings shows


I'm not sure where it gets the May 1, 2019 from. This was run on May 3, and May 1, 2017 is used for the first lot.
Not sure if this is a bug or a part of the OFX spec.

Martin Michlmayr

unread,
May 3, 2019, 10:49:10 AM5/3/19
to bean...@googlegroups.com
* Alen Šiljak <alen....@gmx.com> [2019-05-03 07:42]:
The ledger export is quite basic. You can enhance it.

--
Martin Michlmayr
https://www.cyrius.com/

Alen Šiljak

unread,
May 3, 2019, 10:54:43 AM5/3/19
to Beancount
As soon as I figure out how to see the info. :)

But yes, that's something I'd be looking to do in order to be able to use the benefits or reports offered by the other apps.

Martin Blais

unread,
May 3, 2019, 10:02:17 PM5/3/19
to Beancount
Lots all exist in the internal data structure maintained by Beancount (beancount.core.inventory.Inventory), and you should be able to export them.
Lots of the same currency, cost basis and purchase date do get merged automatically, but if you need to disambiguate them you can insert an optional unique label into the cost on purchase.
You can then use that same label to specify a lot to reduce when you sell.


--
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/7b3d0781-39d0-4e9f-a77d-a9d2407ddf6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages