Executive Summary

February 12, 2026

Optimization of stock portfolios with modern portfolio theory

Victor Vinci Fantucci; Miguel Ângelo Lellis Moreira

Summary prepared by the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege focused on synthesis and writing.

This study develops and validates an optimization model to build an efficient stock portfolio that achieves a predefined minimum annual return, minimizing associated risk, based on Modern Portfolio Theory (MPT). The research applies quantitative techniques for strategic asset allocation in the Brazilian capital market, aiming to offer a methodological alternative for investors seeking to supplement their retirement strategies. The central proposal is to demonstrate, through a practical case, how diversification and mathematical optimization can generate portfolios with a superior risk-return relationship compared to simplistic approaches, such as equal allocation, and conservative benchmarks.

The relevance of the research is anchored in the Brazilian social security scenario. Projections indicate a growing imbalance in the public system. In 2022, the ratio was 1.97 contributors per beneficiary, a number expected to fall to 0.86 in 2060 (Costanzi; Ansiliero, 2024). This inversion signals the urgency for citizens to develop private investment strategies to ensure financial security in retirement. In this context, exclusive reliance on the public system becomes risky, driving the need for active wealth management; allocation in variable income assumes a central role.

The transition to the capital market, however, introduces the relationship between risk and return. Risk management is fundamental to mitigate the impacts of volatility (Silva et al., 2018). The rational investor seeks to maximize return, conditioned on an acceptable risk limit (Neto, 2025). The premise that higher returns are associated with greater risks is an axiom of finance. The challenge is not to eliminate risk, but to manage it. An efficient portfolio is one that offers the highest profitability for a given level of risk, or the lowest risk for a desired return (Elton et al., 2014).

To this end, Harry Markowitz’s Modern Portfolio Theory (1952) formalized the concept of diversification. Markowitz demonstrated that the risk of a portfolio depends on the correlation between its assets, not just on the weighted average of individual risks. By combining assets that do not move in sync, it is possible to reduce unsystematic risk. This work is based on this principle. Although other models such as CAPM (Sharpe, 1964) and multifactor models (Fama; French, 1993) offer complementary perspectives, Markowitz’s approach (1959) remains the primary tool for optimizing and constructing the efficient frontier, the focus of this analysis.

The proposal is to apply Markowitz’s theory to a practical problem: the construction of a portfolio of Brazilian stocks for the long term. The work develops a replicable optimization process with real data and accessible tools. It seeks to validate the model’s effectiveness in achieving its goals and provide a methodological roadmap that can be adapted by individual investors, contributing to more informed decision-making in an increasingly complex environment.

This work is an applied research, which employs tools from Data Science and financial theory (Elton et al., 2014; Neto, 2025). With exploratory and descriptive objectives, it investigates the effects of diversification and optimization in portfolio construction, describing the risk-return relationship under different scenarios. The approach is quantitative, based on the statistical analysis of historical data with computational support. Mathematical modeling and simulations are prioritized to ensure the rigor and replicability of the results (Morettin; Bussab, 2017).

The selection of assets was a crucial step. Eight assets from four perennial sectors were chosen: banks (BBAS3, ITUB4), insurance companies (BBSE3, PSSA3), electric energy (EGIE3, ELET6), and sanitation (CSMG3, SAPR4). The choice is justified by their defensive characteristics, such as consistent cash generation, lower volatility, and dividend history, attributes sought by investors with a moderate profile (Damodaran, 2012). The criteria for the specific stocks included consolidated market presence, sector relevance, revenue predictability, high liquidity, and availability of a long historical data series.

The daily adjusted closing prices of the eight assets were extracted via the yfinance Python library (Aroussi, 2017). The analysis period was from January 2019 to March 2025, a window of over six years encompassing multiple economic cycles and market events, such as the COVID-19 crisis. Data treatment involved calculating daily percentage changes, which were aggregated to obtain average annual and monthly returns. The final step was the construction of the covariance matrix, which measures how the returns of each pair of assets vary jointly and is the central element of the Markowitz model, as it quantifies the benefit of diversification (Morettin; Bussab, 2017).

