The stock market is often portrayed as a realm of cold, hard logic, driven by numbers and analysis. But beneath…