On 04/08/23 02:36, Eric Altendorf wrote:
Couple questions on cost tracking:
*1. When are acquisition dates tracked in Cost objects vs. not?*
The query that I use for generating inventory reports at a particular
time is this:
SELECT account, SUM(position) as lots,
UNITS(SUM(position)) AS total,
COST(SUM(position)) AS total_cost
FROM has_account("Assets") CLOSE ON 2020-01-01
WHERE currency~"BTC|ETH"
the lots column generates a list with entries like:
0.5000000000000000 BTC { 8900.0 USD}
0.2250000000000000 BTC { 7700.0 USD}
0.0239900000000000 BTC { 7100.4 USD}
At first I thought acquisition dates were not shown because SUM() is
aggregating the amounts of lots with different dates, but now I'm not
sure. Is acquisition date tracked? Should it be? If it's not, is it
likely user error in how I entered my transactions?
AFAIK acquisition date is always tracked. However, when I implemented
the column rendering code for columns reporting postings and inventories
I decided to use a compact representation without the date and optional
labels. This choice can be revisited.
*2. How exactly is cost munged in an asset transfer?*
I'm looking at inventories (as reported by the previous query) before
and after a transfer from one account to another. I can see a selection
of lots disappear from the inventory of the debited account. I had
thought these lots would appear in the same form in the credited
account, but instead I see them aggregated into a single lot with what
appears to be an averaged cost.
Is it possible to transfer the lots without collapsing? In conjunction
with my previous question, I think it will be necessary to transfer
without collapsing in order to preserve acquisition dates on the cost,
which will be needed to determine STCG vs LTCG. Or perhaps the lots are
being collapsed /because/ I don't have dates attached, perhaps due to
user error?
I'm not sure I understand what you are trying to do, what beancount
does, and what you expect it to be doing. Can you present a minimal
ledger that shows the problem?
*Bonus question:* How can I induce more precision on the cost objects
rendered in my inventory? I typically only get one digit past the
decimal point, not sure why.
Just write them with the desired amount of decimal digits in the ledger.
If this does not work as expected, again, please provide a minimal
ledger demonstrating the problem.
Cheers,
Dan
--
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/275a2f87-b5ad-352f-abd9-4818d0344fc9%40grinta.net.