+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.
On Tue, Dec 17, 2019 at 11:50 PM Justus Pendleton <[email protected]> wrote: > > 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 > > -- > 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/a4596778-bb49-4de2-a1a0-ce1973c667fb%40googlegroups.com. -- 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/CAK21%2BhPPmc%2BqLqEgOvUF7c_an4zE%2BYkH4mwJxirZc2oCYpZXhQ%40mail.gmail.com.
