I've run into an issue that I just can't find an answer to in either the
manual or archived conversations from this group, so I thought I would post
to see if you guys can help me out.
Following is an example of a stock transaction:
2019/03/18 * Buy xx
Assets:Investing:ABC Securities:xx 5.37578 xx @
$26.725424031
Equity:Opening Balances
2019/03/19 * Sell xx
Assets:Investing:ABC Securities:xx -5.37578 xx @
$44.373095625
Assets:Investing:ABC Securities:Cash
After completing the transaction, all of my ABC Securities:Cash balance is
correct, and all is good. If I run a balance report, however, I see a
$94.87 balance when I expected to see $0.00.
ledger -f register.ldg --price-db price_db.txt -V --strict --explicit bal
--depth=1 -e 2019-03-20
$xxx,xxx.xx Assets
$-xxx,xxx.xx Equity
$xxx,xxx.xx Expenses
$-xxx,xxx.xx Income
$-xxx,xxx.xx Liabilities
--------------------
$94.87
If I run the same report with the --unrealized flag, I can see the $94.87
show up in the unrealized gain category.
Running ledger -f register.ldg --price-db price_db.txt -V --strict
--explicit bal --depth=2 -e 2019-03-20 --unrealized
$xxx,xxx.xx Assets
$-xxx,xxx.xx Equity
$-xxx,xxx.xx Opening Balances
$-94.87 Unrealized Gains
$xxx,xxx.xx Expenses
$-xxx,xxx.xx Income
$-xxx,xxx.xx Liabilities
--------------------
0
In this example, I have realized the gain, so how do I record it as such?
I have many more examples of this where the transaction has occurred
exactly as above, but the accounts have a tax deferred status, so how do I
handle those accounts as well?
Thanks!
JL
--
---
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/ade2385d-e958-4acc-9e62-0f3e0877a603n%40googlegroups.com.