>>>>> "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.

Here's a typical transaction from my Ledger:

  2019/07/23 * (46958) SOLD -W NFLX @311.1325
      ; Time: 06:50:43
      (Expenses:BR:Fees)                            $X
      Expenses:Capital:Short:Wash                   $Y
      Assets:BR:Brokerage:Equities                  -1 NFLX {$307.74667} 
[2019/07/22] @ $311.1325
      Assets:BR:Brokerage:Cash                      $U = $Z

  2019/07/23 * (50177) BOT +W NFLX @311.649
      ; Time: 06:51:15
      Assets:BR:Brokerage:Equities                   1 NFLX @ $329.58215
      Assets:BR:Brokerage:Cash                     $-V = $Z
      Expenses:Capital:Short:Wash                  $-Y

This is selling a set of lots under the wash sale rule, and accumulating the
wash to an account so I can reprice the cost basis of the next purchase of the
same commodity (if it happens within 30 days). Had it been a profitable
transaction, I would have registered that in Income:Capital:Short instead.

NOTE: The purpose of the above sale was an attempt to adjust the cost basis
using the falling price of the commodity, but it ended up moving against me
and I re-entered the position and unfortunately increased the cost basis. I
was experimenting using a different study for buy/sell triggers based on a
trend analysis, which didn't work out as well as I was hoped. :)

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

-- 

--- 
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/m2ftmsya7s.fsf%40ip-10-129-10-60.us-west-2.compute.internal.

Reply via email to