Track cost/value of external portfolio

76 views
Skip to first unread message

Patrick Ruckstuhl

unread,
Dec 16, 2019, 5:02:30 PM12/16/19
to Beancount
Hi,

I'm looking at how I can track an "external" portfolio in an easy way. With external I mean that I can add money to it and see it's current total value but not dig into the details of how it is invested.

For example:

today put 6000CHF into it, worth is 6000CHF

tomorrow total worth is 7000CHF and cost 6000CHF

day after put 500CHF into it, worth is now 7500CHF, cost 6500CHF

Is there a good way to track this? If possible I would like to reflect cost as cost and value as price but I don't see how that would work with the additional deposits.

Thanks and regards,
Patrick

Justus Pendleton

unread,
Dec 17, 2019, 11:50:52 PM12/17/19
to Beancount
On Tuesday, December 17, 2019 at 5:02:30 AM UTC+7, Patrick Ruckstuhl wrote:
I'm looking at how I can track an "external" portfolio in an easy way. With external I mean that I can add money to it and see it's current total value but not dig into the details of how it is invested.

I guess it depends on what you mean by "easy". It seems like you want to treat this "external portfolio" like a mutual fund. That means you'd need to synthesize shares and per-share prices all the time, which seems like it would be a big hassle. It might look something like this

option "operating_currency" "USD"
plugin "beancount.plugins.auto_accounts"
plugin "beancount.plugins.implicit_prices"

2019-12-01 * "Buy"
        Assets:Investments 1,000 FUND {6,000/1,000 CHF}
        Assets:Bank
       
;; next day the fund is worth 7,000CHF, so calculate the per-share price
2019-12-02 price FUND 7,000/1,000 CHF

;; the next assume the fund is now worth 7,500CHF
2019-12-03 * "Buy more"
        Assets:Investments (500/(7,500/1,000)) FUND {7,500/1,000 CHF}
        Assets:Bank
       
;; now you have 1,066.66 shares of FUND.
;; say the next day the total value of the fund is 8,500
;; calculate per-share price
2019-12-04 price FUND 8,500/1,066.66 CHF

;; assume the price portfolio is now 9,000 CHF
2019-12-05 * "Sell"
        Assets:Investments -1,000 FUND {2019-12-01}
        Assets:Bank (1,000/1,066.66)*9,000 CHF
        Income:CapitalGains

Martin Blais

unread,
Dec 25, 2019, 2:31:16 AM12/25/19
to Beancount
+1 to that
But when you buy, why not just buy shares of the FUND that are always
1 CHF's worth?
If you don't use implicit prices you will only see the prices from
your "price" directives.
Which BTW, you can compute by pulling the bottom line of your
quarterly statements (over your total contributed amount) or something
like that.
> --
> 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+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/a4596778-bb49-4de2-a1a0-ce1973c667fb%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages