Skip to main content
MethodsX logoLink to MethodsX
. 2025 Jun 4;14:103413. doi: 10.1016/j.mex.2025.103413

Stock portfolio optimization using hill climbing and simple human learning optimization algorithms as a decision support system

Suyash S Satpute a, Amol C Adamuthe b, Pooja Bagane c,
PMCID: PMC12205770  PMID: 40584161

Abstract

The goal of this research is to develop a decision support system for stock portfolio optimization using hill climbing and SHLO algorithms based on fundamental analysis of stocks. Portfolio optimization involves constructing a portfolio that maximizes returns while minimizing risk. The novelty in methodology is ‘hybridizing’ nature-inspired algorithms for optimized portfolio selection with two independent modules: intrinsic value of stocks and financial health analysis. This integrated approach aids decision-making by considering multiple dimensions of stock performance. Custom datasets are designed for each input module using historical fundamental data. The DSS output presents an optimized portfolio. Comparison for different risk profiles shows that as risk increases, returns of optimized portfolios decrease from 55 % to 24 %. Results for keeping other inputs the same for varying cardinality show that as cardinality increases, returns decrease. The results show that fundamentally undervalued portfolios outperform growth portfolios by a considerable margin. We conclude that optimized portfolios with varying constraints, >80 % of the time, outperform US market indices.

Key contributions include:

  • Developed a decision support system using intrinsic value and financial health analysis.

  • Novel fitness function for optimization using hill climbing and SHLO.

  • Integrated module outputs with hill climbing and SHLO for portfolio optimization.

Keywords: Decision support system (DSS), Hill climbing algorithm, Simple human learning optimization algorithm, Stock portfolio optimization, Intrinsic stock value, Financial health analysis

Method name: Stock portfolio optimization using hill climbing and simple human learning optimization algorithms as a decision support system

Graphical abstract

Image, graphical abstract


Specifications table

Subject area Computer Science
More specific subject area Metaheuristics & Combinatorial Optimization
Name of your method Stock portfolio optimization using hill climbing and simple human learning optimization algorithms as a decision support system
Name and reference of original method [1] Patalay, S., & Bandlamudi, M. R. (2021). Decision support system for stock portfolio selection using artificial intelligence and machine learning. Ingénierie des Systèmes d Inf., 26(1), 87–93. https://doi.org/10.18280/isi.260109
[2] Vaezi, F., Sadjadi, S. J., & Makui, A. (2020). A Robust Knapsack Based Constrained Portfolio Optimization. IJE Transactions B: Applications, 33(5), 841–851. doi: 10.5829/ije.2020.33.05b16
Resource availability https://github.com/SuyashSatpute/Stock-Portfolio-Optimization-Project

Background

The stock market has become a significant investment activity, fuelled by internet adoption and the rise of online trading platforms. It has attracted crores of small individual investors, many of whom are inexperienced and find stock market investments complex and challenging. Consequently, the need for reliable financial decision-making tools has become essential. In today's interconnected global economy, the stock market is central to wealth creation and financial stability. Individual & institutional investors face the formidable challenge of optimizing their stock portfolios to achieve desirable returns while managing risks. Events such as the COVID-19 pandemic and rapid technological advancements have amplified market volatility and uncertainty.

With equities representing businesses and multinational enterprises from all over the world, the stock market makes it easier for buyers and sellers to trade stocks [1]. In this ever-evolving financial landscape, constructing an investment portfolio that balances maximizing returns and minimizing risks remains a critical endeavour [2].

Various Decision Support Systems (DSS) have been proposed to assist in financial decision-making. Traditional techniques, such as the Mean-Variance (MV) Markowitz method [2], Stock Trend Prediction using Candlestick Charting and Ensemble ML Techniques [3], and Data Mining-based Evolutionary Systems [4], largely depend on technical indicators. Other approaches, such as Fuzzy Clustering Rule-Based Expert Systems for Stock Price Movement Prediction [5] and Fuzzy Inference Systems based on Technical Indicators [6], also rely on these indicators, which can be error-prone for long-term portfolio selection. In contrast, Financial DSS based on fundamental analysis techniques [7] have been shown to be more efficient and accurate for long-term portfolio management [8].

This paper addresses these challenges by developing a Financial Decision Support System (DSS) with three integral modules: intrinsic value calculation, financial health analysis, and the application of nature-inspired algorithms like the hill climbing algorithm and the Simple Human Learning Optimization (SHLO) algorithm. This integrated approach empowers investors to make informed decisions.

The Financial DSS in this study was tested using openly available financial data of different stocks listed on the New York Stock Exchange (NYSE) & NASDAQ Stock Market (NASDAQ) [9].

The motivation for this research lies in the need for advanced tools to streamline the complex process of stock portfolio selection. Traditional methods often fail to accommodate the dynamic nature of financial markets and do not leverage the abundance of available data. By employing nature-inspired algorithms, this study seeks to enhance portfolio optimization. The focus on intrinsic value calculations [10], financial health analysis [11], and other critical criteria [9] ensures a holistic approach to stock portfolio selection. Additionally, this research aims to empower investors and financial professionals with a sophisticated DSS that minimizes human intervention while optimizing portfolios for higher returns.