Portfolio optimization was implemented in MS Excel with the Solver add-in. The objective function was the minimization of the total portfolio variance, the TMP risk measure. The decision variables were the allocation weights of each of the eight assets. The process was subjected to constraints: the sum of all weights should be 100%; a minimum expected annual return of 14% was imposed; and individual allocation limits per asset, between 7.5% and 20%, were defined to ensure diversification and avoid excessive concentration.

To evaluate the model, six distinct scenarios were structured. Scenario 1 (C1) is the main optimized portfolio. Scenario 2 (C2) is an equal allocation portfolio (12.5% per asset), serving as a passive strategy benchmark. Scenario 3 (C3) uses the average annual CDI for the period as a conservative benchmark (Investidor10, 2025). Additionally, three sensitivity scenarios were created: Scenario 4 (C4), more restrictive (target of 15%, weights between 5% and 25%); Scenario 5 (C5), less restrictive (target of 13%, weights between 5% and 30%); and Scenario 6 (C6), an aggressive profile (target of 16%, weights between 5% and 35%).

The results for the base scenario (C1) reached the expected annual return of 14.00%. The optimal composition assigned the maximum weights (20%) to BBSE3 and PSSA3, and a high weight (19.09%) to SAPR4. The other assets received lower weights, with BBAS3, CSMG3, ELET6, and ITUB4 receiving the minimum of 7.5%. The risk of this portfolio, measured by the monthly standard deviation, was 1.62%, with a variance of 2.62 × 10⁻⁴. The structure demonstrates the algorithm’s ability to distribute capital in a non-intuitive way to minimize volatility, a benefit of the quantitative approach (Lehmkuhl; Schnorrenberger; Flach, 2021).

The comparison with the egalitarian allocation (C2) validates the superiority of the optimized model. The C2 portfolio generated a lower annual return of 13.16% and presented higher risk, with a monthly standard deviation of 1.73% and a variance of 2.98 × 10⁻⁴. Optimization increased profitability by 0.84 percentage points and reduced volatility. This efficiency gain materializes the benefit of intelligent diversification proposed by Markowitz (Elton et al., 2014). In relation to the conservative benchmark (C3), the average CDI of 9.89% per year, the optimized portfolio demonstrated superior performance, justifying the exposure to equity risk.

Sensitivity analysis reinforced the model’s consistency. In the most restrictive scenario (C4), requiring a 15% return, the portfolio risk increased, with the monthly standard deviation rising to 1.81%. In the aggressive scenario (C6), the pursuit of a 16% return raised the risk to a standard deviation of 2.05%. Conversely, in the least restrictive scenario (C5), with a 13% target, the model built a more conservative portfolio, with the lowest risk among the optimized scenarios (standard deviation of 1.48%). These results outline the efficient frontier, demonstrating the trade-off between risk and return: to achieve higher gains, the investor must accept greater volatility (Lima, 2022).

The discussion of the results highlights the contribution of sectoral diversification, imposed by allocation limits. By forcing the presence of all sectors, the model avoided excessive concentration, which contributed to the reduction of volatility and increased portfolio resilience. This finding reinforces the importance of combining quantitative optimization with qualitative management principles, such as strategic sectoral diversification (Bodie; Kane; Marcus, 2014). The model’s applicability for individual investors is notable, as the use of tools like MS Excel demystifies portfolio optimization, making it accessible.

It is necessary to recognize the limitations of the model. The analysis was based on historical data, and past performance does not guarantee future results. Transaction costs, taxes, and liquidity were not incorporated. Furthermore, the study focused on price appreciation, disregarding distributions (dividends and interest on own capital). The inclusion of dividends, which are relevant for the selected sectors, could increase portfolio performance and accentuate the advantage of the optimized portfolio over the CDI.

The study’s main practical contribution is the demonstration of an accessible and effective methodology for structuring more efficient investment portfolios. The combination of TMP with simple computational tools allows investors to structure their portfolios more scientifically and aligned with long-term objectives, such as retirement (Mira, 2024). The results confirm that the model was successful in achieving the desired return, keeping risk controlled and outperforming passive strategies. The flexibility shown in the sensitivity analysis validates the proposal as a tool adaptable to different investor profiles.

