This paper investigates asset allocation problems when returns are predictable. We introduce a market-timing Bayesian hierarchical (BH) approach that adopts heterogeneous time-varying coefficients driven by lagged fundamental characteristics. Our approach includes a joint estimation of conditional expected returns and covariance matrix and considers estimation risk for portfolio analysis. The hierarchical prior allows modeling different assets separately while sharing information across assets. We demonstrate the performance of the U.S. equity market. Though the Bayesian forecast is slightly biased, our BH approach outperforms most alternative methods in point and interval prediction. Our BH approach in sector investment for the recent twenty years delivers a 0.92\% average monthly returns and a 0.32\% significant Jensen`s alpha. We also find technology, energy, and manufacturing are important sectors in the past decade, and size, investment, and short-term reversal factors are heavily weighted. Finally, the stochastic discount factor constructed by our BH approach explains most anomalies.