We propose a novel Asset Allocation Forest (AAF) model that combines the well established
machine learning tool with the conventional portfolio optimization method.
The determination of locally optimal portfolio weights, which dynamically respond to
market conditions, effectively captures market regimes, structural breaks and smooth
transitions in a data-driven manner. We illustrate the proposed model using a multiasset
portfolio consisting of equities, bonds, credit, high yield and commodities. The
AAF consistently outperforms established benchmarks, including the Hidden Markov
Model (HMM), even when trading costs are taken into account. It also opens the door
to valuable economic insights. By constructing accumulated local effects (ALE) plots,
we find evidence of flight-to-safety, suggesting a strategic shift from riskier assets to
less volatile bonds during periods of increased market turbulence. Furthermore, our
model shows a pronounced preference for bonds in inflationary periods, demonstrating
its adaptability to different economic conditions.