An Application for Portfolio Optimization, Risk Sensitivity and Efficient Frontier Visualization in Mathematica-Scilight

Digital Technologies Research and Applications

Article

An Application for Portfolio Optimization, Risk Sensitivity and Efficient Frontier Visualization in Mathematica

Downloads

Pelekoudas, C. M., Tsopouridou, E. P., & Papadopoulos, I. (2025). An Application for Portfolio Optimization, Risk Sensitivity and Efficient Frontier Visualization in Mathematica. Digital Technologies Research and Applications, 4(2), 212–231. https://doi.org/10.54963/dtra.v4i2.1364

Authors

  • Charalampos M. Pelekoudas

    School of Economics and Business, Department of Economics, University of Thessaly, 38333 Volos, Greece
  • Eleni P. Tsopouridou

    School of Economics and Business, Department of Economics, University of Thessaly, 38333 Volos, Greece
  • Ioannis Papadopoulos

    School of Economics and Business, Department of Economics, University of Thessaly, 38333 Volos, Greece

Received: 27 June 2025; Revised: 15 July 2025; Accepted: 31 July 2025; Published: 20 August 2025

The present study develops a flexible and interactive decision‑support application for portfolio optimization, grounded in Modern Portfolio Theory and implemented within the Mathematica computational environment. The tool enables users to construct, analyze, and evaluate investment portfolios dynamically, incorporating real-time sensitivity analysis. In accordance with contemporary portfolio theory, it integrates two principal optimization strategies: (a) the Minimum Variance Portfolio and (b) the Maximum Sharpe Ratio Portfolio. The computational framework ingests real stock market data (Yahoo Finance), from which returns and covariance matrices are calculated. The resulting data serves as inputs for solving the corresponding optimization problems under user‑defined constraints. A key feature of the tool is the ability to perform real‑time sensitivity analysis with respect to expected returns, as well as to interactively adjust the risk‑aversion coefficient, providing users with immediate visual and numerical feedback. Interpretability is enhanced through graphical representations of the Efficient Frontier, overlaid with the optimal portfolios and the Capital Market Line on a unified plot. These visualizations support both educational and practical financial decision‑making. Overall, the tool offers a novel contribution by offering a hands‑on, visually rich, and analytically rigorous environment for understanding and applying portfolio optimization methods using real‑world data.

Keywords:

Modern Portfolio Theory Efficient Frontier Sharpe Ratio Risk Aversion CAPM Mathematica Software

