Literally the peak was driven by "number go up" so the crash was caused by "number stop going up".
If you want to read more:
https://www.amazon.com/gp/product/B01M34NBM2
His thesis is that bubbles can be analyzed as a risk premium on the possibility of a collapse.
Investors need to be seeing a super-exponential increase in prices because as the price decouples from fundamentals they are gambling that they can buy in at a stupidy high price and that it won't actually crash or that they'll be able to pull out before it crashes with a profit. But as it continues to climb it becomes more likely it is a bubble and more likely that it'll pop, and that actually causes the risk premium to increase, which demands that the price rises enough to meet the risk premium.
Eventually like all positive feedback loops it hits a point where it breaks because the price won't actually rise to infinity dollars.
Then since the number isn't going up it goes down and that risk premium in the price evaporates.
While the math behind a trading algo doesn't have to be extremely sophisticated a very good understanding of stats is necessary to characterize your algo.
I do a ton of work to understand the stat properties of my algo. I use all the classical performance measures like Sharpe, Sortino and so on. But also I try to fit the P&L to distributions, do Monte Carlo, measure performance on a continuous basis. I characterize the frequency and duration of the drawdowns and so on.
Another magnificent source is Sournette. Read everything from that man.
https://www.amazon.com/dp/B01M34NBM2/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1