Optimization is critical for enhancing efficiency in combinatorial problems, such as stock portfolio selection. The objective of this research is to integrate different DSS modules for optimized portfolio selection such as intrinsic value calculation, and financial health analysis, along with the Hill Climbing [12] and SHLO algorithms [13] and simplify stock investing.

Literature review and method details

Literature review of stock portfolio optimization

This section of chapter covers reviews of different research carried out by the researchers to design a decision support system for stock portfolio optimization and to overcome other types of optimization problems.

Clustering techniques for stock portfolio optimization

Vaidya et al. [1] proposed a Decision Support System (DSS) for stock market investment using clustering, Holt-Winters forecasting, and AI techniques like Perceptron to assist investors in navigating market complexity. Huang et al. [2] introduced a hybrid GRA/MV portfolio optimization model incorporating ARX predictions and advanced clustering based on the Huang-index and RS theory, validated using Taiwanese stock markets stock data.

Neural network & machine learning techniques for stock portfolio optimization

Lin et al. [3] proposed an ensemble machine learning framework using eight-trigram candlestick features and deep learning for stock trend prediction, achieving over 60 % accuracy on Chinese market data. The study highlights the gap between theoretical strategy performance and real-world returns due to transaction costs.

Huang et al. [7] investigated feed-forward neural networks (FNN) and adaptive neural fuzzy inference systems (ANFIS) for stock selection based on fundamental analysis, finding FNN to outperform ANFIS in identifying profitable stocks relative to a benchmark index. Shen & Tzeng [8] developed a soft computing model combining rough set theory, concept analysis, and DEMATEL to derive decision rules for value stock selection. Tested on Taiwan’s IT sector, the model effectively identifies key attributes for distinguishing high-potential stocks. Patalay and Bandlamudi [11] introduced a Decision Support System (DSS) integrating AI, ML, and mathematical models for stock portfolio optimization. The DSS demonstrated high ROI and robust financial analysis using NSE data, offering strong support for informed investor decisions. Ma et al. [14] propose a multi-task learning model, HGA-MT, which jointly predicts stock return and volatility risk using a heterogeneous graph attention network to enhance portfolio optimization. By capturing multiple stock relations and applying risk-return tradeoffs, their model significantly outperforms existing methods in stock ranking and trading performance.

Evolutionary algorithms for stock portfolio optimization

John [12] proposed HC-S-R, a high-speed hill climbing algorithm that outperforms traditional HC-S and Threshold Accepting methods in solving complex portfolio optimization problems. Benchmark results show its efficiency and speed advantage over quadratic programming. Wang et al. [13] introduced the Simple Human Learning Optimization (SHLO) algorithm based on human learning principles, showing superior performance over other binary optimization algorithms on 0–1 knapsack problems. Vaezi et al. [15] presented a robust stock portfolio optimization model using the knapsack problem to address constraints, market uncertainties, and real-world complexities in investment strategies. Sadjadi et al. [16] highlighted robust portfolio optimization to manage uncertain data, favoring it over stochastic programming due to its practicality, and discussed trade-offs in robustness and model accuracy. Gottschlich and Hinz [17] explored collective intelligence in finance, emphasizing the role of sentiment analysis and algorithmic trading in decision support systems while addressing challenges in social media data quality. Huang et al. [18] proposed a possibilistic regression and Mellin transform-based portfolio model to enhance mean-variance analysis under uncertainty, offering more accurate decision-making tools for investors. Cura [19] applied Particle Swarm Optimization (PSO) to portfolio optimization, demonstrating its effectiveness compared to genetic algorithms, simulated annealing, and tabu search.

Zhu et al. [20] used PSO as a meta-heuristic for tackling nonlinear and multi-objective constraints in portfolio optimization, proving its computational advantage over genetic algorithms. Rosati et al. [21] introduced a Decision Support System for Outcome Analysis (DSS-OA) using decision trees, enhancing financial trading outcome analysis with high interpretability and predictive accuracy. Lin et al. [22] developed BPSOSIPAC, a binary PSO variant optimized for multidimensional knapsack problems, outperforming traditional PSO methods across several benchmark evaluations. Oh et al. [23] designed a genetic algorithm for index fund optimization on the KOSPI 200, incorporating beta, volume, and market cap for improved stock selection and fund performance. Fu et al. [24] addressed the computational challenges of CCMV portfolio selection, proposing heuristic and SDP-based solutions that outperformed standard MIQP solvers in speed and effectiveness. Azarberahman et al. [25] applied the multi-objective SPEA-II algorithm to portfolio optimization, integrating return and semi-variance under realistic constraints. Results demonstrated that SPEA-II outperforms traditional methods like the Markowitz model, offering more efficient portfolios with higher returns and lower risk. Guarino et al. [26] present EvoFolio, a portfolio optimization method using NSGA-II, a multi-objective evolutionary algorithm that balances risk and return. The system incorporates investor preferences, delivering high returns and reduced risk, proving effective across quarterly and monthly evaluations.