The study departed from the problematic of the Brazilian social security system, which makes the search for investment alternatives imperative. A quantitative methodology based on Modern Portfolio Theory was proposed and applied to construct and evaluate stock portfolios. The analysis, conducted with Brazilian market data and MS Excel’s Solver, demonstrated that mathematical optimization provides significant efficiency gains when compared to a passive allocation, achieving superior returns with controlled risk. The findings reinforce the importance of sectoral diversification and validate the model as a useful tool for investors with a moderate profile and long-term horizon.

The research contributes to the literature by applying a consolidated model to a current context, using an accessible approach. As suggestions for future work, it is recommended to expand the analysis to include other asset classes, such as real estate funds and international assets, incorporate dividends in the total return calculation, and use more advanced optimization methods. It is concluded that the central objective of the work was fully achieved: the effectiveness of Modern Portfolio Theory in constructing an optimized stock portfolio was demonstrated, capable of achieving a target return of 14% per year with minimized risk and superior performance to passive strategies and conservative benchmarks.

References:
Bodie, Z.; Kane, A.; Marcus, A. J. Investments. 10th ed. New York: McGraw-Hill, 2014.
Costanzi, R. N.; Ansiliero, G. Evolução e projeção de longo prazo de contribuintes e beneficiários e implicações para o financiamento da previdência social. Rio de Janeiro: Ipea, 2024. 59 p.: il. (Texto para Discussão, n. 2988).
Damodaran, A. Investment philosophies: successful strategies and the investors who made them work. 2nd ed. New York: Wiley, 2012.
Elton, E. J.; Gruber, M. J.; Brown, S. J.; Goetzmann, W. N. Modern portfolio theory and investment analysis. 9th ed. Hoboken: Wiley, 2014.
Fama, E. F.; French, K. R. Common risk factors in the returns on stocks and bonds. Journal of Financial Economics, v. 33, n. 1, p. 3–56, 1993.
Investidor10. 2025. TAXA CDI hoje, histórico mensal e anual do CDI. Disponível em: https://investidor10. com. br/indices/cdi/. Acesso em: 19/07/2025.
Lehmkuhl, R.; Schnorrenberger, D.; Flach, L. Teoria Moderna do Portfólio: a busca por uma carteira de investimentos adequada. Revista Controladoria e Gestão, v. 3, n. 1, p. 578–594, 2021.


Executive summary from the Final Course Work of the Specialization in Data Science and Analytics of the MBA USP/Esalq

Learn more about the course; click here:

Who edited this article

Most recent

You may also like

October 13, 2026

Predictors of death in the elderly with severe acute respiratory syndrome confirmed by Influenza A(H1N1)pdm09

Infection by the influenza A(H1N1)pdm09 virus can progress to Severe Acute Respiratory Syndrome (SARS), with a higher risk of death in the elderly. The objective was to analyze predictive factors of death in cases of SARS confirmed for influenza A(H1N1)pdm09, among the elderly aged 60 years or older, considering individual and contextual factors of the Administrative Regions (RA) of the State of São Paulo (ESP), and to compare the performance of regression models. A descriptive and analytical study was conducted in ESP, from 2023 to 2024, using data from SIVEP-Gripe and the SEADE Foundation. 714 cases confirmed by RT-PCR for influenza A(H1N1)pdm09 in residents of ESP aged 60 years or older were included. Sociodemographic, clinical, hospitalization, treatment, vaccination, and residence location variables were analyzed. Binary logistic regression and hierarchical logistic regression were used, with death as the outcome. Of the 714 cases, 202 resulted in death. The final binary logistic regression model associated a higher chance of death with the male sex, advanced age, oxygen saturation below 95%, ICU admission, and use of invasive ventilatory support. The presence of cough and the use of antiviral were associated with a lower chance of death. The hierarchical logistic model showed similar performance, with a small residual contextual contribution from the RAs. It was concluded that the binary logistic regression model was sufficient and simpler to represent the data, being adopted as the final model.

Keywords: Influenza A(H1N1)pdm09; Hierarchical logistic modeling; Death from Influenza A(H1N1)pdm09; Logistic Regression; Severe Acute Respiratory Syndrome.

October 13, 2026

A comparative overview of electric vehicle fleets in Brazil and the European Union

