Stock splits

117 views
Skip to first unread message

Martin Blais

unread,
Sep 13, 2020, 12:44:18 AM9/13/20
to Beancount
Right now, Beancount does nothing about stock splits (nor does it know about them either).

You either (a) keep the same symbol and have a discontinuity in the price series, or (b) switch to a new symbol and have two sets of prices. I've been tending toward (a) in recent years, but in the past had used (b) -- the extra symbol bothers me. Hasn't been much of a problem so far (though I invest mostly in baskets so I only have relatively few of them).

The price fetchers return adjusted prices for historical prices. For example, if you fetch a historical price for day X before a split, the price returned for day X will be different if you fetch it before or after the split (you have to be careful with that). It's not pretty and could lead to errors. Even with correct recording of prices on the split date it could be tricky, e.g., a trade that posts the day before a split and settles a day after it.

I haven't been too concerned with errors around split dates before, but now with my recent work on computing returns, I'm having to pay a bit more attention to that, and as I'm adding price plots I'm finding some small errors in my input file if I look for info around splits.

Has anyone done some thinking around how they'd like to see stock splits handled?
Obviously we cannot change the numbers in the input file itself, but I'm curious to hear if people have expectations or some clear idea about what they'd like to see in a PTA system.

Some quickly jotted down ideas:
- Checking for discontinuity in the price series to highlight errors (as a script, probably).
- Adding explicit directives to record split information, and requiring price directives on that date.
- Internally associating version numbers with price points based on splits and having operations on them which take those into account.

Not so sure how to go about it yet, I'm just starting to look into this.

Martin Blais

unread,
Sep 13, 2020, 2:02:45 AM9/13/20
to Beancount

Simon

unread,
Sep 15, 2020, 8:34:06 PM9/15/20
to Beancount
Hi Martin, 
Long-time lurker, first-time poster... I added some comments to the document as a starting point - hope I did it right!

I have a decent amount of experience with the treatment of corporate actions - would love to contribute. 

Kind regards,
Simon

Martin Blais

unread,
Sep 16, 2020, 10:45:11 PM9/16/20
to Beancount
Thanks, will respond in the doc

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/beancount/2312f29d-baef-45cb-8007-ea46172445b4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages