End-to-End Portfolio Optimization Using Transformer Encoder Model for Long Positions Strategy
摘要
Portfolio optimization has received considerable scholarly attention in recent years due to its potential for consistent returns. In our work, we developed a deep learning-based portfolio optimization model by integrating a Transformer Encoder Model with a Sharpe Loss Function. The main objective is to predict portfolio values and assign weights to assets using an end-to-end approach with a Sharpe Loss Function and evaluate our model against existing techniques in thematic sector portfolio optimization for the Indian stock market. We focused on six sectors of the NIFTY50 index (Services, PSE, MNC, Commodities, Manufacturing, and Financial Services). Our model consistently outperformed classical models in terms of CAGR and Portfolio Return Value across all time periods considered (2008–2010, 2011–2013, 2012–2015, 2016–2019, and 2019–2022), with the Hierarchical Risk Parity model closely following in terms of Portfolio Returns. Additionally, our model achieved higher Returns on Investment (ROI) in three out of the five thematic sectors (Services, PSE, MNC, respectively) compared to existing models (29%, 81%, and 71% ROI versus 18%, 51%, and 26% ROI, respectively). For the NIFTY Financial Services sector, our model obtained an ROI of 29%, which existing models did not evaluate.