Road transport contributes to approximately 20% of global CO2 emissions, driving the search for cleaner mobility solutions, such as electric vehicles. The objective of this study was to compare the electric vehicle markets in Brazil and the European Union, contrasting their policies, consumer adoption, and infrastructure development. A comparative descriptive research design was employed, analyzing quantitative data from the Brazilian Electric Vehicle Association, National Association of Automotive Vehicle Manufacturers, European Alternative Fuels Observatory, and European Environment Agency for the period from 2015 to 2024, complemented by qualitative analysis of policy documents. The results revealed a fundamental structural divergence: Brazil showed exponential growth of 80.7% per year (2022-2025), with hybrids comprising approximately 66% of sales and driven by tax incentives that leverage the ethanol bioeconomy. The European Union, in turn, showed expansion in a consolidation phase at an annual rate of 8.35% (2008-2025), with battery electric vehicles exceeding 40% of new registrations, driven by binding regulatory mandates. Infrastructure density analysis indicated that the European Union’s public charging network (55.3 points per thousand alternative fuel vehicles) was double that of Brazil’s (27.9 points per thousand electrified vehicles). Environmental quantification confirmed that Brazil’s predominantly renewable energy matrix (64 gCO2/kWh) resulted in substantially lower well-to-wheel emissions compared to the European Union’s matrix (246 gCO2/kWh). It was concluded that the Brazilian model, with technology-neutral tax incentives and leveraging biofuel infrastructure, can accelerate hybrid adoption in emerging economies with low public spending. For mature markets, the European Union’s model, with regulatory mandates, has established a dominant battery electric vehicle market, albeit with a higher fiscal cost.

Keywords: Renewable energy; Market; Qualitative; Quantitative.

October 13, 2026

Population and Immigration in Japan: Projections with Time Series and Demographic Causal Analysis until 2044

Population aging and low fertility rates present complex demographic challenges in Japan, accompanied by the expansion of foreign immigration as a response to labor supply constraints. The study aimed to analyze Japanese demographic trends and project their evolution until 2044, with an emphasis on the relationships between population decline, fertility, and immigration. The ARIMA and Prophet time series models were applied to historical data from the World Bank, the National Institute of Population and Social Security Research of Japan, and the Immigration Services Agency of Japan, covering the period from 2003 to 2023 for the population series and from 2014 to 2024 for the immigration series. The analysis included descriptive statistics, Pearson correlation, augmented Dickey-Fuller stationarity test, and Granger causality tests, in addition to predictive evaluation using MAE and MAPE metrics. The results showed the continuation of population reduction and the growth of the immigrant contingent in projections up to 2044. Prophet presented lower MAE and MAPE values on the test sets, although the short duration of the immigration series limited generalization capacity. Temporal causality tests did not identify statistically significant evidence of precedence between population and immigration. It was concluded that immigration can contribute to mitigating labor supply constraints, but it does not, in isolation, constitute a sufficient mechanism to reverse Japan’s population decline.

Keywords: Population decline; Demography; Fertility; Migration flows; Time series.

October 13, 2026

Digital marketing and engagement on YouTube: strategies for real crime channels in Brazil

The phenomenon of true crime has consolidated itself as a growth niche on Brazilian YouTube, driven by the expansion of digital media and public fascination. However, many creators have faced difficulties in achieving sustainable growth. This study analyzed how digital marketing strategies influenced the growth, engagement, and monetization of Brazilian true crime channels on the YouTube platform. A mixed-methods research approach was adopted, combining qualitative and quantitative methods, with an exploratory and descriptive nature. Four Brazilian channels in the niche were analyzed through documentary analysis of content, collection of public metrics via Social Blade and Noxinfluencer, and the application of questionnaires to four creators and 104 viewers. The results showed that the highest-performing channels adopted distinct strategies, such as a linear and contextualized narrative approach, personalized emotional communication, a technical-informative stance, or provocative opinion-based content. Convergence was observed between creators and the audience regarding the centrality of storytelling for retention, with most viewers stating that the way the story was told determined continued viewing. Creators indicated average retention time as the most predictive metric for sustainable growth, although 100% depended exclusively on AdSense for monetization, revealing financial vulnerability. It was concluded that success in the niche depends on the integration of digital marketing, consistent narrative identity, and ethical responsibility.

