Dear all,
I am in a (long...) process of setting up my new beancount ledger, based on 
2 years of gnucash accounting history.
Finally, I want to integrate my VTI holdings to my ledger, and I could not 
so far figure out how I use bean-price to get current market prices and 
according net worth (or come up with an unrealized PnL):


;; -*- mode: org; mode: beancount; coding: utf-8; fill-column: 400; -*-
option "operating_currency" "USD"
plugin "beancount.plugins.unrealized" "PnL"

; initiate VTI (=Fund) commodity
1970-01-01 commodity VTI
    name: "VTI"
    price: "USD:yahoo/VTI"

; open USD, VTI & PnL Accounts
1970-01-01 open Assets:VTI  VTI
1970-01-01 open Assets:VTI:PnL  USD
1970-01-01 open Assets:Cash  USD

; open the money press
1970-01-01 open Equity:Opening-Balance:USD  USD

; give me some toy-money
2018-12-31 pad Assets:Cash Equity:Opening-Balance:USD 
2019-01-01 balance Assets:Cash               10000.00 USD 

;Some VTI we bough a while ago
2019-07-11 * "Buying some VTI for test purpose"
  Assets:VTI               10 VTI {           152.83 USD}
  Assets:Cash   

; now, what's my current net worth? I.E. what's my PnL?

>bean-price test.beancount -v
INFO    : Using price cache at "/tmp/bean-price.cache" (with indefinite 
expiration)
INFO    : Processing at date: 2019-11-19
INFO    : Loading "test.beancount"
<unrealized_gains>:0:       A valid price for VTI/USD could not be found

2019-11-19 price VTI                                158.69 USD


How can I get the current price of VTI into beancount/ my fava statements? 
How to get a PnL based on the current price? Thanks alot!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/95c8add0-8da0-48bb-843e-36d41c32e2ad%40googlegroups.com.

Reply via email to