We use a dynamic affine term structure framework to price equity and bonds jointly, and investigate how prices are related to a set of macro factors extracted from a large dataset of economic time series. We analyze the discrepancies between market and model implied equity prices and use them as a measure for bubbles. A bubble is diagnosed over a given period whenever the discrepancies are not stationary and impact the underlying economy consistently with the literature's findings, increasing over the shorter term economic activity before leading to a net loss in it. We perform the analysis over 3 major US and 3 major European equity indices over the 1990-2017 period and find bubbles only for two of the US equity indices, the S\&P500 and the Dow Jones.