References

  1. Markowitz, H. Portfolio Selection. J. Financ. 1952, 7, 77–91.
  2. Jha, A.; Shirvani, A.; Jaffri, A.M.; et al. Advancing portfolio optimization: Adaptive minimum-variance portfolios and minimum risk rate frameworks. January 26, 2025. Available from: https://ssrn.com/abstract=5112523 (accessed on 23 May 2025).
  3. Sharpe, W.F. Mutual Fund Performance. J. Bus. 1966, 39, 119–138. Available from: https://www.jstor.org/stable/2351741 (accessed on 20 May 2025).
  4. Mao, Z.; Gu, Z. Risk-adjusted stock performance: A cross-sector analysis of hospitality firms in the recent economic downturn. Int. J. Hosp. Tour. Admin. 2007, 8, 77–98. DOI: https://doi.org/10.1300/J149v08n04_04
  5. Markowitz, H. Portfolio Selection: Efficient Diversification of Investments; John Wiley & Sons: Hoboken, NJ, USA, 1959.
  6. Markowitz, H.M. Foundations of Portfolio Theory. J. Financ. 1991, 46, 469–477.
  7. Mangram, M.; Mangram, M.E. A Simplified Perspective of the Markowitz Portfolio Theory. Glob. J. Bus. Res. 2013, 7, 59–70. Available from: https://ssrn.com/abstract=2147880 (accessed on 23 May 2025).
  8. Lintner, J. The Valuation of Risk Assets and the Selection of Risky Investments in Stock Portfolios and Capital Budgets. Rev. Econ. Stat. 1965, 47, 13–37.
  9. Mossin, J. Equilibrium in a Capital Asset Market. Econometrica 1966, 34, 768–783.
  10. Fabozzi, F.J.; Markowitz, H.M.; Gupta, F. The Legacy of Modern Portfolio Theory. J. Invest. Fall 2002, 11, 7–22.
  11. Jagannathan, R.; Ma, T. Risk Reduction in Large Portfolios: Why Imposing the Wrong Constraints Helps. J. Financ. 2003, 58, 1651–1683. DOI: https://doi.org/10.1111/1540-6261.00580
  12. Benninga, J.; Berkowitz, M.; Kuehn, P.; et al. Character and Academics: What Good Schools Do. Phi Delta Kappan 2006, 87, 448–452. DOI: https://doi.org/10.1177/003172170608700610
  13. Halkos, G.E.; Tsilika, K.D. A Dynamic Interface for Trade Pattern Formation in Multi-regional Multi-sectoral Input-output Modeling. Comput. Econ. 2015, 46, 671–681. DOI: https://doi.org/10.1007/s10614-014-9466-3
  14. Roy, A.D. Safety First and the Holding of Assets. Econometrica 1952, 20, 431–449.
  15. Sharpe, W.F. A Simplified Model for Portfolio Analysis. Manag. Sci. 1963, 9, 277–293. DOI: https://doi.org/10.1287/mnsc.9.2.277
  16. Bailey, D.H.; López De Prado, M.M. The Sharpe Ratio Efficient Frontier. J. Risk 2012, 15, 3–44.
  17. Sharpe, W.F. The Sharpe Ratio. J. Portf. Manag. 1994, 21, 49–58. DOI: https://doi.org/10.3905/jpm.1994.409501
  18. Fama, E.F.; French, K.R. The Capital Asset Pricing Model: Theory and Evidence. J. Econ. Perspect. 2004, 8, 25–46.
  19. Harry Markowitz’s Modern Portfolio Theory: The Efficient Frontier. Available from: https://guidedchoice.com/modern-portfolio-theory/ (accessed on cited 13 June 2025).
  20. Treynor, J.L.; Black, F. How to Use Security Analysis to Improve Portfolio Selection. J. Bus. 1973, 46, 66–86. DOI: https://doi.org/10.1086/295508
  21. Halkos, G.E.; Tsilika, K.D. Trading Structures for Regional Economies in CAS Software. Comput. Econ. 2016, 48, 523–533. DOI: https://doi.org/10.1007/s10614-015-9515-6
  22. Halkos, G.E.; Tsilika, K.D. A New Vision of Classical Multi-regional Input–Output Models. Comput. Econ. 2018, 51, 571–594. DOI: https://doi.org/10.1007/s10614-016-9624-x
  23. Tsilika, K. A Mathematica-Based Interface for the Exploration of Inter- and Intra-Regional Financial Flows. Mathematics 2024, 12, 877. DOI: https://doi.org/10.3390/math12060877
  24. Hazrat, R. Mathematica®: A Problem-Centered Approach, 2nd ed.; Springer International Publishing: Cham, Switzerland, 2015. DOI: https://doi.org/10.1007/978-3-319-27585-7
  25. Kotsios, S.; Lomis, I. Mathematica for Economists. Kallipos Publications: Athens, Greece, 2024. DOI: https://doi.org/10.57713/kallipos-169
  26. Dehghani, F.; Larijani, A. Average Portfolio Optimization Using Multi-Layer Neural Networks With Risk Consideration. May 3, 2023. Available from: https://ssrn.com/abstract=4436648 (accessed on 1 July 2025).
  27. Logue, A.C. Harry Markowitz and modern portfolio theory. Encyclopedia Britannica. 2023. Available from: https://www.britannica.com/money/modern-portfolio-theory-explained (accessed on 1 July 2025).
  28. Wagon, S. Mathematica® in Action, 3rd ed.; Wagon, S., Ed.; Springer New York: New York, NY, USA, 2010. DOI: https://doi.org/10.1007/978-0-387-75477-2
  29. Ma, S.; Appolloni, A. Can financial flexibility enhance corporate green innovation performance? Evidence from an ESG approach in China. J. Environ. Manag. 2025, 387, 125869.
  30. Tong, Z., et al. How to Mitigate Climate Change? Dynamic Linkages between Clean Energy and Systemically Important Banks. Glob. NEST J. 2025, 27. DOI: https://doi.org/10.30955/gnj.07307
  31. Pazouki, S.; Jamshidi, M. (Behdad); Jalali, M.; et al. Transformative Impact of AI and Digital Technologies on the FinTech Industry: A Comprehensive Review. Int. J. Adv. Res. Hum. Law 2025, 2, 1–27. DOI: https://doi.org/10.63053/ijrel.37
  32. Pazouki, S.; Jamshidi, M.; Jalali, M.; et al. Artificial Intelligence and Digital Technologies in Finance: A Comprehensive Review. J. Econ. Financ. Account. Stud. 2025, 7, 54–69. DOI: https://doi.org/10.32996/jefas.2025.7.2.5
  33. Ma, S.; Abedin, M. The impact of the reforms in the Chinese equities exchange and quotations on innovation in cross-border e-commerce enterprises. Asia Pac. Bus. Rev. 2025. DOI: https://doi.org/10.1080/13602381.2025.2510509
  34. Liu, H.; He, Q.; Cong, R.; et al. Exploring the Dynamic Linkages between Carbon Trading Market and Smart Technology Indices: A Multi-dimensional Analysis of China's Case. Int. Rev. Econ. Financ. 2025, 102, 104360.
  35. Andersen, ; Højsgaard, . Computer Algebra in R Bridges a Gap Between Symbolic Mathematics and Data in the Teaching of Statistics and Data Science. R J. 2024, 15, 181–197.
  36. Aruoba, S.B.; Fernández-Villaverde, J. A Comparison of Programming Languages in Economics. NBER Working Paper No. w20263. 2014. Available from: https://ssrn.com/abstract=2460602 (accessed on 1 July 2025).
  37. Ahmadirad, Z. Evaluating the Influence of AI on Market Values in Finance: Distinguishing Between Authentic Growth and Speculative Hype. Int. J. Adv. Res. Hum. Law 2024, 1, 50–57.
  38. Zhang, H. Limitations and Critique of Modern Portfolio Theory: A Comprehensive Literature Review. Adv. Econ. Manag. Political Sci. 2024, 60, 24–29.