(Apologies for the delay, I don't respond to OSS projects during work
hours. More below.)

On Thu, May 26, 2016 at 12:20 PM, yegle <[email protected]> wrote:

> Yes it makes sense to have different price in cost_spec/price_annotation
> when selling, where in buying/acquiring it should match right?
>

In most cases, yes, but not necessarily. The cost basis you carry the lot
can be different from the price of the underlying asset. For example,
commission & fees incurred in buying may be included in the cost basis, or
if for whatever reason you got a discount on whatever you bought..

(I'll admit I don't yet have a good story on automating that calculation
yet, so all my purchases have no price on them either.)


Is it reasonable to add a check here that for buying/acquiring the two
> prices should match?
>

Not in the general case, but if you'd like to constrain or protect your
input further, you can easily do this validation in a plugin.


Or even make the price_annotation invalid syntax for buying/acquiring?
>

Not at the syntax level, because it may be useful in the future, and
inserting an implicit price directive which differs from the cost of
purchase still makes sense.






On Wed, May 25, 2016 at 10:16 PM, Martin Blais <[email protected]> wrote:
>
>> That's on purpose.
>> Think about it it makes a lot of sense...
>> Check out the trading document for an example of a sale with a capital
>> gain and you'll see why.
>>
>> Price only matters for currency conversions. For sales the cash proceeds
>> contain the same information.
>>
>> Offline now otherwise I'd type it right here.
>> On May 26, 2016 01:01, "yegle" <[email protected]> wrote:
>>
>>> It seems like beancount allow cost_spec and price_annotation to be
>>> different, e.g.
>>>
>>> 2016-01-01 *
>>>     Assets:One 1 SOMETHING {100 USD, 2016-01-01} @200 USD
>>>     Assets:Two -100 USD
>>>
>>> Also it's weird that the balance is checked using the price in
>>> cost_spec, not the one in price_annotation.
>>>
>>> --
>>> Yuchen Ying
>>> http://about.me/yegle
>>>
>>> --
>>> 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/CAFL5w3WAA5FKcKe1KmOBO6pOTkX%3DgFZNAf9SsT%3DajDp6tG%3D6Ew%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/beancount/CAFL5w3WAA5FKcKe1KmOBO6pOTkX%3DgFZNAf9SsT%3DajDp6tG%3D6Ew%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 [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/CAK21%2BhOsdg2xWH5YD6kZPTDNQKOboSPFEohVPh94cgPeEJLP%2BQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhOsdg2xWH5YD6kZPTDNQKOboSPFEohVPh94cgPeEJLP%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Yuchen Ying
> http://about.me/yegle
>
> --
> 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/CAFL5w3WMr%2BEpSZr62zsSUHyYS9fRTUTapd_AyeRmTDJuub4jrw%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAFL5w3WMr%2BEpSZr62zsSUHyYS9fRTUTapd_AyeRmTDJuub4jrw%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 [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/CAK21%2BhOKkvL%2BWck%3DmDT_nbQO6-%2B8rcCNdmhXEHfQS4myj3DkPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to