Portfolio diversification is one of the most effective ways to minimize investment risk. Individuals and fund managers aim to create a portfolio of assets that not only have high returns but are also uncorrelated. This goal can be achieved by comparing the historical performance, fundamentals, predictions, news sentiment, and many other parameters that can affect the portfolio's value. One of the most well-known approaches to manage/optimize portfolios is the well-known mean-variance (Markowitz) portfolio. The algorithm's inputs are the expected returns and risks (volatility), and its output is the optimized weights for each asset in the target portfolio. Simplified unrealistic assumptions and constraints were used in its original version preventing its use in practical cases. One solution to improve its usability is by altering the parameters and constraints to match investment goals and requirements. This paper introduces PortFawn, an open-source Python library to create and backtest mean-variance portfolios. PortFawn provides simple-to-use APIs to create and evaluate mean-variance optimization algorithms using classical computing (real-valued asset weights) as well as quantum annealing computing (binary asset weights). This tool has many parameters to customize the target portfolios according to the investment goals. The paper introduces the background and limitations of the mean-variance portfolio optimization algorithm, its architecture, and a description of the functionalities of PortFawn. We also show how one can use this tool in practice using a simple investment scenario.
翻译:投资组合多样化是尽量减少投资风险的最有效方法之一。 个人和基金经理的目标是创建资产组合,不仅具有高回报,而且与资产组合无关。 这一目标可以通过比较历史业绩、基础、预测、新闻情绪和影响投资组合价值的许多其他参数来实现。 管理/优化投资组合的最著名方法之一是众所周知的中差(马尔科维茨)投资组合。 算法的投入是预期收益和风险(波动),其产出是目标组合中每项资产的最佳加权数。 最初版本使用了简化不现实的假设和制约因素,防止其用于实际案例。 改进其可用性的一个解决办法是改变参数和制约因素,以匹配投资目标和要求。 本文介绍了PortFawn,一个开放源Python图书馆,以创建和减少中差差价组合。 PortFawn提供简单到使用的APIPI, 其产出是利用古典计算(实时F)资产组合的优化加权数。 将这一资产组合的内差值和内限值作为资产成本的量化工具。我们用一个定制工具来计算。