reports and prices [Patch] reworked advanced-portfolio.scm
Andrew Sackville-West
andrew at farwestbilliards.com
Sun Feb 19 16:56:38 EST 2006
On Sun, 19 Feb 2006 14:43:14 -0700
Mark Johnson <mrj001 at shaw.ca> wrote:
> Derek Atkins wrote:
>
> > Quoting Andrew Sackville-West <andrew at farwestbilliards.com>:
> >
> >> On Sun, 19 Feb 2006 12:20:42 -0800
> >> Andrew Sackville-West <andrew at farwestbilliards.com> wrote:
> >>
> >>> <<snipped>>
> >>>
> >>> I've done some more testing using different options for price source
> >>> and whether to show gains or not and the report, as currently modified
> >>> in my tree shows no difference between these various settings. I need
> >>> to go back to an earlier version of this report and see how it behaves.
> >>
> >>
> >> I've done some testing with the original version of the report and
> >> afaict its not working properly either.
> >>
> >> I have an account with a purchase of fakestock on 2/8/06 at 12.35 a
> >> share, ten shares. then I have a pricedb entry same day that reflects
> >> this. Then I entered another purchase of 10 shares at $15.00 a share
> >> two days later. Regardless of the report settings, it always reports
> >> incorrect information. It reports 20 shares at $12.35 price and shows
> >> total value of $248.50 (20*12.35) total money in at 273.50 (123.50 +
> >> 150) and a negative gain (-6.xx% i think). Well, this is plain wrong
> >> and the report should be able to pick up that price change from the
> >> purchase two days later and should show a positive gain because I have
> >> shares purchased at a lower price than current value. Am I right in
> >> this assessment?
> >
> >
> > IMHO, yes, this assessment is correct.
>
> Agreed. On the bright side:
> 1. It is consistently using transactions as the source of cost
> information, AND
> 2. using the pricedb as the source of current value.
It should IMO also use transactions for current value and make a
decision as to which is more accurate, or closer in date to the report
date. but only use buy or sell transactions as those are the only ones
that provide a "price".
>
> These two things are, I believe, the correct behaviour. The question
> comes back to automatically creating a pricedb entry for a buy and sell,
> which looks to be a reasonable thing to do. The caveat is that not all
> stock transactions should create a pricedb entry.
>
> Two options:
> 1. Perhaps, one could have a dialog asking the user (with a check box
> for "don't ask again" and an Edit->Preferences check box for this).
> 2. Those transactions that are "buy" or "sell" could automatically
> create a pricedb entry. Those that are a conversion from another stock
> or a transfer between stock accounts should not.
>
> Additional thought would have to be given to transactions such as stock
> splits or consolidations that change the number of shares (and therefore
> the price), but not the cost basis.
yes yes and yes but, one thing at a time ;). my poor little brain can
only take so much!!
when I get back to working on this (couple days probably), I'll see if
I can generalize the value of the stock so that it can use both
properly. I'll ignore the currency conversion for now as that seems to
be another monster altogether. Once I get reliable results for value,
then I can look into that.
Cheers
A
>
> >
> >> A
> >
> >
> > -derek
> >
> Mark
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060219/6ff17427/attachment.bin
More information about the gnucash-devel
mailing list