I've made thousands of cryptocurrency trades and have them in a CSV file with the necessary fair market values.

I'd like to use the specific-shares cost basis method to minimize my gains.

Is there a minimization algorithm that I could use to do this programmatically?

Or, is there any free open source software that could do this for me?

I found some interesting articles:

But, neither company seems to have published their algorithms. They also both require you to sign up, pay, and upload your trading data.

  • 3
    In the U.S., you can designate your sales but it must be done at the time of the sale. You can't pair them off at your whim as your linked article suggests. I don't know a thing about crypto or the rules for their taxation but I would assume that it's no different. Check with a tax professional rather than some guy on the web trying to sell you a Token Tax minimization algorithm. The Betterment article indicates this: "WHEN Betterment customers sell securities, our algorithms select which specific lots to sell." they key word is WHEN. – Bob Baerker Oct 22 '19 at 18:27
  • 1
    Cryptocurrency trades are not subject to wash sale accounting. So I can recommend the 'KBH Investor Accounting' software. However, the software requires manual input but will then output a continuation sheet that can be adapted to tax reporting. The CSV file could be converted, by an application developer, to a KBH input file. – S Spring Oct 22 '19 at 18:58
  • I suppose that cryptocurrency trades are subject to short-term versus long-term capital gains. So yeah, designated trades need some type of system of designation. If the trades were put on a 4797 then they would just be income and marked-to-market at year-end if not closed out. – S Spring Oct 22 '19 at 19:21
  • 1
    You could always keep trading and then all your gains will vanish. No need to pay me for that advice. – Pete B. Oct 23 '19 at 10:59
  • @BobBaerker IRS Notice 2014-21 says that crypto "is treated as property". Where does the IRS say that you can't change the method you used to determine the cost basis of an asset after you've sold it? Feel free to answer this question: Can I change a cost basis method retroactively? – ma11hew28 Oct 23 '19 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.