After literature review we observed broadly 3 types of techniques for stock portfolio optimization are used & were able to identify research gaps. This research gaps are discussed & addressed in this paper.

Identifying & addressing research gaps

Table 1 shows research gap identified during literature review & how authors addressed it.

Table 1.

Research gap explanation.

Research Gap Explanation How Author Addressed This Gap
Limited focus on fundamental analysis compared to technical analysis in stock market decision-making. Most studies prioritize technical indicators and models in DSS, overlooking fundamental metrics like P/E, ROE, and earnings growth. Author emphasizes fundamental analysis as a key factor in stock portfolio construction.
Lack of comparative analysis effectiveness between modern techniques (clustering, forecasting) and traditional fundamental strategies. The literature lacks side-by-side effective evaluations of AI/ML-based methods vs. conventional approaches over extended time horizon. Author performs an integrated approach including fundamental factors and compares performance outcomes with benchmark indices.
Insufficient real-world data validation for long-term outperformance of optimized portfolios. Many studies use short-term simulations or artificial datasets, without validating models over long timeframes or real market data. Author used real-world data to assess portfolio returns over extended periods (1 Year Jan-Dec 2024).
Neglect of fundamental investing’s role in risk mitigation and portfolio stability. Existing work highlights algorithmic accuracy but ignores how fundamentals enhance resilience during downturns or volatile conditions. Author analyzes risk using 2 independent modules used namely Stock’s Intrinsic Value & Financial Health Analysis of Stocks, attributing stability to fundamental indicators.

Proposed financial decision support system

The Financial DSS for optimized Stock Portfolio Selection is based on a hybrid AI model. The Architecture of the DSS consists of 3 main Subsystems:

  • Model for Calculating the Intrinsic Value of the Stock

  • Model for Comprehensive Financial Health Analysis of the Stock

  • Selection & Optimization of portfolio using Nature-Inspired Algorithms

The above subsystems are integrated to form a robust financial DSS that can be used by equity investors for better selection of stocks. The accuracy and reliability of the DSS is built in to the systems by incorporating independent stock intrinsic value calculation model and comprehensive health checking model.

Novelty in designing methodology

The novelty is we are ‘hybridising’ nature inspired algorithms for stock portfolio optimization with independent models named as calculating intrinsic value of stock & stock financial health index value. All models used in conjunction with nature inspired algorithm for stock picking where they will play crucial role. Further, adding different nature-inspired algorithms like SHLO makes the problem even more novel problem solved in the financial field, particularly related to the stock market.

Architecture of financial DSS for stock portfolio optimization

Fig. 1 shows the Architecture of Financial Decision Support System for Optimized Stock Portfolio Selection.

Fig. 1.

Fig 1

DSS architecture for stock portfolio optimization.

The Financial DSS can be mathematically represented as follows:

SPortfolio=tto0(SIntrinsic,SHealth,SHill_Climbing,SSHLO,nHist) (1)

Where SIntrinsic is the Stock Intrinsic Value Model, SHealth is the Stock Health Analysis Model, nHist is the historical financial data of stocks.

Model for the intrinsic value of stock

Intrinsic value refers to the value of a stock determined through fundamental analysis without reference to its market value. It is also frequently called the real or fundamental value of the stock. A discounted cash flow model (DCF) for calculating the intrinsic value of stock is used and it is depicted in Fig. 2. The discounted cash flow model (DCF) [10] approach calculates the present value (PV) of the stock's expected cash flows (i.e., discounted to the present date), which is the estimated value of the company’s stock. Here, all the future cash flows (CF) of the company are discounted using an appropriate discount rate that factors in risk – and then adds all the discounted cash flows together.

Fig. 2.

Fig 2

DCF model for intrinsic value.

Therefore, the intrinsic valuation is a function of future free cash flows – FCF expected to be generated by the company’s operations. We have considered some assumptions in this model. To calculate discounted cashflow we need cashflow of stocks and discount rate for that particular stock. A cash flow statement is taken from the company's balance sheet, and the discount rate is calculated using the formula below [27].

Discountrate=Riskfreerate+Beta*MarketRiskPremium[27]
  • Risk-free rate is the rate of return you could earn with zero risk by keeping your money in bank and professional investors often use a 10-year government bond yield as a proxy for this; in the US this is currently around 2 %.

  • Market risk premium is the excess return investors receive, on average, by investing in the stock market rather than the risk-free asset and historically has between 4.5 % and 6.5 % for the most part.

  • Stock riskiness is the final component of the discount rate, also known as the stock's sensitivity to fluctuations in the stock market. This requires moderate mathematics to calculate; however, lots of investing websites provide this risk measure, known as beta, for thousands of stocks. Typically, stock beta’s range between 0.5 and 2.0, and a higher beta means the subject stock is riskier relative to the stock market.

