Proposal: Add market(self, date) method to Inventory (
https://bitbucket.org/blais/beancount/src/c796e5e34b8fbd05862847ff809c1240130c59e0/src/python/beancount/core/inventory.py?at=default&fileviewer=file-view-default#inventory.py-68)
and add a switch somewhere in fava to toggle between cost and market values.

Background

Given the discussions in https://github.com/beancount/fava/issues/129 and
https://github.com/beancount/fava/issues/242, I think I understand the
problem enough to try to explain it.

Right now when we generate balances and charts, we always use the cost of
the inventory.  It is apparently the correct accounting method, but it also
doesn't change over time.  Currently the way to see commodities at cost is
to use something like the unrealized plugin (or my multi-month version of
it https://github.com/xentac/beancount-plugins-xentac).  Unfortunately this
isn't ideal.

The ideal situation, as Martin points out is to convert to market value at
a particular date instead of at cost.  The market method on Inventory would
have to take a date upon which to look up the nearest price in the price
db.  Perhaps the default could even be today's date, so you could just
render everything at today's value if you wanted (would work great for fava
balances).

There's one question I have though.  Would I have to create some sort of
Equity transaction that balanced out the transactions or is it enough to
consider market rates as "magical" value that's added only at
display/evaluation time?

I don't mind doing this work, I think I understand the problem well enough
to execute it.

Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAFFHUguzenTBz67QsGVOKOP%3DEK3mQ4OXa%2B5gL1MVaVOWC4agUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to