I have developed a project
https://github.com/peroksid90/crypto_calculatorto compare mining vs holding. Contributions and comments are welcome.
For example,
you have 2500 $.
You can buy a miner or just invest this money to BTC.
Which is better in the long run?

So at the end we see:
the worst case: do mining and sell mined profit every day (red line) (7300$)
the better: just buy and hold (olive line) (8200 $)
the best: do mining and don't sell. (magenta) (12500 $)
magenta and red doesn't include the miner market price. So actually we should add it to the profit, because the equipment price is also rise(even used).
Mining is a difficult process as compare to the investments. In mining you have to bought the equipment and also bear the cost of electricity. In investment you only have to invest and hold. You can choose mining is you have large capital.