Portfolio Optimization of Stocks – Python-Based Stock Analysis
DOI:
https://doi.org/10.54097/ijeh.v9i2.9584Keywords:
Stock price changes, Monte Carlo simulation, Sharpe ratio, Portfolio optimization.Abstract
With the development of big data, blockchain artificial intelligence, and other technologies, the development of the financial industry also plays a great role in promoting the development of digital finance is also developing rapidly, the huge amount of financial data, the laws behind, randomness, the complexity have increased the difficulty of processing our data. The financial industry is also increasingly in need of data processing talents. For financial data such as: intra-day high-frequency data and stock price and volume data processing, Python has the points of fast calculation speed, open source, and excellent data visualization. In this paper, financial data analysis work based on the Python platform, six FTSE A50 constituent stocks of different industries are selected from the Chinese stock market, namely China Merchants Bank, SAIC Group, Haitong Securities, Capital Mining, China Unicom and Poly Development for financial data analysis. The optimal portfolio with the largest Sharpe ratio and the optimal portfolio with the smallest variance is obtained empirically by Python, and optimized by Monte Carlo simulation, and their expected returns, standard deviations, and Sharpe ratios are compared and analyzed, and finally, the effective boundaries of the asset portfolios are given. The importance of Markowitz‘s portfolio theory in financial risk management is further illustrated through empirical analysis.
Downloads
References
N.J. Huang, M.Z. Yu: Advances in Research on the Impact of Machine Learning on Economics Research, Journal of Economic Dynamics, Vol. 12 (2018) No.7, p.115-129.
M. Lngkvist, L. Karlsson, A. Loutfi: A Review of Unsupervised Feature Learning and Deep Learning for Time-Series Modeling, Pattern Recognition Letters, Vol. 48 (2014) No.42, p.11-24.
H.M. Markowitz, H. Harry: Portfolio Selection: Efficient Diversification of Investment, Journal of the Institute of Actuaries, Vol. 119 (1992) No.1, p.243-265.
W.F. Sharpe: The Sharpe Ratio, Streetwise–the Best of the Journal of Portfolio Management, Vol. 10 (1998) No.3, p.169-185.
S.N. Wu, B. Chen: A Theoretical and Empirical Study of Risk Measurement Methods and Financial Asset Allocation Models, Journal of Economic Research, Vol. 12 (1999) No.9, p.30-38.
J.P. Yang, L.J. Zhang: Further Study on the Relationship between Portfolio Size and Risk Diversification in Shanghai Stock Market, Journal of Systems Engineering Theory and Practice, Vol. 12 (2005) No.10, p.21-28.
S.S. Zhu, R. Li, X.Y. Zhou, S.Y. Wang: On Portfolio and Financial Optimization: an Analysis and Reflection on Theoretical Research and Practice, Journal of Management Science, Vol. 6 (2004) No.6, p.1-12.
S.M. Li, P. Xu: Markowitz Portfolio Theory Model Application Study, Journal of Economic Sciences, Vol. 6 (2000) No.1, p.42-51.
J.X. Wu: A Theoretical and Empirical Study of the Effectiveness of ROE on Portfolio Construction - Stock Selection Criteria Based on the Core Concept of "Moat", Journal of Financial Economics, Vol. 12 (2021) No.9, p.59-66.
L.P. Sun: An Empirical Study of Markowitz's Portfolio Theory Based on Python, Times Financial Journal, Vol. 36 (2020) No.25, p.46-67+50.