> On Aug 17, 2015, at 5:36 AM, John Ralls <[email protected]> wrote:
>
>
>> On Aug 12, 2015, at 2:13 PM, John Ralls <[email protected]> wrote:
>> It might help to consider what the price db is used for: Aside from
>> providing a default rate in the transfer dialog, it’s used for pricing
>> assets in the Accounts page and the summary bar — only the latest entry is
>> used there. It’s used for calculating values in reports, where the reports
>> can use a weighted average, nearest in time, most recent, or average cost. I
>> need to look to see if the average cost actually looks at the buy
>> transactions or if it does something similar to nearest in time and at
>> weighted average to see what it’s averaging and how it’s weighting the
>> averaged values. Depending on what those two are doing might drive whether
>> multiple F::Q entries per day make sense, assuming that the algorithms make
>> sense.
>
> OK, I’ve looked. They don’t use the price db, which is what one would expect.
> Weighted-average is weighted by the transaction size, which will be distorted
> by stock splits but is otherwise OK.
The Advanced Portfolio report uses the Price DB to get the current value of a
holding. There is an option to use a transaction price instead, but the
default is to use the Price DB. The only Price DB options it supports are
"latest" and "nearest in time". If you ask it to use a transaction price (or
if it can't find a price in the Price DB) it uses the most recent transaction
which defines a price that can be converted to the report's currency.
I can't speak for other reports. I'm out of town and don't have easy access to
the source code.
Mike
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel