When you sell your holdings, you should specify which lot you want to sell
in the curly bracket. In your case, you should write the following.


2017-03-27 * "sell 20 shares of VGHCX"
  Assets:Investments:Fidelity:Roth:VGHCX                  -20 VGHCX{200
USD} @205 USD
  Assets:Investments:Fidelity:Roth


On Tue, Mar 28, 2017 at 12:04 PM, Andrew Sail <[email protected]> wrote:

> I'm receiving a strange error when trying to sell shares of an investment
> fund that I have previously purchased. Below is an example from my ledger,
> replaced with dummy data. In this example, I'm trying to buy 20 shares of
> the fund at $200/each, funded from my main account, and then sell them at
> $205/each (the sale is obviously just for the sake of my understanding of
> how to use the tool).
>
> 2017-01-01 * "buy 20 shares of VGHCX"
>   Assets:Investments:Fidelity:Roth:VGHCX                  20 VGHCX{200
> USD}
>   Assets:Investments:Fidelity:Roth                       -4000 USD
>
> 2017-03-27 * "sell 20 shares of VGHCX"
>   Assets:Investments:Fidelity:Roth:VGHCX                  -20 VGHCX{205
> USD}
>   Assets:Investments:Fidelity:Roth
>
> 2017-01-01 price VGHCX                              200.00 USD
> 2017-03-27 price VGHCX                              205.00 USD
>
> The error I receive is below.
>
> $ bean-check ledger.beancount
> /path/to/ledger.beancount:74:      No position matches
> "Posting(account='Assets:Investments:Fidelity:Roth:VGHCX', units=-20
> VGHCX, cost=CostSpec(number_per=Decimal('205.00'), number_total=None,
> currency='USD', date=None, label=None, merge=False), price=None, flag=None,
> meta={'filename': '/path/to/ledger.beancount', 'lineno': 75})" against
> balance (20 VGHCX {200 USD, 2017-01-01})
>
> This leads me to asking a few questions:
> 1) The obvious; what am I doing wrong? I simply want to sell the 20 shares
> of VGHCX at $205/share that I own and return the funds as USD to my main
> account (cash).
> 2) If I remove the sale, only my principal shows on my ledger, my
> investment's growth is not shown as a part of my net worth; is this
> correct, or is there a deeper rooted issue?
> 3) Should reporting price in my ledger impact my net worth and if not,
> where in bean-web or fava should I be able to refer to my growth for
> further analysis?
>
> Thank you in advance for your help!
>
> --
> 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/2e046181-afad-4010-8df3-63b97d399a2a%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/2e046181-afad-4010-8df3-63b97d399a2a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Yuchen Ying
https://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/CAFL5w3Xvrw96YYHYDOfFXyLK7daun9Enc7kYZjc9GVVvN7uwsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to