Matthew: This is not a bug, but rather a choice I made a while ago that
instead of silently ignoring the unrealized gains if you didn't provide
some price information, to warn about it instead:
https://bitbucket.org/blais/beancount/src/tip/src/python/beancount/plugins/unrealized.py?fileviewer=file-view-default#unrealized.py-89

If you prefer I could simply ignore the error here and skip the addition of
an unrealized gain. Let me know if you think this is sensible. (Personally
I think it's more sensible for you to provide an estimate price value for
your home, every year, based on comparables.)


On Thu, Oct 13, 2016 at 5:15 PM, Jason Chu <xen...@gmail.com> wrote:

> I had to use the add_implicit_prices plugin (https://bitbucket.org/blais/
> beancount/src/5e2dcbfc81b15cfbaa9d743ee87d8f4f26eaf0cb/src/python/
> beancount/plugins/implicit_prices.py?at=default&
> fileviewer=file-view-default) to turn entries like these into prices.
>

This will work too.
Unless you have some really tight and automated way to create your price
entries, this should probably be welcome in everyone's file (I'm using it).

Note: If you do this, make sure you put the implicit_prices plugin _before_
the unrealized_gains one, so it creates the price directives before the
check from the unrealized gains plugin.

I hope this helps,



You should try out my unrealized_periodic plugin (https://github.com/xentac/
> beancount-plugins-xentac).  Instead of a single transaction, I create
> monthly transactions tracking gains over time.  It uses the same
> calculation code, it's just an extension to remove the old unrealized
> amount and add the new unrealized amount in the same transaction each
> month.  I like it because it better represents gains over time.  Ideally it
> would update gains every time the price changes, but that leads to too many
> transactions and the plugin goes really slowly.
>
> On Thu, Oct 13, 2016 at 1:11 PM Matthew Harris <mharris...@gmail.com>
> wrote:
>
>> Hi, Martin. I know you claimed to have eliminated a bunch of "a valid
>> price for … could not be found" errors from the unrealized gains plugin a
>> year ago, but I'm still getting a bunch of them in my file. It's so many
>> that I'm not even sure where to begin.
>>
>> Okay, here's one that should be easy. It's not my common case, but it's
>> easy to isolate because I only have one transaction with it:
>>
>> ;; -*- mode: org; mode: beancount; coding: utf-8 -*-
>>
>> option "operating_currency" "USD"
>> plugin "beancount.plugins.auto_accounts"
>> plugin "beancount.plugins.unrealized" "Unrealized"
>>
>> 2005-05-24 * "Home Purchase"
>>   Assets:Home  1 HOUSE {100000.00 USD}
>>   Liabilities:Mortgage
>>
>>
>> When I run bean-query on this file, I get
>>
>> <unrealized_gains>:0:       A valid price for HOUSE/USD could not be found
>>
>>
>> Am I expressing this transaction correctly, and is it a bug that I'm
>> still seeing this error?
>>
>> --
>> 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 beancount+unsubscr...@googlegroups.com.
>> To post to this group, send email to beancount@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/beancount/27f70f8b-694d-4f0e-bece-bf84c45904f9%40googlegroups.com
>> <https://groups.google.com/d/msgid/beancount/27f70f8b-694d-4f0e-bece-bf84c45904f9%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 beancount+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beancount/CAFFHUgscsNwrnZhSDHGS34_QeEBy3NFfjo0rz%3Dxo130usRG0hQ%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAFFHUgscsNwrnZhSDHGS34_QeEBy3NFfjo0rz%3Dxo130usRG0hQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOZsCB6utNPr6AwEjNhGaikN1LBVSuztkWy%2B1Hntj67Hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to