Abstract
This paper introduces a novel machine learning framework for dynamic risk-based asset allocation that addresses fundamental limitations in traditional portfolio optimization methods. The proposed architecture integrates Long Short-Term Memory networks for volatility forecasting with differentiable risk budgeting layers and regime-switching mechanisms, enabling end-to-end training of portfolio weights under adaptive risk constraints. Unlike conventional approaches that rely on static risk budgets and historical covariance estimates, our methodology dynamically adjusts risk targets based on real-time market indicators, including volatility expectations, credit spreads, and yield curve dynamics. The framework achieves three primary research objectives: first, it demonstrates superior risk-adjusted performance with a Sharpe ratio of 1.38 during the out-of-sample period (2017-2022), representing a 55% improvement over traditional risk parity strategies and a 23% enhancement over contemporary deep learning approaches. Second, the architecture maintains computational efficiency through sparse attention mechanisms, scaling linearly with asset count while processing 50-asset portfolios in under 25 milliseconds. Third, the model preserves interpretability via SHAP-based risk attribution, providing transparent insights into allocation decisions across different market regimes. Empirical results reveal particularly strong performance during volatile market conditions, with maximum drawdowns reduced by 41% during stress periods compared to conventional methods. The framework's proactive risk management capabilities were evidenced during the COVID-19 crisis, where it began reducing equity exposure two weeks before the market trough, demonstrating genuine predictive ability rather than reactive adjustment. Robustness checks confirm performance persistence under varying transaction costs, rebalancing frequencies, and alternative risk measures. These findings establish a new paradigm for portfolio optimization that successfully bridges theoretical finance with practical implementation. The framework's ability to navigate complex market environments while maintaining computational efficiency and interpretability suggests readiness for widespread institutional adoption. This research contributes to the evolving literature on differentiable finance while providing portfolio managers with a robust tool for constructing adaptive, risk-aware investment strategies.