A Short History of Financial Euphoria, John Kenneth Galbraith. This book from 1990 offers perspectives on bubbles that are still useful today. By paying attention to the signs, "there is a chance - a slim chance, to be sure, given the sweeping power of financial euphoria - that otherwise vulnerable individuals will be warned."
In this final chapter, Galbraith summarizes the lessons learned from speculative euphoria, and how the investor may avoid playing the fool in such scenarios.
It's important to recognize that the circumstances that induce financial dementia are not changed since Tulipomania of the 1630s. As such, bubbles will occur in the future as they have in the past.
Upward-moving prices confirm individual and group wisdom, encouraging further speculation. The crash never comes gently. Instead, it is massive, as a result of a large effort on the part of speculators to exit at the same time.
Those involved never blame markets nor their own behaviour. Furthermore, the least important questions are emphasized, for example:
1) What triggered the crash itself?
2) Were there special factors that made the crash deeper than it should have been?
3) Who should be punished?
A search for external factors begins.
Unfortunately, bouts of financial euphoria probably can't be regulated out. Light regulations wouldn't impede any speculative fury, and heavy regulations would be oppressive in nature.
As such, the best defense against succumbing to such euphoria is a knowledge of history and an enhanced skepticism, whereby it is understood that optimism that is too strongly evident is likely equated with foolishness.