Mining at a small loss also works.
I do everything with reporting of taxes.
I was able to legally carry 2017 gains into 2018.
I can offset the gains if I have a small loss this year.
Say you made 10000 in 2017 and purchase gear late in the year.
The entire gain of 10000 can be sunk into inventory if you resell used gear.
You then sell the gpus at peak prices in Jan of 2018. The gain is this year and you can offset with a mining loss.