For tax purposes, I need maximum balance of an investment account during the tax year. reg -J sorted doesn't actually give me that. When using reg, it needs to do a cumulative sum, on top of the initial balance.
On Saturday, February 3, 2024 at 3:33:05 PM UTC-5 Tavis Ormandy wrote: > On 2024-02-03, lipp f wrote: > > TIA. > > > > Are you only interested in cases that a /transaction/ causes the maximum > balance to be reached (e.g. you deposited some cash)? > > Maybe something like this? > > $ ledger reg -JVd 'd > [2023] & d < [2024]' ^Assets:Checking \ > | sort -g -k2 \ > | tail -1 > > I think you need the display filter, because --period would set the > starting balance to 0. > > I guess you could do --sort 'account.value(d)' or something, but that > would be kinda slow. > > If you also care about the case where the market value of a commodity > increases, then I guess the answer is similar, but you need something > like `--daily` or `--weekly`. > > I dunno, maybe someone else has a cleaner solution :) > > Tavis. > > -- > _o) $ lynx lock.cmpxchg8b.com > /\\ _o) _o) $ finger [email protected] > _\_V _( ) _( ) @taviso > > -- --- 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/e6c64e92-a6fa-4396-b28b-620cd66901e6n%40googlegroups.com.
