probstj / ccGains

Python package for calculating cryptocurrency trading profits and creating capital gains reports
GNU Lesser General Public License v3.0
49 stars 13 forks source link

Feature Request, HPFO method #31

Open eervin123 opened 2 years ago

eervin123 commented 2 years ago

Hello there, nice project. I just stumbled upon it.

I see you have LIFO, FIFO, and LPFO

Typically users would want to minimize taxable gains by first eliminating their highest cost assets first, not the lowest cost assets.

In the US, we typically default to HCFO (Highest Cost First Out) that is if we are not also incorporating things like long term and short term gains and losses.

To stick with your P for price instead of C for cost, I would recommend also adding a HPFO method. I would assume the method would be a simple copy paste and change to sort decending rather than sort ascending.