On 2024-02-03, lipp f wrote:
> 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.
Hmm, pretty sure the solution provided does literally that?
Breaking it down...
> -d 'd >= [2023] & d < [2024]'
This is a display filter, which means transactions are included in
totals even if they're not displayed.
You need this to calculate the correct initial balance.
> -V
This just means you want the market value, because you didn't specify if
this was a commodity account or a bank account.
> -J
This only outputs the date and the total, which is all you wanted and is
easier to process.
> sort -g -k2
Now sort that output by running total, so the highest balance you ever
had will be at the end.
> tail -1
Only print the highest balance, and throw the rest away.
If that's not what you're looking for, can you give an example?
Tavis.