Proposal for modifying gnucash to use exact quantities]

Steven Murdoch sjmurdoch@linuxfan.com
Wed, 26 Jul 2000 18:07:36 +0100


 Richard Wackerbarth wrote:
 >
 > On Tue, 25 Jul 2000, Terry wrote:
 > > Actually - yes - the stock are purchased through dividend
re-investment.
 > > The dividend is computed to 1/1,000 USD (stock total is carried on
their
 > > books to 1/1,000 and the dividend is computed to 1/1,000 USD per
stock
 > > unit.) Thus the transaction value in USD is computed to 1/1,000
USD. They
 > > then purchase additional stock to 1/1,000 stock at the total value
computed
 > > in 1/1,000 USD. The whole transaction is carried out "on the
books", no
 > > cash changes hands, but the transaction value is computed to
1/1,000 and
 > > that is the smallest unit of the transaction that is accounted for.
Granted
 > > if I sold the stock, I would be paid to within 1/100 USD. But the
dividend
 > > reinvestment is done to 1/1,000 USD.
 > I don't think so. Rather than computing a dividend to the mill and
shares
 > from that, I suspect that they either compute "exact" dividend
shares/share
 > and round that to milli-shares and then compute the value to the
penny or
 > they compute the dividend to the penny and then convert that into
fractional
 > shares.
 >
 > I would be very interested in seeing a real example that contradicts
my
 > hypothesis.
 I use Gnucash to track my shares, and in the UK shares are quoted in
1/4
 of a pence, but in every source I have seen they are listed to 2
decimal
 places (in pence).
 I happen to have a prime number of shares, so I often have fractions
 when I am calculating the total worth of my investment. I also have a
 share investment fund  with the same company which I represent with an
 equity account, when I buy shares money is transfered from my dealing
 account to the precision of 2 decimal places of a penny (i.e. GBP
 1/10,000). For this to be represented with no chance of rounding errors
 the quantity of shares should be an integer, price an integer number of
 1/10,000 of GBP and value should either be calculated as an integer
 numebr of 1/10,000 GBP.
 
 In none of my applications I need rational numbers though, as
everything
 can be represented exactly in fixed decimal point notation. The only
 case I could forsee this would be if one could buy 1/3 of something or
 if prices were quoted as 1/3 of a dollar (or other currency unit).
 If rational numbers are indeed not required then the implementation of
 the library would be simplified and more importantly the integration
 into Gnucash would be easier. This isn't a flame, I am just curious to
 see if there are situations in finance where rational numbers are used,
 as opposed to fixed decimal point.


-- 
Steven Murdoch.
email: sjmurdoch@linuxfan.com
web: http://www.bigfoot.com/~murdomania/
PGP Keys: http://www.bigfoot.com/~murdomania/contact.htm
Geek Code: http://www.bigfoot.com/~murdomania/geek.htm