The intrinsic value of a company can be calculated using the formula for DCF model:

  • 1.

    Intrinsic Value = Company Assets – Company Liabilities.

  • 2.

    Intrinsic Value = Σ sum (CF) ÷ (1 + discount rate) ^ time period [10]

  • 3.

    Intrinsic Value = (sum (cf_list) - total_debt + total_cash) / shs_outstanding

In this intrinsic value formula, assets include the sum of cash flows of x years & total cash, while liabilities consist of total debt on company. And the result is divided by the number of outstanding shares. This calculation aims to determine the inherent value of the company’ stock. Understanding a company's intrinsic value is crucial for investors in making informed investment decisions. For calculating future cashflows we use discount rate & expected eps growth of stock over next 3 or 5 years.

Based on possibilities of output intrinsic value, it can be classified as follows.

  • Intrinsic Value of Stock > Current Share Price → Undervalued – Potential Buy

  • Intrinsic Value of Stock = Current Share Price → “Correct” Market Pricing

  • Intrinsic Value of Stock < Current Share Price → Overvalued – Potential Sell

Model for financial health analysis of stock

The Model for Stock analysis and Portfolio selection consists of critical financial attributes as inputs and consists of the Expert Knowledge base rules [28] for analysing each of the financial attributes [29]. The model is described in Fig. 3 consists of two distinct phases. Firstly, each of the attributes is passed through Knowledge base rules and given a rating; the second phase consists of weighted summing up all the ratings and forming an index value that is given as input to the module of optimized stock portfolio selection using the SHLO algorithm of the DSS. The output of this subsystem is integrated with the overall DSS for choosing stocks not only based on intrinsic value but also based on the sound financial health of the stock for long-term reliability and safety of the investments [30].

Fig. 3.

Fig 3

Model for financial health analysis of stock.

Fig. 3 shows how to calculate the fitness value for each stock based on the most important parameters. The various stock parameters collected need to be interpreted to have a better understanding about the related stock. Each factor has its own meaning and importance and determining them helps in reaching the ultimate decision swiftly and correctly. The following is a summary of the meaning and interpretation of some of the collected stock parameters.

Earnings per share (EPS) - EPS is determined by the following formula:

EPS=(NetIncomeDividends)/(Averagenumberofsharesoutstanding)[1]

Simply put, the EPS gives the estimated earnings that a share yields. Essentially a company must have a positive and preferably a large EPS.

• Price to Earnings ratio (P/E Ratio)

The P/E Ratio is critical number in evaluating stocks. Simply it is Price per share / Earnings per share [1]. It gives an idea of how to tell if a stock is over or under value. The P/E ratio also is often used as a primary indicator by the experts to assess the value of the company.

The interpretation of the P/E ratio is summarized in Table 2.

Table 2.

P/E Interpretation.

P/E Value Interpretation
0–10 The company’s earnings are thought /assumed to be in decline
10–25 A P/E ratio in this range may be considered fair value
25–40 Either the stock is overvalued, or the company's earnings have increased. The stock may also be considered a growth stock
40–70 Stock is fairly overvalued or the company's earnings have a lower effect on price movement
>70 A company whose shares have a very high P/E may be a high-value company but overpriced or have very high expected future growths in earnings, or this year's earnings may be exceptionally low

Profit Margin

Profit Margin can be calculated using the following formula:

ProfitMargin=(Netprofit)/Revenue,WhereNetprofit=(Revenuecost)[1]

Profit margin basically gives an indication of whether the company is yielding profits. More the profit margin more valuable investment it is. A company with sustained profits for longer duration is a safe and reliable investment.

Return on Equity (ROE)

Return on Equity (ROE) = Net income / Equity [30]

The return on equity (ROE) showed the net income returned as a percentage of the shareholders’ equity. The desirable level of this rate is higher than the average interest rate on the banking market, in order to make the company’s shares more attractive to potential investors.

Debt to Equity

Debt to equity = Total liabilities/Shareholders’ equity [29]

The lower the value of this ratio for any stock, the better it is to select in the portfolio.

Stock portfolio optimization using nature-inspired algorithms

The pseudocode of nature inspired algorithm used into decision making process of stock portfolio optimization is shown.

Pseudocode of nature inspired algorithm for financial DSS
Function NatureInspiredDSS(initial_input, max_iterations, approach_type):
  // Step 1: Initialize
  If approach_type == "LocalSearch" Then
    current_solution = initialize_solution(initial_input)
    current_fitness = calculate_fitness(current_solution)
  Else
    population = initialize_population(initial_input)
    IKD, SKD = initialize_IKD_and_SKD()
  iteration = 0
  // Step 2: Iterate until termination
  While iteration < max_iterations:
    If approach_type == "LocalSearch" Then
     neighbor = generate_neighbor(current_solution)
     If calculate_fitness(neighbor) > current_fitness Then
     current_solution, current_fitness = neighbor, calculate_fitness(neighbor)
  Else
   For each individual in population:
    individual.fitness = calculate_fitness(individual)
   new_population = generate_next_gen(population, IKD, SKD)
   update_IKD_and_SKD(IKD, SKD, new_population)
   population = new_population
   If termination_criteria_met(): break
  iteration += 1
