This study estimates the response of macroeconomic variables to stock market fluctuations in Japan and the United States. It emphasizes the economy's reaction to stock market bubbles and crashes. To do this, I propose a new way to identify bubbles and crashes by testing price-to-fundamental ratios using the newly developed trend-filtering approach. Regardless of the measures used, both countries' macroeconomy tends to respond positively to the positive shock of stock price. Asymmetric effects of the stock market are observed. Japan's macroeconomic variables, especially investment and industrial production, are more sensitive to market crashes, while those of the United States are more sensitive to stock bubbles. Finally, I provide evidence that market sentiment can affect the economy either directly or indirectly through the stock market.