Your examples made it clear, thanks to the both of you! For the sake of completeness, here is an example inspired by synthcurrency2.beancount, including an attempt to track fees: https://gist.github.com/anonymous/ff6d859bbf614cdbfeea970b2862f8c3 (unfortunately could not attach a file replying from the groups.google.com interface).
Shares are sold at market price to cover the fees, like the example in this thread <https://groups.google.com/d/msg/beancount/2OJUsIU4nz0/TpEIaDhBBgAJ>: 2017-04-30 price FUND 1.0575 USD ;; Sell 3.00 USD worth of FUND shares (at market price) ;; 2.836879432624113475177304965 * 1.0575 = 3.00 2017-04-30 * "Fees" Assets:Bank:IRA:FUND -2.836879432624113475177304965 FUND {1.0575 USD} Expenses:Fees 3.00 USD As mentioned in the thread, the account's booking method has to be set to "NONE". On Sunday, October 1, 2017 at 1:22:00 AM UTC+3, Martin Blais wrote: > > Here's (in attachment) another way, more similar to what Metin did, > whereby the number of shares of FUND match the cost basis (they're always > added at 1.00 USD). > The price adjusts for the market value. > I think it's more appropriate to use the cost basis over currency > transactions. > > Both ways can work I think. > > > > > On Sat, Sep 30, 2017 at 5:15 PM, Metin Akat <[email protected] > <javascript:>> wrote: > >> Sorry the transaction on 2017-10-01 should be: >> >> 2017-10-01 * "Retirement account" >> Assets:Investments:Retirement 10 RETIREMENT @ 1 USD >> Income:Salary:Retirement -10 USD >> >> On Sun, Oct 1, 2017 at 12:14 AM, Metin Akat <[email protected] >> <javascript:>> wrote: >> >>> Hi, >>> >>> I think Martin means something like this (or at least I'd do something >>> like this, though I haven't given it a lot of thought): >>> >>> 2017-09-01 * "Retirement account" >>> Assets:Investments:Retirement 10 RETIREMENT @ 1 USD >>> Income:Salary:Retirement -10 USD >>> >>> By this point you'll see that the balance is 11 Dollars so you input >>> this directive: >>> 2017-09-30 price RETIREMENT 1.1 USD >>> >>> 2017-10-01 * "Retirement account" >>> Assets:Investments:Retirement 10 RETIREMENT @ 1 USD >>> Income:Salary:Retirement -10 RETIREMENT @ 1 USD >>> >>> By this point you see that the balance is 21.50, so you input this: >>> >>> 2017-10-30 price RETIREMENT 1.075 USD >>> >>> By this method, in reports you'll be able to see both "book value" (how >>> much you have invested) and "market value" (how much it's worth at any >>> point of time) of the account. >>> >>> >>> I hope this helps, >>> Metin >>> >>> >>> >>> On Sat, Sep 30, 2017 at 2:01 PM, <[email protected] <javascript:>> >>> wrote: >>> >>>> Hi Martin, thank you very much for your response. >>>> >>>> Although I'm familiar with the individual terms & concepts (read the >>>> vast majority of the >>>> project's documentation), I haven't been able to put the pieces of the >>>> method you described together. >>>> Would you be able to provide a brief example of how it might work? >>>> >>>> On Saturday, September 30, 2017 at 3:41:14 AM UTC+3, Martin Blais wrote: >>>> >>>>> On Fri, Sep 29, 2017 at 10:31 AM, <[email protected]> wrote: >>>>> >>>>>> First of all, thank you for this excellent project. >>>>>> >>>>> >>>>> Thanks John. >>>>> >>>>> >>>>> I have a retirement account to which my company and myself contribute >>>>>> with every paycheck. There is little control over investments in this >>>>>> account. One can choose a generic asset allocation from a pre-defined >>>>>> list, >>>>>> and contributions are automatically invested. There are no shares or >>>>>> prices, only a balance that fluctuates due to contributions and >>>>>> investment >>>>>> profit and loss. >>>>>> >>>>>> Due to the lack of transparency in this account I'm not quite sure >>>>>> how to track it. A naive way might be to track the balance of the >>>>>> account >>>>>> using its base currency, adjusting the balance according to periodic >>>>>> statements: >>>>>> >>>>>> 2017-01-01 open Assets:Bank:Checking USD >>>>>> 2017-01-01 open Assets:Bank:IRA USD >>>>>> 2017-01-01 open Income:Bank:IRA:PnL USD >>>>>> 2017-01-01 open Income:Company:Salary USD >>>>>> 2017-01-01 open Income:Company:IRA USD >>>>>> >>>>>> 2017-01-01 * "Payroll" >>>>>> Assets:Bank:Checking 900.00 USD >>>>>> Income:Company:Salary -900.00 USD >>>>>> Assets:Bank:IRA 100.00 USD >>>>>> Income:Company:IRA -100.00 USD >>>>>> >>>>>> ; Adjust IRA balance according to quarterly statement >>>>>> 2017-03-31 pad Assets:Bank:IRA Income:Bank:IRA:PnL >>>>>> 2017-04-01 balance Assets:Bank:IRA 110.00 USD >>>>>> >>>>>> As far as I can tell this method would be sufficient for my current >>>>>> needs (tracking the account's balance, profit and loss). However, I >>>>>> wonder >>>>>> if there's a better way to track this sort of account? >>>>>> >>>>> >>>>> I wouldn't do it this way, as this realizes the P/L. >>>>> >>>>> I think the way I'd handle this situation is by using a fake commodity >>>>> for shares. In order to compute the price of this synthetic commodity, >>>>> I'd >>>>> just work back the price of this commodity by looking at your reported >>>>> account balance against how much cash you put in it (the cost basis). At >>>>> any point in time, Beancount allows you to compute the cost basis and the >>>>> broker provides the current market value. The price of those "shares", at >>>>> that time, is market value / cost basis, and you would input that in when >>>>> you want data points. When you make a contribution, ideally you would >>>>> compute the price at that point in time and divide the cash by that >>>>> price, >>>>> in order to adjust the number of shares. It's a little bit backwards, >>>>> but >>>>> at least it would allow you to compute returns. >>>>> >>>>> -- >>>> 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] <javascript:>. >>>> To post to this group, send email to [email protected] >>>> <javascript:>. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/beancount/bbd1dc6f-5618-4ac9-8b20-1eacaf3ff2fb%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/beancount/bbd1dc6f-5618-4ac9-8b20-1eacaf3ff2fb%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beancount/CAEk80bm-95ZP9hSoXh%3DFAVGD-1f2zog8Aqyu8ggcE%3Dz3VEOTMw%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/beancount/CAEk80bm-95ZP9hSoXh%3DFAVGD-1f2zog8Aqyu8ggcE%3Dz3VEOTMw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/5b215d03-5bd6-4a60-bf86-e6b4bd8de3fe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
