Brian Lalor wrote:
you'd then have to go back and adjust every single historical price in your ledger (for me that would be hundreds of entries). to me the ledger is a record of historical events so i don't want to adjust them if i don't have a reason for doing it. also i want the entry in the ledger to accurately reflect what i have filed with the taxes at that time. i do have an importer which will scan and adjust for splits and keep track of the various lots as a double check, but once the transaction is generated i don't go back and adjust it unless there is some kind of error. fin > --Apple-Mail=_F40F4563-9452-4905-A295-73E327557528 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; charset="UTF-8" > > Alright, I see. Thank you. > > If it=E2=80=99s not already obvious, I=E2=80=99m quite na=C3=AFve about tra= > ding. Given that most (if not all?) historical price records seem to have b= > een retroactively updated for all cumulative splits (ie https://finance.yah= > oo.com/quote/NVDA/ shows the 2024-02-14 closing price as 73.90 USD), is the= > re any reason not to just update the original transaction in my ledger? =20 > >=E2=80=94=20 > Brian Lalor (he/him) > [email protected] > >> On Jun 22, 2024, at 9:34=E2=80=AFPM, Martin Blais <[email protected]> wrote= >: >>=20 >> 2024-06-02 * "NVDA 10:1 stock split" "" >> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} >> Assets:Stocks:NVDA 2*10 NVDA {733.09/10 USD} >>=20 >> You don't realize gains on a split >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> On Sat, Jun 22, 2024 at 8:42=E2=80=AFPM Brian Lalor <[email protected] <m= > ailto:[email protected]>> wrote: >>> Like this? >>>=20 >>> 2024-06-02 * "NVDA 10:1 stock split" "" >>> Assets:Stocks:NVDA = > -2 NVDA {733.09 USD, 2024-02-14} >>> Assets:Stocks:NVDA = > 20 NVDA {109.633 USD} >>>=20 >>> But that doesn=E2=80=99t balance. >>>=20 >>> =E2=80=94=20 >>> Brian Lalor (he/him) >>> [email protected] <mailto:[email protected]> >>>=20 >>>> On Jun 22, 2024, at 8:16=E2=80=AFPM, Martin Blais <[email protected] <mai= > lto:[email protected]>> wrote: >>>>=20 >>>> You bought your NVDA at 733.09 not 1096.33, that's what you have to pro= > vide in the cost for the -2 leg. >>>> The docs are correct. >>>>=20 >>>>=20 >>>> On Sat, Jun 22, 2024 at 5:32=E2=80=AFPM Brian Lalor <[email protected] = ><mailto:[email protected]>> wrote: >>>>> I know this has been discussed a few times, but the docs are still inc= > orrect and I=E2=80=99m unable to find a complete example. I=E2=80=99m usin= > g beancount v2 because Fava=E2=80=99s not been updated for v3, yet. >>>>>=20 >>>>> NVDA recently split 10:1. I previously purchased 2 shares: >>>>>=20 >>>>> option "operating_currency" "USD" >>>>>=20 >>>>> 2024-02-14 open Equity:Opening-Balances = > USD >>>>>=20 >>>>> 2024-02-14 open Assets:Cash = > USD >>>>> 2024-02-14 pad Assets:Cash Equity:Opening-Balances >>>>>=20 >>>>> 2024-02-14 open Assets:Stocks:NVDA = > NVDA >>>>> 2024-02-14 commodity NVDA >>>>>=20 >>>>> 2024-02-14 * "Buying some NVDA" "" >>>>> Assets:Stocks:NVDA = > 2.00 NVDA {733.09 USD} >>>>> Assets:Cash >>>>>=20 >>>>> 2024-05-31 balance Assets:Stocks:NVDA = > 2 NVDA >>>>> 2024-05-31 balance Assets:Cash = > 0.00 USD >>>>>=20 >>>>> The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and= > my Fidelity account confirms that I have 20 shares. Per the docs[1], I wo= > uld do (I think): >>>>>=20 >>>>> 2024-06-02 * "NVDA 10:1 stock split" "" >>>>> Assets:Stocks:NVDA = > -2 NVDA {1,096.33 USD} >>>>> Assets:Stocks:NVDA = > 50 NVDA {109.633 USD} >>>>>=20 >>>>> bean-check fails, however: >>>>>=20 >>>>> nvidia_split.beancount:24: No position matches "Posting(account= >=3D'Assets:Stocks:NVDA', units=3D-2 NVDA, cost=3DCostSpec(number_per=3DDeci= > mal('1096.33'), number_total=3DNone, currency=3D'USD', date=3DNone, label= >=3DNone, merge=3DFalse), price=3DNone, flag=3DNone, meta=3D{'filename': 'nv= > idia_split.beancount', 'lineno': 29})" against balance (2.00 NVDA {733.09 U= > SD, 2024-02-14}) >>>>>=20 >>>>> Explicitly using the lot in that transaction fails, too: >>>>>=20 >>>>> 2024-06-02 * "NVDA 10:1 stock split" "" >>>>> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD >>>>> Assets:Stocks:NVDA 20 NVDA {109.633 USD} >>>>>=20 >>>>> The error is: >>>>>=20 >>>>> nvidia_split.beancount:24: Transaction does not balance: (726.480= > 0 USD) >>>>>=20 >>>>> 2024-06-02 * "NVDA 10:1 stock split" "" >>>>> Assets:Stocks:NVDA -2.00 NVDA {733.09 USD, 2024-02-14} @ 1096.33= > USD >>>>> Assets:Stocks:NVDA 20 NVDA {109.633 USD, 2024-06-02} >>>>>=20 >>>>> So it seems the price of 1096.33 is being ignored and I=E2=80=99m tryi= > ng to purchase 20 shares at 109.633 USD using 2*733.09 USD and the =E2=80= >=9Cgain=E2=80=9D of 363.24 USD per share is being lost. >>>>>=20 >>>>> What is the proper way to reflect a stock split? >>>>>=20 >>>>> Thanks, >>>>> Brian >>>>>=20 >>>>> [1]: https://beancount.github.io/docs/trading_with_beancount.html#stoc= > k-splits >>>>> =E2=80=94=20 >>>>> Brian Lalor (he/him) >>>>> [email protected] <mailto:[email protected]> >>>>>=20 >>>>> --=20 >>>>> You received this message because you are subscribed to the Google Gro= > ups "Beancount" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send= > an email to [email protected] <mailto:beancount%2Buns= > [email protected]>. >>>>> To view this discussion on the web visit https://groups.google.com/d/m= > sgid/beancount/C9EBE17D-A95F-4018-B979-59831C301DFB%40bravo5.org. >>>>=20 >>>>=20 >>>> --=20 >>>> You received this message because you are subscribed to the Google Grou= > ps "Beancount" group. >>>> To unsubscribe from this group and stop receiving emails from it, send = > an email to [email protected] <mailto:beancount+unsubs= > [email protected]>. >>>> To view this discussion on the web visit https://groups.google.com/d/ms= > gid/beancount/CAK21%2BhMXg654ZmD8N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP80kQQ%4= > 0mail.gmail.com <https://groups.google.com/d/msgid/beancount/CAK21%2BhMXg65= > 4ZmD8N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP80kQQ%40mail.gmail.com?utm_medium= >=3Demail&utm_source=3Dfooter>. >>>=20 >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Group= > s "Beancount" group. >>> To unsubscribe from this group and stop receiving emails from it, send a= > n email to [email protected] <mailto:beancount+unsubsc= > [email protected]>. >>> To view this discussion on the web visit https://groups.google.com/d/msg= > id/beancount/EBF195B5-FA6C-476B-9925-0DADC70FADA2%40bravo5.org <https://gro= > ups.google.com/d/msgid/beancount/EBF195B5-FA6C-476B-9925-0DADC70FADA2%40bra= > vo5.org?utm_medium=3Demail&utm_source=3Dfooter>. >>=20 >>=20 >> --=20 >> 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] <mailto:beancount+unsubscr= > [email protected]>. >> To view this discussion on the web visit https://groups.google.com/d/msgi= > d/beancount/CAK21%2BhNGvUFRtQmK9jskoGCPidmahv6aOf_hpqTHmZGYYsEvPA%40mail.gm= > ail.com <https://groups.google.com/d/msgid/beancount/CAK21%2BhNGvUFRtQmK9js= > koGCPidmahv6aOf_hpqTHmZGYYsEvPA%40mail.gmail.com?utm_medium=3Demail&utm_sou= > rce=3Dfooter>. > > --=20 > 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 e= > mail to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/msgid/= > beancount/CAF6E8D1-6E0B-47F4-A9B6-E77C1C18AD69%40bravo5.org. > > --Apple-Mail=_F40F4563-9452-4905-A295-73E327557528 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/html; charset="UTF-8" > ><html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset= >=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; -webkit-nbsp-mod= > e: space; line-break: after-white-space;">Alright, I see. Thank you.<= > div><br></div><div>If it=E2=80=99s not already obvious, I=E2=80=99m quite n= > a=C3=AFve about trading. Given that most (if not all?) historical price rec= > ords seem to have been retroactively updated for all cumulative splits (ie&= > nbsp;<a href=3D"https://finance.yahoo.com/quote/NVDA/">https://finance.yaho= > o.com/quote/NVDA/</a> shows the 2024-02-14 closing price as 73.90 USD)= > , is there any reason not to just update the original transaction in my led= > ger? </div><div><br id=3D"lineBreakAtBeginningOfMessage"><div> ><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: star= > t; text-indent: 0px; text-transform: none; white-space: normal; word-spacin= > g: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp= > -mode: space; line-break: after-white-space;"><div style=3D"color: rgb(0, 0= > , 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-tra= > nsform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-w= > idth: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: aft= > er-white-space;">=E2=80=94 <div>Brian Lalor (he/him)</div><div>blalor@= > bravo5.org</div></div></div> ></div> ><div><br><blockquote type=3D"cite"><div>On Jun 22, 2024, at 9:34=E2=80=AFPM= > , Martin Blais <[email protected]> wrote:</div><br class=3D"Apple-inter= > change-newline"><div><div dir=3D"ltr"><div class=3D"gmail_default" style=3D= > "font-family:arial,sans-serif;font-size:small">2024-06-02 * "NVDA 10:1 stoc= > k split" ""<br> Assets:Stocks:NVDA -2 NVDA {733.= > 09 USD, 2024-02-14}<br> Assets:Stocks:NVDA 2*10 = > NVDA {733.09/10 USD}<br><br>You don't realize gains on a split</div><div cl= > ass=3D"gmail_default" style=3D"font-family:arial,sans-serif;font-size:small= > "><br></div><div class=3D"gmail_default" style=3D"font-family:arial,sans-se= > rif;font-size:small"><br></div><div class=3D"gmail_default" style=3D"font-f= > amily:arial,sans-serif;font-size:small"><br></div><div class=3D"gmail_defau= > lt" style=3D"font-family:arial,sans-serif;font-size:small"><br></div><div c= > lass=3D"gmail_default" style=3D"font-family:arial,sans-serif;font-size:smal= > l"><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D= > "gmail_attr">On Sat, Jun 22, 2024 at 8:42=E2=80=AFPM Brian Lalor <<a hre= > f=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></div><b= > lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le= > ft:1px solid rgb(204,204,204);padding-left:1ex"><div>Like this?<div><br></d= > iv><blockquote style=3D"margin:0px 0px 0px 40px;border:none;padding:0px"><d= > iv><div>2024-06-02 * "NVDA 10:1 stock split" ""</div></div><div><div> = > Assets:Stocks:NVDA = > &nbs= > p; -2 NVDA {= > 733.09 USD, 2024-02-14}</div></div><div><div> Assets:Stocks:NV= > DA &n= > bsp; = > 20 NVDA {109.633 USD}</div></div>= ></blockquote><div><div><br></div><div>But that doesn=E2=80=99t balance.</di= > v><div><br></div><div> ><div style=3D"letter-spacing: normal; text-align: start; text-indent: 0px; = > text-transform: none; white-space: normal; word-spacing: 0px;"><div style= >=3D"letter-spacing: normal; text-align: start; text-indent: 0px; text-trans= > form: none; white-space: normal; word-spacing: 0px;">=E2=80=94 <div>Br= > ian Lalor (he/him)</div><div><a href=3D"mailto:[email protected]" target=3D= > "_blank">[email protected]</a></div></div></div> ></div> ><div><br><blockquote type=3D"cite"><div>On Jun 22, 2024, at 8:16=E2=80=AFPM= > , Martin Blais <<a href=3D"mailto:[email protected]" target=3D"_blank">bla= > [email protected]</a>> wrote:</div><br><div><div dir=3D"ltr"><div class=3D"gm= > ail_default" style=3D"font-family:arial,sans-serif;font-size:small">You bou= > ght your NVDA at 733.09 not 1096.33, that's what you have to provide i= > n the cost for the -2 leg.</div><div class=3D"gmail_default" style=3D"font-= > family:arial,sans-serif;font-size:small">The docs are correct.</div><div cl= > ass=3D"gmail_default" style=3D"font-family:arial,sans-serif;font-size:small= > "><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"= > gmail_attr">On Sat, Jun 22, 2024 at 5:32=E2=80=AFPM Brian Lalor <<a href= >=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>> w= > rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p= > x 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I know thi= > s has been discussed a few times, but the docs are still incorrect and I=E2= >=80=99m unable to find a complete example. I=E2=80=99m using beancoun= > t v2 because Fava=E2=80=99s not been updated for v3, yet.<br> ><br> > NVDA recently split 10:1. I previously purchased 2 shares:<br> ><br> > option "operating_currency" "USD"<br> ><br> > 2024-02-14 open Equity:Opening-Balances &= > nbsp; = > USD<br> ><br> > 2024-02-14 open Assets:Cash = > &nbs= > p; USD<br> > 2024-02-14 pad Assets:Cash Equity:Opening-Balances<br> ><br> > 2024-02-14 open Assets:Stocks:NVDA = > &nbs= > p; NVDA<br> > 2024-02-14 commodity NVDA<br> ><br> > 2024-02-14 * "Buying some NVDA" ""<br> > Assets:Stocks:NVDA &= > nbsp; = > 2.00 = > NVDA {733.09 USD}<br> > Assets:Cash<br> ><br> > 2024-05-31 balance Assets:Stocks:NVDA &nb= > sp; &= > nbsp; 2 NVDA<br> > 2024-05-31 balance Assets:Cash &nb= > sp; &= > nbsp; 0.00 USD<br> ><br> > The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and my F= > idelity account confirms that I have 20 shares. Per the docs[1], I wo= > uld do (I think):<br> ><br> > 2024-06-02 * "NVDA 10:1 stock split" ""<br> > Assets:Stocks:NVDA &= > nbsp; = > &nbs= > p;-2 NVDA {1,096.33 USD}<br> > Assets:Stocks:NVDA &= > nbsp; = > &nbs= > p;50 NVDA {109.633 USD}<br> ><br> > bean-check fails, however:<br> ><br> > nvidia_split.beancount:24: No position matches "Posting= > (account=3D'Assets:Stocks:NVDA', units=3D-2 NVDA, cost=3DCostSpec(number_pe= > r=3DDecimal('1096.33'), number_total=3DNone, currency=3D'USD', date=3DNone,= > label=3DNone, merge=3DFalse), price=3DNone, flag=3DNone, meta=3D{'filename= > ': 'nvidia_split.beancount', 'lineno': 29})" against balance (2.00 NVDA {73= > 3.09 USD, 2024-02-14})<br> ><br> > Explicitly using the lot in that transaction fails, too:<br> ><br> > 2024-06-02 * "NVDA 10:1 stock split" ""<br> > Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 1096.33= > USD<br> > Assets:Stocks:NVDA 20 NVDA {109.633 USD}<br> ><br> > The error is:<br> ><br> > nvidia_split.beancount:24: Transaction does not balance= >: (726.4800 USD)<br> ><br> > 2024-06-02 * "NVDA 10:1 stock split" ""<br> > Assets:Stocks:NVDA -2.00 NVDA {733.09 USD, 2024-0= > 2-14} @ 1096.33 USD<br> > Assets:Stocks:NVDA 20 NVDA {109.633 = > USD, 2024-06-02}<br> ><br> > So it seems the price of 1096.33 is being ignored and I=E2=80=99m trying to= > purchase 20 shares at 109.633 USD using 2*733.09 USD and the =E2=80=9Cgain= >=E2=80=9D of 363.24 USD per share is being lost.<br> ><br> > What is the proper way to reflect a stock split?<br> ><br> > Thanks,<br> > Brian<br> ><br> > [1]: <a href=3D"https://beancount.github.io/docs/trading_with_beancount.htm= > l#stock-splits" rel=3D"noreferrer" target=3D"_blank">https://beancount.gith= > ub.io/docs/trading_with_beancount.html#stock-splits</a><br> >=E2=80=94 <br> > Brian Lalor (he/him)<br> ><a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a= >><br> ><br> > -- <br> > You received this message because you are subscribed to the Google Groups "= > Beancount" group.<br> > To unsubscribe from this group and stop receiving emails from it, send an e= > mail to <a href=3D"mailto:beancount%[email protected]" target= >=3D"_blank">[email protected]</a>.<br> > To view this discussion on the web visit <a href=3D"https://groups.google.c= > om/d/msgid/beancount/C9EBE17D-A95F-4018-B979-59831C301DFB%40bravo5.org" rel= >=3D"noreferrer" target=3D"_blank">https://groups.google.com/d/msgid/beancou= > nt/C9EBE17D-A95F-4018-B979-59831C301DFB%40bravo5.org</a>.<br> ></blockquote></div><div><br></div> > > -- <br> > You received this message because you are subscribed to the Google Groups "= > Beancount" group.<br> > To unsubscribe from this group and stop receiving emails from it, send an e= > mail to <a href=3D"mailto:[email protected]" target=3D= > "_blank">[email protected]</a>.<br> > To view this discussion on the web visit <a href=3D"https://groups.google.c= > om/d/msgid/beancount/CAK21%2BhMXg654ZmD8N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP= > 80kQQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter" target= >=3D"_blank">https://groups.google.com/d/msgid/beancount/CAK21%2BhMXg654ZmD8= > N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP80kQQ%40mail.gmail.com</a>.<br> ></div></blockquote></div><br></div></div><div><br class=3D"webkit-block-pla= > ceholder"></div> > > -- <br> > You received this message because you are subscribed to the Google Groups "= > Beancount" group.<br> > To unsubscribe from this group and stop receiving emails from it, send an e= > mail to <a href=3D"mailto:[email protected]" target=3D= > "_blank">[email protected]</a>.<br> > To view this discussion on the web visit <a href=3D"https://groups.google.c= > om/d/msgid/beancount/EBF195B5-FA6C-476B-9925-0DADC70FADA2%40bravo5.org?utm_= > medium=3Demail&utm_source=3Dfooter" target=3D"_blank">https://groups.go= > ogle.com/d/msgid/beancount/EBF195B5-FA6C-476B-9925-0DADC70FADA2%40bravo5.or= > g</a>.<br> ></blockquote></div><div><br class=3D"webkit-block-placeholder"></div> > > -- <br> > You received this message because you are subscribed to the Google Groups "= > Beancount" group.<br> > To unsubscribe from this group and stop receiving emails from it, send an e= > mail to <a href=3D"mailto:[email protected]">beancount= > [email protected]</a>.<br> > To view this discussion on the web visit <a href=3D"https://groups.google.c= > om/d/msgid/beancount/CAK21%2BhNGvUFRtQmK9jskoGCPidmahv6aOf_hpqTHmZGYYsEvPA%= > 40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups= > .google.com/d/msgid/beancount/CAK21%2BhNGvUFRtQmK9jskoGCPidmahv6aOf_hpqTHmZ= > GYYsEvPA%40mail.gmail.com</a>.<br> ></div></blockquote></div><br></div></body></html> > ><p></p> > > -- <br /> > You received this message because you are subscribed to the Google Groups &= > quot;Beancount" group.<br /> > To unsubscribe from this group and stop receiving emails from it, send an e= > mail to <a href=3D"mailto:[email protected]">beancount= > [email protected]</a>.<br /> > To view this discussion on the web visit <a href=3D"https://groups.google.c= > om/d/msgid/beancount/CAF6E8D1-6E0B-47F4-A9B6-E77C1C18AD69%40bravo5.org?utm_= > medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/beanc= > ount/CAF6E8D1-6E0B-47F4-A9B6-E77C1C18AD69%40bravo5.org</a>.<br /> > > --Apple-Mail=_F40F4563-9452-4905-A295-73E327557528-- > -- 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/dhqvkk-n72.ln1%40anthive.com.