Keywords: creator economy; digital engagement; content marketing; storytelling; true crime.

October 13, 2026

Use of Unsupervised Machine Learning techniques for planning remuneration review work for retirement

The sizing of personnel and the management of retirement flows in federal public bodies constituted complex strategic challenges. The study aimed to apply unsupervised Machine Learning techniques, specifically Clustering (K-means) and Multiple Correspondence Analysis (MCA), to improve the planning of functional reviews in a Brazilian federal autarchy. The methodology consisted of processing a validated database of 487 active servers. Initially, quantitative variables, such as age, contribution time, and remuneration, were subjected to the K-means algorithm, resulting in the formation of five clusters, supported by the Elbow Method and Silhouette Coefficient. Subsequently, the groups were integrated with qualitative variables via MCA, projected onto a perceptual map that explained 74.81% of the data’s inertia. The results revealed that clusters 0 and 3 represented profiles of greatest pension criticality, concentrating all beneficiaries of tenure bonus and the majority of extinct positions. The research generated a phased Action Plan, prioritizing the 75 servers in these clusters who met the retirement requirements by 2025, with a similar guideline for 2026. In contrast, cluster 2 presented lower risk, with inactivity predicted only from 2031 onwards. The model proved to be a widely favorable tool for auditing and remediation, although its full effectiveness depends on more rigorous data governance in public service.

Keywords: Clustering; Multiple Correspondence Analysis (MCA); Retirement; Clusterization.

October 13, 2026

Sales Management for the Performance of a Real Estate Company

Sales management plays a strategic role in organizational performance, especially in real estate development sectors, characterized by commercial complexity. This study aimed to analyze the contribution of sales management practices to the commercial and organizational performance of a company in the real estate sector, considering its operating model and commercial structure. The research was characterized as exploratory, with a qualitative and quantitative approach, adopting a single case study. Data were collected through triangulation, using documentary research and a structured questionnaire applied to the outsourced sales team. The results indicated that the company structured its commercial management practices with monthly and annual goals, marketing campaigns, and incentive systems. Performance was monitored by quantitative indicators, such as sales volume and goal achievement percentage. In the analyzed period, 179 sales were made, corresponding to 74.6% of the established annual goal. Opportunities for improvement were observed in the alignment between commercial planning, performance monitoring, and strategy effectiveness. The brokers’ perception pointed to limitations in the incentive systems, such as the absence of progressive commissions and the duration of bonuses. It was concluded that, although sales management influences organizational performance, there are weaknesses in the alignment between effort, reward, and sales force motivation. Strengthening systematic monitoring, improving communication, defining more realistic goals, and implementing progressive incentives were recommended to enhance commercial results.

Keywords: Sales strategies; Sales force; Commercial management; Performance indicators; Real estate sector.

October 13, 2026

Delineo: Adaptation of a diffusion model for sketch-guided user interface prototyping

The evolution of artificial intelligence and deep neural networks has revolutionized human-machine interactions. Generative models, while promising for image synthesis, face challenges in prototyping user interfaces (UI) by failing to respect spatial structure. To address this divergence, a conditioned latent diffusion approach was proposed, integrating a control architecture with a large-scale model fine-tuned for mobile interfaces, which supported UI sketches to guide image inference. The training dataset comprised approximately 12,400 UI images and sketches from public sources, pre-processed and enriched with synthetic data and textual instructions. The approach utilized a Stable Diffusion 3.5 Large model as a base, adapted with ControlNet canny edges and a LoRA adapter. The approach’s feasibility was validated by quantitative evaluation, employing a normalized semantic similarity (NSS) metric based on Sentence-BERT, and by qualitative analysis with 20 industry experts. The results confirmed that the method surpassed the original model’s capabilities. However, the evaluation highlighted that the effectiveness in logical interface structuring still faced aesthetic degradation and loss of functional elements. It was concluded that, although the technology proves its technical feasibility for optimizing the transition between requirements and code implementation, the automation of creative processes demands architectural improvements to achieve the visual rigor required by the software development industry.

Keywords: Low-rank adaptation; Machine learning; Conditioned latent diffusion; Deep neural networks.