Capital gain records

50 views
Skip to first unread message

lipp f

unread,
Dec 14, 2023, 3:02:59 PM12/14/23
to Ledger
I'm importing all transactions from my broker. They are buy / sell securities. Is there a easy way to create the capital gain records?

John Wiegley

unread,
Dec 14, 2023, 8:39:32 PM12/14/23
to lipp f, Ledger
>>>>> "lf" == lipp f <flip...@gmail.com> writes:

lf> I'm importing all transactions from my broker. They are buy / sell
lf> securities. Is there a easy way to create the capital gain records?

For purchases, just to be sure to record the price at purchase of the late.

For sales, you need to record the price of the lot along with the price of the
sale, which will create an need for Ledger to balance the gain or less.

Here’s a real example:

2021/01/29 * BOT +100 AMC @13.00
Assets:TD:Brokerage:Equities 100 AMC @ $13.00
Assets:TD:Brokerage:Cash $-1,300.00

2021/02/01 * SOLD -100 AMC @14.00
(Expenses:TD:Fees) $0.04
Income:Capital:Short $-99.96
Assets:TD:Brokerage:Equities -100 AMC {$13.00} @ $14.00
Assets:TD:Brokerage:Cash $1,399.96

John

lipp f

unread,
Dec 14, 2023, 9:07:44 PM12/14/23
to Ledger
Sorry, my question was if there is  a way to automate this. I have more than 2000 transactions and doing that manually is not really an option.

John Wiegley

unread,
Dec 15, 2023, 1:09:23 AM12/15/23
to lipp f, Ledger
>>>>> "lf" == lipp f <flip...@gmail.com> writes:

lf> Sorry, my question was if there is  a way to automate this. I have more
lf> than 2000 transactions and doing that manually is not really an option.

I see, I wrote a Haskell program to generate these entries from a CSV file. I
don’t know of any automation that wouldn’t involve some coding.

John
Reply all
Reply to author
Forward
0 new messages