Re: Stock/Commodities fee posting positions and cost basis
On Sat, May 9, 2020 at 3:48 PM John Wiegley wrote: > > > "o" == o1bigtenor writes: > > o> The example here you are putting the inside the transaction > o> information. Would you also use this technique in a currency exchange > o> transaction (transaction done in a different currency than the ledger's > o> 'base currency)? > > Sure. I also use the "lot note" to track wash sale adjustments to the cost > basis, and when I want to (personally) track a an option rollover, since to me > it's the continuation of an ongoing position but to my broker it's not. So I > might have: > > (387437466,W$128.99/364736412) > > I.e., this lot was opened in transaction 387437466, but its cost basis was > adjusted due to a wash sale in transaction 364736412. > > Since the contents of the lot note are entirely free form, you can afterwards > process this to create your own "audit trail" of a particular instrument, > without having to use a specially named account or anything. > Thanks - - - - the flexibility here is awesome. Keep on keeping on! -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf59xXOBRWy77PmZf1nfeg4u0UVwwFkyEOT6%2B8iPRc87jLg%40mail.gmail.com.
Re: Stock/Commodities fee posting positions and cost basis
> "o" == o1bigtenor writes: o> The example here you are putting the inside the transaction o> information. Would you also use this technique in a currency exchange o> transaction (transaction done in a different currency than the ledger's o> 'base currency)? Sure. I also use the "lot note" to track wash sale adjustments to the cost basis, and when I want to (personally) track a an option rollover, since to me it's the continuation of an ongoing position but to my broker it's not. So I might have: (387437466,W$128.99/364736412) I.e., this lot was opened in transaction 387437466, but its cost basis was adjusted due to a wash sale in transaction 364736412. Since the contents of the lot note are entirely free form, you can afterwards process this to create your own "audit trail" of a particular instrument, without having to use a specially named account or anything. John -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m2r1vsygvg.fsf%40newartisans.com.
Re: Stock/Commodities fee posting positions and cost basis
On Thu, May 7, 2020 at 11:07 PM John Wiegley wrote: > > > "JS" == Joel Swanson writes: > > JS> Does posting order affect stock or commodity cost basis in Ledger? > > JS> Is that really the desired behavior, where changing the order of postings > JS> changes the items for which ledger tracks lots? Does this have something > JS> to do with which postings are considered primary and secondary in a > JS> transaction with three or more postings? > > Yes, that is actually the reasoning. The first posting establishes the > secondary commodity, while the second is the primary. > > You can avoid this confusing by not using the auto-calculation logic, and > identifying your lots explicitly: > > 2004/05/01 Stock purchase > Expenses:Broker:Commissions$19.95 > Assets:Broker 50 AAPL {$30.00} [2004/05/01] > () @ $30.00 > Assets:Broker $-1,519.95 > > If you use this fully elaborated lot specification everywhere, then you'll > always know what Ledger is based its numbers on. Generally when I sell a > commodity I just copy the details from the opening transaction. > Mr John Have been thinking about this and where you have placed it in the layout of the transaction. To me this is not too dissimilar to 'different' currency transactions (items are purchased in a different than 'home' currency) when I want to track the costs of and in the transaction. I usually put the various 'rates' in the 'notes' files ( right after the payee line then the next line using the ; rate 234.15). The example here you are putting the inside the transaction information. Would you also use this technique in a currency exchange transaction (transaction done in a different currency than the ledger's 'base currency)? Regards -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf59e7F%3D32j3fQnriofJzbJKkoQoYPOZJ_fEf2k8-LaS%2B1Q%40mail.gmail.com.
Re: Stock/Commodities fee posting positions and cost basis
Thanks, John. That helps my understanding. Le vendredi 8 mai 2020 00:07:03 UTC-4, John Wiegley a écrit : > > > "JS" == Joel Swanson > writes: > > JS> Does posting order affect stock or commodity cost basis in Ledger? > > JS> Is that really the desired behavior, where changing the order of > postings > JS> changes the items for which ledger tracks lots? Does this have > something > JS> to do with which postings are considered primary and secondary in a > JS> transaction with three or more postings? > > Yes, that is actually the reasoning. The first posting establishes the > secondary commodity, while the second is the primary. > > You can avoid this confusing by not using the auto-calculation logic, and > identifying your lots explicitly: > > 2004/05/01 Stock purchase > Expenses:Broker:Commissions$19.95 > Assets:Broker 50 AAPL {$30.00} [2004/05/01] > () @ $30.00 > Assets:Broker $-1,519.95 > > If you use this fully elaborated lot specification everywhere, then you'll > always know what Ledger is based its numbers on. Generally when I sell a > commodity I just copy the details from the opening transaction. > > John > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/b9f5afd8-91c3-4579-9729-6fec1d151a59%40googlegroups.com.
Re: Stock/Commodities fee posting positions and cost basis
On Fri, May 8, 2020 at 7:18 PM John Wiegley wrote: > > > "o" == o1bigtenor writes: > > o> A semantical question - - - - AIUI what you are referring to in the above > o> is a 'stock' not a 'commodity' - - - yes? > > I guess I'm mixing Ledger terminology with market terminology. To Ledger, > everything is a commodity. But yes, in this particular case, the item we're > tracking is a stock. > Interesting - - - thanks. -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf58EGLWvOin7QfBP1_5HRY3_01dH4f8rHDyPQm1CN-Bijg%40mail.gmail.com.
Re: Stock/Commodities fee posting positions and cost basis
> "o" == o1bigtenor writes: o> A semantical question - - - - AIUI what you are referring to in the above o> is a 'stock' not a 'commodity' - - - yes? I guess I'm mixing Ledger terminology with market terminology. To Ledger, everything is a commodity. But yes, in this particular case, the item we're tracking is a stock. John -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m2wo5mj7b6.fsf%40newartisans.com.
Re: Stock/Commodities fee posting positions and cost basis
On Thu, May 7, 2020 at 11:07 PM John Wiegley wrote: > > > "JS" == Joel Swanson writes: > > JS> Does posting order affect stock or commodity cost basis in Ledger? > > JS> Is that really the desired behavior, where changing the order of postings > JS> changes the items for which ledger tracks lots? Does this have something > JS> to do with which postings are considered primary and secondary in a > JS> transaction with three or more postings? > > Yes, that is actually the reasoning. The first posting establishes the > secondary commodity, while the second is the primary. > > You can avoid this confusing by not using the auto-calculation logic, and > identifying your lots explicitly: > > 2004/05/01 Stock purchase > Expenses:Broker:Commissions$19.95 > Assets:Broker 50 AAPL {$30.00} [2004/05/01] > () @ $30.00 > Assets:Broker $-1,519.95 > > If you use this fully elaborated lot specification everywhere, then you'll > always know what Ledger is based its numbers on. Generally when I sell a > commodity I just copy the details from the opening transaction. > A semantical question - - - - AIUI what you are referring to in the above is a 'stock' not a 'commodity' - - - yes? Regards -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf58Sce7aFoDS21Y0hMBTHgYVypig1Y%2BQbCpWxpMUYfde4Q%40mail.gmail.com.
Re: Stock/Commodities fee posting positions and cost basis
> "JS" == Joel Swanson writes: JS> Does posting order affect stock or commodity cost basis in Ledger? JS> Is that really the desired behavior, where changing the order of postings JS> changes the items for which ledger tracks lots? Does this have something JS> to do with which postings are considered primary and secondary in a JS> transaction with three or more postings? Yes, that is actually the reasoning. The first posting establishes the secondary commodity, while the second is the primary. You can avoid this confusing by not using the auto-calculation logic, and identifying your lots explicitly: 2004/05/01 Stock purchase Expenses:Broker:Commissions$19.95 Assets:Broker 50 AAPL {$30.00} [2004/05/01] () @ $30.00 Assets:Broker $-1,519.95 If you use this fully elaborated lot specification everywhere, then you'll always know what Ledger is based its numbers on. Generally when I sell a commodity I just copy the details from the opening transaction. John -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m2k11n2hpe.fsf%40newartisans.com.
Stock/Commodities fee posting positions and cost basis
Hello ledger devs & users, Does posting order affect stock or commodity cost basis in Ledger? Looking at the first example in section 4.5.2 of the documentation[1], one finds this example: 2004/05/01 Stock purchase > Assets:Broker 50 AAPL @ $30.00 > Expenses:Broker:Commissions$19.95 > Assets:Broker $-1,519.95 > > Running a balance command with the '--lots' flag yields the expected AAPL @ $30.00 as follows, whether or not we specify "@ $30.00" in the AAPL purchase posting: $ ledger -f temp.ledger bal --lots >$-1,519.95 > 50 AAPL {$30.00} [2004-05-01] Assets:Broker > $19.95 Expenses:Broker:Commissions > >$-1,500.00 > 50 AAPL {$30.00} [2004-05-01] > > If the ledger journal lists the broker's commission first, as follows, the output is still the same as above, but only if we specify the "@ $30.00". 2004/05/01 Stock purchase > > Expenses:Broker:Commissions$19.95 > Assets:Broker 50 AAPL @ $30.00 > Assets:Broker $-1,519.95 > > Instead, if we run the following input 2004/05/01 Stock purchase > > Expenses:Broker:Commissions$19.95 > Assets:Broker 50 AAPL > Assets:Broker $-1,519.95 > > the output with the '--lots' flag will show $1500 in terms of AAPL shares: $ ledger -f temp.ledger bal --lots > $-1,519.95 {0.0333 AAPL} [2004-05-01] > 50 AAPL Assets:Broker > $19.95 {0.0333 AAPL} [2004-05-01] Expenses:Broker:Commissions > > $-1,500.00 {0.0333 AAPL} [2004-05-01] > 50 AAPL > > Is that really the desired behavior, where changing the order of postings changes the items for which ledger tracks lots? Does this have something to do with which postings are considered primary and secondary in a transaction with three or more postings? Additionally, the lot information isn't including the brokerage fee. Is there a way to include this in ledger's cost basis? Wouldn't the cost basis for these 50 shares of AAPL be $30.399, which includes the brokerage fee? Or would that violate ledger's principle of simply being a calculator and not forcing any particular accounting strategy on anyone? Thanks! FYI, I'm running Ledger 3.1.2-20190205. [1] https://www.ledger-cli.org/3.0/doc/ledger3.html#Buying-and-Selling-Stock -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/cc76740c-8b40-4588-ab66-67f2e43f0003%40googlegroups.com.