The fourth transaction should be on 1/19/2018, when BTC was "only" $11,500. But the 7% gain since you posted this a day ago corrected most of the error for you. 05/28/2014 sell 317.5 BTC @ $571 = $181,270 07/09/2015 buy 676.4 BTC @ $268 = $181,270 01/19/2018 sell 676.4 BTC @ $11,498 = $7,777,687 05/11/2019 buy 1071.6 BTC @ $7258 = $7,777,687 03/01/2021 hold 1071.6 BTC @ $49,593 = $48,135,288 11/28/2011 buy 317.5 BTC @ $3 = $1000
I didn’t mean to nitpick your numbers, but wanted to check for hindsight bias. Would your program have looked appealing in 2011? The halving might make Bitcoin less attractive, so selling before and buying after is logical. But why 1 year before and 1.5 years after? Those magic numbers suggest some after-the-fact strategizing. I suggest trying one year before and after, or 1.5 years before and after, or other combinations, and see if they often do better than a simple buy and hold strategy. Here’s a handy Google Spreadsheets formula: =INDEX(GOOGLEFINANCE("CURRENCY:BTCUSD","price",A7),2,2)