// Step 3: Return results
Return (current_solution, current_fitness) If approach_type == "LocalSearch"
  Else (select_best(population), best_fitness)
End Function

The intricacies of nature inspired algorithms [[31], [32], [33]] their initiation, progression, and termination, while emphasizing the performance evaluation. Hill climbing [31] is a local search algorithm that iteratively improves a solution by evaluating neighbouring solutions and selecting the best one based on an objective function. It continues until a termination condition is met, such as reaching a set iteration limit or encountering a local optimum. This heuristic approach is effective for solving complex combinatorial optimization problems where traditional methods struggle. The SHLO algorithm [13,33], generates an initial population and uses learning operators—random, individual, social, and hybrid—to explore global optima by mimicking human learning behaviours. As a global search technique, it avoids local optima and delivers reliable results for complex problems. The optimization process hinges on an objective function defined above over the solution space, guiding the algorithm towards the optimal solution.

Problem formulation for stock portfolio optimization

The portfolio optimization based on a multidimensional knapsack problem [15] with the total budget, budget limit for individual stock, cardinality, floor and ceiling (quantity of stock), and category (diversification and risk) constraints can be defined as follows: In every equation ‘k’s value goes from 1 to n.

Maximizefk(x)=k=1nWHk×SHk+WIVk×SIVk+WRGk×SRGk+WTBk×STBk (2)

s.t.

k=1nspkzkTB, (3)
cTBzkdTB,where0cd1, (4)
k=1nyk=p, (5)
lkykzkukykk{1,2,.,n}, (6)
LmykcmzkUm, (7)
zkint,k{1,2,.,n}, (8)
yk{0,1},k{1,2,.,n}, (9)

Objective function in Eq. (2) seeks to combine weighted scores (SH, SIV, SRG, STB) representing stock health fitness value, percent change in intrinsic value, revenue growth over next year, and normalized budget, respectively. The weights (WH, WIV, WRG, WTB) allow the user to assign importance to each criterion in the optimization process.

Eq. (3) introduces the total budget constraint, which assure that the sum of the weights of all stocks does not exceed the available total budget. In this equation, ‘spk’ represents the stock price of stock ‘k’, TB is the total budget, and zk is the integer variable representing the quantity of shares of stock ‘k’.

Eq. (4) introduces the budget constraint for individual stocks. The weight of the stocks selected does not exceed the boundaries specified for the stocks budget. In this equation, ‘c’ and ‘d’ are lower and upper limit of budget used by single stock out of total budget. TB is the total budget, and zk is the integer variable representing the quantity of shares of stock ‘k’.

Eq. (5) introduces a cardinality constraint that specifies the upper limit of stocks that can be included in the portfolio, aligning the Model with the investor's expectations. Here, 'p’ denotes the highest number of stocks permitted in the portfolio, and yk is a binary variable that signals whether stock ‘k’ is included in the portfolio (yk = 1) or not (yk = 0).

Eq. (6) gives the floor and ceiling constraint, which set the boundaries for the permissible range of quantity per stock. Here, lk and uk represent the lower and upper bounds for stock ‘k’, respectively.

Eq. (7) introduces category constraint, which come into play when available stocks are categorized into different classes such as large-cap, mid-cap, small-cap based on market cap of stock. Recognizing the importance of diversification, the algorithm strives to create portfolios with a well-balanced mix of stocks. This strategic approach aims to disperse the risk across various classes. Here, Lm and Um represent the lower and upper bounds for class m, respectively.

(8), (9) describe the structure of the decision variables, which consist of both binary and integer variables.

Method validation

The validation of experimental results is a critical step in confirming the effectiveness of various machining parameters. This chapter will validate the performance of the proposed DSS when running in a realistic environment. In Table 3 we give details of sample 1 input. For sample 1, hill climbing and SHLO algorithms optimized stock portfolios with budgets of 9774 and 7230, achieving best objective values of 7.40 and 6.22, respectively. Over 12 months, returns were 41.42 % (hill climbing) and 59.42 % (SHLO), outperforming indices by ∼25 % and 2x margins, as shown in Fig. 4, Fig. 5. Hill climbing's top stocks include Credicorp Ltd., Cigna Corp., Neurocrine Biosciences, and Alibaba, while SHLO's are First Citizens Bancshares, Nvidia, and Netflix. Unused budgets are 2.3 % (hill climbing) and 27.7 % (SHLO). Similarly author tested optimized portfolios for 20 different samples for both algorithms. Fundamental investing proves better & reliable for long-term results.

Table 3.

Details of sample 1 input.

