Dear John,
> (Expenses:BR:Fees) $X
> Expenses:Capital:Short:Wash $Y

I hadn't thought of using (Expenses:BR:Fees) as a virtual posting.  So far, 
I haven't used virtual postings at all over the past three years of using 
plain text accounting.  But I think transaction costs that should also be 
counted as part of the currency exchange cost is the perfect use case for 
virtual postings.  I think I will adopt this convention from here on.

Dear David,
Thanks for that excellent blog post (and for recommending the Github Wiki 
post that I'd contributed to!).

Sadly, I'm still trying to figure out how Lotter works before using it with 
my files.  (I currently use real currency trading accounts 
("Equity:Trading:XXX:YYY") for commodity interchanges, as described in the 
Github Wiki,[1] rather than the virtual postings that Lotter seems to 
generate.  And given the format I currently use, I don't capture 
lot-related information, which I ideally should.)

What kind output would Lotter have if I accumulated currency from two 
distinct purchases and sold them at once?  What would the "[Lot:Income:long 
term gain]" be in such a case, and on what basis would it be calculated 
(FIFO? LIFO? ACB?)  Would Lotter allow me to tell it what time period 
should be counted as "short term gain" and what is "long term gain"?  I 
imagine the rules for determining this in the US aren't the same as in 
India.

One reason why Lotter seems attractive to me over my current system is that 
it would enable me to leverage improvements in the ledger ecosystem using 
its native syntax (XX @ YY / XX @@ YY), while also using currency trading 
accounts for "proper" (Selinger-style) double-entry accounting.

Thanks,
Pranesh

[1]: 
https://github.com/ledger/ledger/wiki/Multiple-currencies-with-currency-trading-accounts


On Sunday, 3 November, 2019 at 1:06:32 am UTC+5:30 d10 wrote:

>
> On Friday, July 26, 2019 at 1:32:45 PM UTC-4, John Wiegley wrote:
>>
>> >>>>> "PP" == Pranesh Prakash <[email protected]> writes: 
>>
>> PP> (And FWIW, I believe trading accounts are a very powerful idea that 
>> PP> unfortunately don't have enough integration into the ledger-likes.  
>> They, 
>> PP> used judiciously with sub-accounts, can even mimic lots accurately.) 
>>
>> Hi Pranesh, 
>>
>> I do quite a lot of investment tracking with Ledger these days. It's a 
>> bit 
>> more manual than I would like, but I haven't run into any blocking 
>> limitations. 
>>
>> [snip]  
>
>> Things that are still manual in the above: 
>>
>>  - Entering the lot details 
>>  - Calculating the wash amount 
>>  - Calculating the adjusted cost basis on the next purchase (or of 
>>    other shares currently held) 
>>  - Withdrawing from the wash account on the next purchase 
>>
>> John 
>>
>
> I struggled to calculate gains for a bunch of trades recently.  Long story 
> short, I was able to automate a lot of the calculation, and ledger was a 
> huge help.
>
> In order to address some of the complexity mentioned by Pranesh, I added 
> splits to call out inventory and cost basis explicitly.  I think the 
> inventory and gains splits mske it easier to see and understand when trades 
> create or consume inventory.  Once the splits are there, ledger calculates 
> gains like a champ.
>
> I wrote up some notes, and made the tool available.  
>
> See https://www.d10.dev/blog/ledger-cli-trade/ for the write-up.
>
> See https://src.d10.dev/lotter for the open source tool.
>
>

-- 

--- 
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/e20a3cee-e499-4776-872f-39c3438fcdc8n%40googlegroups.com.

Reply via email to