# Strategic Portfolio Optimization Using Simulated, Digital, and Quantum Annealing
## 6 Portfolio Optimization Implementation
### Qibo Model  
As a foundation for our QUBO model, the approaches of [PERSON] et al. (2015), [PERSON] et al. (2011), and [PERSON] et al. (2016) were used. In the approach of [PERSON] et al., only a specific number of stocks can be selected. In our model, we lift this restriction and thus enable the investor to select an arbitrary amount of assets to invest in. With the approach of [PERSON] et al., only a single predefined amount of capital can be invested into an asset, or no money at all will be spent on this asset. In our model, we do not limit the investor to certain predefined amounts of money that can be invested into each asset, but enable the investor to spend an arbitrary amount of money on each asset. [PERSON] et al. incorporate logarithmic returns as well as a limitation of the amount of money that can be invested into a single asset in their QUBO model. The amount of money that can be invested into a single asset \(n\) in the approach of [PERSON] et al. is limited to the interval \([\omega_{n}^{min},\omega_{n}^{max}]\). The values \(\omega_{n}^{min}\) and \(\omega_{n}^{max}\) denote the percentage values with respect to the whole available budget, i.e., \(\omega_{n}^{min}\) and \(\omega_{n}^{max}\) are in the range \([0,1]\). [PERSON] et al. introduce this limitation in order to foster the creation of diverse portfolios. In our approach, we do not incorporate logarithmic returns, but rather use the Sharpe ratio of the assets that we gained via our preprocessingstep. We also do not limit an investor to certain ranges of amounts that the investor can spend on individual assets. In our evaluation (see Section 7), we will empirically show that lifting this restriction in our approach will still lead to the creation of a diverse portfolio. Thus, this restriction is not necessary for our QUBO model. We now present our modifications to the approaches mentioned above. In our approach, we do not limit the number of stocks that can be invested in and we also enable investors to spend potentially arbitrary fractions of their capital on each strategy. A solution to our approach indicates which fraction of the whole capital should be spent on which strategy. In our approach, we use 7 bits to express the available capital, similar to [PERSON] et al. [37]. Thus, a total fraction of \(127/127\) of the whole capital can be spent on strategies of a portfolio. For each available strategy \(s_{i}\) we introduce a 7-bit binary variable \(b_{i}\) as  
\[b_{i}=x_{i_{1}},x_{i_{2}},\ldots,x_{i_{7}} \tag{20}\]  
Binary variable \(x_{i_{1}}\) is the least significant bit and binary variable \(x_{i_{7}}\) is the most significant bit. Variable \(b_{i}\) will denote which fraction of the whole capital should be spent on a certain strategy. The 7 bits, capable of representing \(2^{7}=128\) different values from 0 to 127, is an arbitrary number that was chosen because it is the closest binary representation to the decimal number 100. For example, \(0000000_{bin}=0_{dec}\) represents \(0/127=0\), meaning that no capital is invested in the corresponding strategy. The other extreme, namely \(1111111_{bin}=127_{dec}\), represents \(127/127=1\), meaning that the entire capital is invested in the corresponding strategy. If for example \(b_{i}=7\), then the fraction \(7/127\) of the whole capital is spent on strategy \(s_{i}\). The goal of the portfolio optimization here is to allocate and distribute 100% (127/127) of the capital efficiently over different strategies to ensure diversification and lower risk. If an investor needs a more fine-grained breakdown of the capital, more than 7 bits can be used, resulting in a higher number than 127 and lower possible fractions than 1/127. Similarly to [PERSON] et al. [5], the attractiveness of an asset in our approach is measured by using the Sharpe ratio. However, in our approach, we do not cluster the Sharpe ratios into different classes with different weights, but use the nominal value of the Sharpe ratio.