Portfolio Optimization of Selected Nifty Companies Using Modern Portfolio Theory

Subhash Naidu B, R. N. Kulkarni

Abstract

The stock market provides several investment opportunities, but selecting suitable securities and deciding their portfolio allocation requires careful consideration of expected return and risk. This study develops a portfolio optimization framework that combines machine learning-based stock price prediction with Modern Portfolio Theory (MPT). Historical daily data for 21 companies listed on the National Stock Exchange (NSE) were collected from Yahoo Finance for January 2020 to December 2025. The data were cleaned and prepared for exploratory analysis, return calculation and prediction. Linear Regression, Decision Tree, Random Forest and XGBoost were considered for stock-price prediction and evaluated using MAE, MSE, RMSE and R² Score. The project results identify Random Forest as the overall best-performing model. Predicted prices were then used with MPT to determine portfolio weights. The final recommendation selected M&M, SUNPHARMA, BHARTIARTL, NTPC and LT, with allocations of 22.37%, 21.21%, 21.01%, 18.29% and 17.12%, respectively. Portfolio performance was evaluated using annual return, annual volatility, Sharpe ratio, CAGR and maximum drawdown. The framework provides a systematic decision-support approach for combining predictive analytics with portfolio optimization. Keywords- Machine Learning, Modern Portfolio Theory, NSE, Portfolio Optimization, Stock Price Prediction.

Source: semanticscholar · PDF

Read the AI summary, key takeaways and discussion on WOBR Quant Research.


Open in the WOBR AI app → · WOBR.AI home