Cardinality for the portfolio 10 No. of mid-cap stocks 2
Total budget 10,000 Lower budget limit 0.05
No. of large-cap stocks 5 Upper budget limit 0.2

Fig. 4.

Fig 4

Comparison of optimized portfolios for sample 1 using Hill climbing algorithm.

Fig. 5.

Fig 5

Comparison of optimized portfolios for sample 1 using SHLO algorithm.

Optimized portfolios reveal distinct trends across risk, cardinality, and stock type shown in Figs. 6, Fig. 7, Fig. 8. Low-risk portfolios, dominated by less volatile large-caps, outperform benchmarks like the S&P 500, while high-risk portfolios with small-caps trail slightly, with returns dropping from 50.74 % to 28.12 % (hill climbing) and 55.52 % to 23.13 % (SHLO). Cardinality impacts returns as well, declining with diversification, from 50.75 % to 32.68 % (hill climbing) and 44.67 % to 14.24 % (SHLO); however, most still outperform benchmarks. Growth stocks, being high-risk and high-reward, underperform value stocks by about 1.5 times, though SHLO generally outpaces hill climbing. Across all strategies, optimized portfolios consistently exceed benchmarks over 12 months, highlighting effective optimization and robust fundamentals.

Fig. 6.

Fig 6

Trend of optimized portfolios returns vs. Benchmark indices by risk.

Fig. 7.

Fig 7

Trend of optimized portfolios returns vs. Benchmark indices by cardinality.

Fig. 8.

Fig 8

Comparison of optimized portfolios returns vs. Benchmark index (By stock type).

The above proposed methods validation shows us that method is suitable for stock market investing and it can be replicated for the purpose of study.

Conclusion & future scope

The proposed stock portfolio optimization method using nature inspired hill climbing algorithm is active and dynamic which iteratively optimizes portfolio based on objective function similarly simple human learning optimization algorithm also learn from human mimics of random learning, individual learning and social learning. The novelty of the proposed methodology of stock portfolio optimization is hybridizing nature-inspired algorithms with independent models. Customized dataset designed from historical financial data with fundamental parameters used for stock portfolio optimization using SHLO or hill climbing algorithm, which takes independent modules output as an input for optimization purposes. Results gave us different types of optimized stock portfolios, which validates that the model is flexible enough to satisfy multiple constraints as well as user input variations. DSS optimizes portfolios under various constraints, outperforming benchmarks by ∼25 % (hill climbing) and ∼2x (SHLO) in sample 1. Scenario 1 gave us a portfolio where risk is moderated by picking more large-cap stocks than mid and small-cap stocks, which gives 1/3rd more returns compared to benchmark indices. Overall, after different results comparisons, we conclude that our optimized portfolios with varying values of constraints >80 % of the time outperform US market indices returns. As optimized portfolios are tested with real-time data, performance indicates practical implementation in the real world. Results show that model is capable of giving a stock portfolio according to investors' preferences and risk profiles as investor has flexibility in choosing variations in constraints of stock.

The portfolio optimization model can be tested by giving another untested dataset. It has greater flexibility than existing methods. Automatic generation of stock portfolios will become efficient due evolutionary analysis and reduce human error. Future research could expand the stock portfolio optimization model by incorporating more advanced nature-inspired algorithms and hybrid approaches to improve adaptability to diverse markets. Machine learning techniques for real-time market trend and stock performance prediction could enhance accuracy and robustness. Adding alternative data, such as sentiment analysis and macroeconomic indicators, could provide deeper insights for portfolio construction. Testing scalability with larger datasets and global markets would evaluate its universality. Developing a user-friendly interface for real-time portfolio adjustments based on investor preferences and market fluctuations could further enhance its practical implementation and versatility.

Limitations

Not Applicable

Ethics statements

Not Applicable

CRediT author statement

Suyash Satpute: Formal analysis, Conceptualization, Methodology, Visualization, Software, Validation, Writing – original draft. Amol Adamuthe: Conceptualization, Investigation, Supervision, Writing – review & editing. Pooja Bagane: Investigation, Supervision, Writing – review & editing.

Managerial and policy implications

The proposed approach addresses key deficiencies in current stock portfolio optimization practices by integrating fundamental analysis with advanced combinatorial optimization algorithms. While existing strategies over-rely on technical indicators and short-term forecasting, our research reorients attention toward long-term portfolio performance using real-world financial fundamentals like ROE, ROIC, and quarterly earnings.

For portfolio managers and investment strategists this methodology provides a structured, data-driven decision support system that not only captures return-risk trade-offs through independent modules but also incorporates overall fundamentally macroeconomic robustness over extended horizons (e.g., 1 Year). The results are more stable, realistic, and psychologically aligned portfolio selection framework, which can outperform purely technical or machine-learned models that lack financial interpretability.

