On 23 Apr 2000 23:17:26 CDT, the world broke into rejoicing as
Rob Browning <[EMAIL PROTECTED]> said:
>
> OK, I wanted to figure out and document how to properly handle a stock
> split.
>
> Given a stock split, I can see that the stock register has an action
> field of Split, but I'm not sure what you're supposed to do with it.
>
> Some of the simple-minded ways I could think of to handle the split
> don't seem quite right. You don't really want to retro-actively edit
> the original purchase since you want to maintain the historical
> record, and you don't want to record the split as a sale and immediate
> repurchase of double the stock at half the price since each
> purchase/sale is a taxable event as far as short/long term
> capital-gains are concerned.
>
> It looks like we may need special case handling for transactions with
> action "split". A stock split doesn't really seem like a double-entry
> event. I'll go see what the engine does.
>
> Thoughts?
You're surely right about the split not indicating a fresh event from a
cost point of view.
A purchase/resale is _certainly not_ an appropriate thing to record
under the circumstance of a split, as no sale has taken place.
Given freedom to choose a way of representing this, I'd think the
Right Way to be to have, for the stock, an indication of splits that
have taken place, in much the same way that prices are tracked.
Prices get tracked via having a sequence of elements that are tuples
combining (Stock, Date, Price).
In similar manner, I'd have a "split table" like the Prices, with
tuples (Stock, Date, Multiplier).
So, if RHAT splits 2 ways on April 1, 1999, and then again splits 3 ways
on July 1, 2000, there would be two entries:
("RHAT" "1999-04-01" 2)
("RHAT" "2000-07-01" 3)
The effect is that in order to compute the present number of shares,
at date TODAY, for a stock purchase of RHAT on date THEN, that you'd
look up the splits between THEN and TODAY, and multiply them together,
along with the number of shares on date THEN, to get the number of
shares that exist TODAY.
Sadly, this Makes Life More Complicated, adding a further data structure,
and a mandatory calculation which imposes itself into stock activities.
Nonetheless, it ought not to be _overly_ imposing; it would be entirely
sensible to have a function to handle this, looking like:
(split-multiplier "RHAT" startdate enddate)
which might, with the data suggested above, return values 1, 2, 3, or 6,
depending on the dates.
--
"I think fish is nice, but then I think that rain is wet, so who am I
to judge?" -- Ruler of the Universe, HHGTTG
[EMAIL PROTECTED] - <http://www.hex.net/~cbbrowne/lsf.html>
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]