G'day Everyone. Delurking for a bit,
On Sun, Apr 29, 2001 at 07:28:27PM -0400, Kevin A. Foss wrote:
[snip]
> but Tiaacref.pm and several other of the reporting mechanisms don't
> return 'last', so if I change the first line above to 'price' or 'nav'
> f-q-h returns a closing price.
>
> I don't honestly know which is preferable -- NAV or price with regards
> to other securities. (Tiaacref only returns 1 number so they will
> always be equal). I also don't know how this is reflected back in
> gnucash if the values were actually loaded, or if they would be refused
> without a 'last' -- I didn't try.
"price" is the preferred field to use. All F::Q methods should
return a "price" field which is the most sensible indication
of current value. This can be the NAV, last traded price,
yield, and so on, depending upon what you're actually dealing with.
If you want to avoid price because sometimes it contains non-dollar
values such as percentage yields, then you might want to do
something like:
$value = $info{last} || $info{nav};
providing you with the NAV if a last traded price does not
exist.
Cheers,
Paul
--
Paul Fenwick <[EMAIL PROTECTED]> | "When I see an adult on a bicycle,
Senior Consultant | I have a hope for the human race."
Obsidian Consulting Group | -- H.G. Wells
PGP signature