Managerial & Policy perspective - Proposed method enables:

  • 1)

    Enhanced asset screening by leveraging fundamental metrics often overlooked in technical approaches.

  • 2)

    Scenario-based testing across different time frames (20, 50, 100 weeks) to assess portfolio robustness and mitigate loss-aversion.

  • 3)

    Promote hybrid investment frameworks that integrate optimization techniques with sound financial analysis to ensure long-term market integrity and investor protection.

  • 4)

    Support investor education policies that reinforce understanding of both algorithmic recommendations and the enduring value of fundamentals in long-term wealth building.

Declaration of competing interests

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Footnotes

Related research article:None

For a published article:None

Contributor Information

Suyash S. Satpute, Email: suyashsatpute999@gmail.com.

Amol C. Adamuthe, Email: amol.adamuthe@ritindia.edu.

Pooja Bagane, Email: pooja.bagane@sitpune.edu.in.

Data availability

  • All data and code links are given inside the manuscript.

References

  • 1.Girish Vaidya A.M., Waghela N.H., Yewale S.S. Decision support system for the stock market using data analytics and artificial intelligence. Int. J. Comput. Appl. 2015;117(8) doi: 10.5120/20574-2977. [DOI] [Google Scholar]
  • 2.Huang K.Y., Jane C.J., Chang C. An enhanced approach to optimizing the stock portfolio selection based on Modified Markowitz MV method. J. Converg. Inf. Technol. 2011;6(2):226–239. https://doi:10.4156/jcit.vol6.issue2.24 [Google Scholar]
  • 3.Lin Y., Liu S., Yang H., Wu H. Stock trend prediction using candlestick charting and ensemble machine learning techniques with a novelty feature engineering scheme. IEEe Access. 2021;9:101433–101446. doi: 10.1109/ACCESS.2021.3096825. [DOI] [Google Scholar]
  • 4.Mehmanpazir F., Asadi S. Development of an evolutionary fuzzy expert system for estimating the future behavior of stock price. J. Ind. Eng. Int. 2017;13(1):29–46. doi: 10.1007/s40092-016-0165-7. [DOI] [Google Scholar]
  • 5.Shakeri B., Zarandi M.F., Tarimoradi M., Turksan I.B. 2015 Annual Conference of the North American Fuzzy Information Processing Society (NAFIPS) held jointly with 2015 5th World Conference on Soft Computing (WConSC) IEEE; 2015. Fuzzy clustering rule-based expert system for stock price movement prediction; pp. 1–6. [DOI] [Google Scholar]
  • 6.Goumatianos N., Christou I., Lindgren P. Stock selection system: building long/short portfolios using intraday patterns. Procedia Econ. Finance. 2013;5:298–307. doi: 10.1016/S2212-5671(13)00036-1. [DOI] [Google Scholar]
  • 7.Huang Y., Capretz L.F., Ho D. 2019 IEEE Canadian Conference of Electrical and Computer Engineering (CCECE) IEEE; 2019. Neural network models for stock selection based on fundamental analysis; pp. 1–4. [DOI] [Google Scholar]
  • 8.Shen K.Y., Tzeng G.H. Combined soft computing model for value stock selection based on fundamental analysis. Appl. Soft. Comput. 2015;37:142–155. doi: 10.1016/j.asoc.2015.07.030. [DOI] [Google Scholar]
  • 9.www.stockanalysis.com, “Stock financial data,” 2023. [Online]. Available: https://www.stockanalysis.com. [Accessed: 01-Dec-2023].
  • 10.www.wallstreetprep.com, “Stock financial modeling,” 2023. [Online]. Available: https://www.wallstreetprep.com/knowledge/intrinsic-value/. [Accessed: 01-Dec-2023].
  • 11.Patalay S., Bandlamudi M.R. Decision support system for stock portfolio selection using artificial intelligence and machine learning. Ingénierie des Systèmes d Inf. 2021;26(1):87–93. doi: 10.18280/isi.260109. [DOI] [Google Scholar]
  • 12.John C. High-speed hill climbing algorithm for portfolio optimization. Tanzania J. Sci. 2021;47(3):1236–1242. doi: 10.4314/tjs.v47i3.31. [DOI] [Google Scholar]
  • 13.Wang L., Ni H., Yang R., Fei M., Ye W., et al. In: LSMS/ICSEE 2014, Part II, CCIS 462. Fei M., et al., editors. Springer-Verlag; Berlin Heidelberg: 2014. A simple human learning optimization algorithm; pp. 56–65. [DOI] [Google Scholar]
  • 14.Ma Y., Mao R., Lin Q., Wu P., Cambria E. Quantitative stock portfolio optimization by multi-task learning risk and return. Inf. Fusion. 2024;104 doi: 10.1016/j.inffus.2023.102165. [DOI] [Google Scholar]
  • 15.Vaezi F., Sadjadi S.J., Makui A. A robust knapsack based constrained portfolio optimization. IJE Trans. B: Appl. 2020;33(5):841–851. doi: 10.5829/ije.2020.33.05b16. [DOI] [Google Scholar]
  • 16.Sadjadi S.J., Gharakhani M., Safari E. Robust optimization framework for cardinality constrained portfolio problem. Appl. Soft. Comput. 2011;11(2):2052–2061. doi: 10.1016/j.asoc.2011.09.006. [DOI] [Google Scholar]
  • 17.Gottschlich J., Hinz O. A decision support system for stock investment recommendations using collective wisdom. Decis. Support. Syst. 2014;59:52–62. doi: 10.1016/j.dss.2013.10.005. [DOI] [Google Scholar]
  • 18.Huang J.-J., Tzeng G.-H., Ong C.-S. A novel algorithm for uncertain portfolio selection. Appl. Math. Comput. 2006;173:350–359. doi: 10.1016/j.amc.2005.04.074. [DOI] [Google Scholar]
  • 19.Cura T. Particle swarm optimization approach to portfolio optimization. Nonlinear Anal.: Real World Appl. 2009;10(4):2396–2406. doi: 10.1016/j.nonrwa.2008.04.023. [DOI] [Google Scholar]
  • 20.Zhu H., Wang Y., Wang K., Chen Y. Particle swarm optimization (PSO) for the constrained portfolio optimization problem. Expert. Syst. Appl. 2011;38:10161–10169. doi: 10.1016/j.eswa.2011.02.075. [DOI] [Google Scholar]
  • 21.Rosati R., Romeo L., Goday C.A., Menga T., Frontoni E. Machine Learning in Capital markets: decision support system for outcome analysis. IEEe Access. 2020;8 doi: 10.1109/ACCESS.2020.3001455. [DOI] [Google Scholar]
  • 22.Lin C.-J., Chern M.-S., Chih M. A binary particle swarm optimization based on the surrogate information with proportional acceleration coefficients for the 0-1 multidimensional knapsack problem. J. Ind. Prod. Eng. 2015;32(11):350–359. doi: 10.1080/21681015.2015.1111263. [DOI] [Google Scholar]
  • 23.Oh K.J., Kim T.Y., Min S. Using genetic algorithm to support portfolio optimization for index fund management. Expert. Syst. Appl. 2005;28:371–379. doi: 10.1016/j.eswa.2004.10.014. [DOI] [Google Scholar]
  • 24.Fu L., Li J., Pu S. A comparative study of heuristic methods for cardinality constrained portfolio optimization. High-Conf. Comput. 2023;3 doi: 10.1016/j.hcc.2022.100097. [DOI] [Google Scholar]
  • 25.Azarberahman A., Tohidinia M., Aliakbarzadeh H. Multi-objective portfolio optimization strategy using the SPEA-II algorithm. J. Inf. Commun. Technol. 2025;24(1):52–78. doi: 10.32890/jict2025.24.1.3. [DOI] [Google Scholar]
  • 26.Guarino A., Santoro D., Grilli L., Zaccagnino R., Balbi M. EvoFolio: a portfolio optimization method based on multi-objective evolutionary algorithms. Neural Comput. Appl. 2024;36(13):7221–7243. doi: 10.1007/s00521-024-09456-w. (0123456789( ).,-volV)(0123456789( ).,-volV. [DOI] [Google Scholar]
  • 27.www.linkedin.com, “Stock financial modeling,” 2023. [Online]. Available: https://www.linkedin.com/pulse/how-calculate-apply-discount-rate-jordan-lambert-cfa [Accessed: 01-Dec-2023].
  • 28.www.bankrate.com, “Stock financial data,” 2023. [Online]. Available: https://www.bankrate.com/investing/important-financial-ratios/. [Accessed: 01-Dec-2023].
  • 29.Hilkevics S., Hilkevica G. New information technologies use for Latvian companies financial health evaluation. Entrep. Sustain. Issues. 2017;5(2):178–189. doi: 10.9770/jesi.2017.5.2(1). [DOI] [Google Scholar]
  • 30.Sabău-Popa C.D., Simut R., Droj L., Bent e, C C. Analyzing financial health of the SMEs listed in the AERO market of Bucharest Stock Exchange using principal component analysis. Sustainability. 2020;12(9):3726. doi: 10.3390/su12093726. [DOI] [Google Scholar]
  • 31.Chinnasamy S., Ramachandran M., Amudha M., Ramu K. A review on hill climbing optimization methodology. Recent Trend. Manag. Commer. January 2022;3(1):1–7. [Google Scholar]
  • 32.Yuret D. CiteSeer; April 1998. Dynamic Hill Climbing: Overcoming the Limitations of Optimization Techniques. [Google Scholar]
  • 33.Wang L., Yang R., Ni H., Ye W., Fei M., Pardalos P.M. A human learning optimization algorithm and its application to multi-dimensional knapsack problems. Appl. Soft. Comput. 2015;34:736–743. doi: 10.1016/j.asoc.2015.06.004v. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

  • All data and code links are given inside the manuscript.


Articles from MethodsX are provided here courtesy of Elsevier

RESOURCES