I have a solution... but, I guess it's subjective if it's better :)
The problem, as Bob said, is that there is no way of specifying enough
precision in the transaction syntax, except {{}} which doesn't work for
partial lots. You can use amounts in expressions though, so you could
make a function to do it...
It's a bit tricky, because you have to be careful to never convert
anything or it will get truncated, and then you're back at square one.
How about this, add this to to the top if your ledger:
define partial_lot(count, commodity, lotprice, lotsize, lotdate) = ((to_amount(to_string(lotsize) + " " + commodity + "{{" + lotprice + "}}" + lotdate) / lotsize ) * count)
Now you can do this, to sell 5 shares from a lot of 6.456:
2023/11/02 * Sell Shares
Assets:401K (-partial_lot(5, "FSKAX", $734.43, 6.456, "[2023/11/01]")) @ $120.00
Income:Capital Gains -$40.29
Assets:401K $774.72
The idea is that rather than converting anything into a string
({$113.123123123...}) you leave it as an amount. If you divide that
amount by the lot size, you get the value of 1 FSKAX, then you can
multipy by the desired partial lot size.
...ugly hack or elegant solution, you decide :)
Tavis.
--
_o) $ lynx
lock.cmpxchg8b.com
/\\ _o) _o) $ finger
tav...@sdf.org
_\_V _( ) _( ) @taviso