Heyall,
I got encuraged to post my beancount questions here. here they are!
1. fetching prices
1.1 technical implementation
I already learnt about the PnL in beancount. I now want to know my today’s net worth based on ETFs i boought earlier. a minimal example is
;; -- 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?
I do know that there is bean-price, and i can get it working:
$ 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 do I get the current price of VTI into my balance statement without hardcoding the numbers?
[auto-answer] ok i found out now you can do
bean-price test.beancount >> test.beancount
which redirects the output of bean-price (which is already in the correct beancoount syntax) to the end of your ledger file. next question: fetching weekly prices fromthe last 3 years^^
[edit] someone told me that i have to manually insert the stdout from bean-price to my ledger file. is this true? how would I outomate this? must be something like append…
[edit2] I found out now that, in order to get quotes based on an lodger file via
bean-price stash.beancount
one needs to have bought some. using pad and balance alone is not sufficient to make bean-price look up the quotes. now it’s like
$ bean-price stach.beancount
INFO : Fetching: VBR (time: None)
INFO : Fetching: VSS (time: None)
INFO : Fetching: VTI (time: None)
INFO : Fetching: VWO (time: None)
INFO : Fetching: VXF (time: None)
2019-11-20 price VBR 133.40 USD
2019-11-20 price VSS 107.51 USD
2019-11-20 price VTI 158.60 USD
2019-11-20 price VWO 42.43 USD
2019-11-20 price VXF 122.61 USD
2019-11-20 price VXUS 54.04 USD
awesome!
1.2 getting VIAC’s CSIF tickers
looks like the CSIF funds are not listed on yahoo, or at least i could not finde them. with google down and yahoo not listing, does anyone have some ways to fetch those prices? I am referring to
CSIF SMI
CSIF SPE extra
CSIF all World ex CH
CSIF all World ex CH Small
CSIF Emerging markets
CSIF Real estate CH
2. workflow
maybe this is a bit early to ask^^ up to now (that is 4 weeks or so) i do most edits manually in a text editor. so far, this is not at all superior to my GUI-workflow with th Gnucash GUI. Anyone in here can describe their typical workflow maybe make a screen video or such, to let me see how to efficiently work with beancount?
3. File (re-) organisation
converting my 2 years of GnuCash to Beanconut got me some 6000 lines of code. mostly the openings on top and all transactions chronologically afterwards. From the documentation i saw Martin proposes grouping by type rather than date. How do you handle this? what works best for you?
4. Importing postfinance, DKB and IB
maybe I also should ask this a little later since i have not really tried myself. I saw the available DKB importer and reading through it made me confident to be able to translate it to postfinance.however if anyone already did this… Then, again, I am not yet aware of the workflow. would I call the importer on a downloaded csv-statement, recieve a text and append it to my ledger, is this how it works? a minimal example would really help me:
- a test csv file
- the commands to be used / steps to be done
- the result displayed
Someone proposed beans (not beancount), but installing Nix & Stack gave me hell, so I dont pursue thisanymore^^
Thank you for your help!