Semi-Universal Portfolios with Transaction Costs
Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 178-183.
© 2015 International Joint Conferences on Artificial Intelligence
Abstract
Online portfolio selection (PS) has been extensively studied in artificial intelligence and machine learning communities in recent years. An important practical issue of online PS is transaction cost, which is unavoidable and nontrivial in real financial trading markets. Most existing strategies, such as universal portfolio (UP) based strategies, often rebalance their target portfolio vectors at every investment period, and thus the total transaction cost increases rapidly and the final cumulative wealth degrades severely. To overcome the limitation, in this paper we investigate new investment strategies that rebalances its portfolio only at some selected instants. Specifically, we design a novel on-line PS strategy named semi-universal portfolio (SUP) strategy under transaction cost, which attempts to avoid rebalancing when the transaction cost outweighs the benefit of trading. We show that the proposed SUP strategy is universal and has an upper bound on the regret. We present an efficient implementation of the strategy based on non-uniform random walks and online factor graph algorithms. Empirical simulation on real historical markets show that SUP can overcome the drawback of existing UP based transaction cost aware algorithms and achieve significantly better performance. Furthermore, SUP has a polynomial complexity in the number of stocks and thus is efficient and scalable in practice.
- [Agarwal et al., 2006] A. Agarwal, E. Hazan, S. Kale, and R.E. Schapire. Algorithms for portfolio management based on the newton method. In Proceedings of the Twenty-Third Interna- tional Conference, pages 9-16, 2006.
- [Bean and Singer, 2011] A.J. Bean and A.C. Singer. Factor graph switching portfolios under transaction costs. In IEEE International Conference on Acoustics, pages 5748-5751, 2011.
- [Bean and Singer, 2012] A.J. Bean and A.C. Singer. Universal switching and side information portfolios under transaction costs using factor graphs. IEEE Journal of Selected Topics in Signal Processing, 6(4):351-365, Aug 2012.
- [Blum and Kalai, 1997] A. Blum and A. Kalai. Universal port- folios with and without transaction costs. In Proceedings of the 10th Annual Conference on Computational Learning The- ory (COLT '97), 1997.
- [Bobryk and Stettner, 1999] R.V. Bobryk and L. Stettner. Dis- crete time portfolio selection with proportional transaction costs. Probability and Mathematical Statistics, 19:235-248, 1999.
- [Borodin et al., 2004] A. Borodin, R. El-Yaniv, and V. Gogan. Can we learn to beat the best stock. Journal of Artificial In- telligence Research, 21:579C594, 2004.
- T.M. Cover and E. Ordentlich. Universal portfolios with side information. IEEE Transac- tions on Information Theory, 42(2):348-363, Mar 1996.
- T.M. Cover and E. Ordentlich. Universal portfolios with short sales and margin. In Proceed- ings IEEE International Symposium, 1998.
- T.M. Cover. Universal portfolios. Mathematical Finance, 1(1):1-29, 1991.
- T.M. Cover. Universal data compression and portfolio selection. Proceedings of the 37th IEEE Symposium on Foundations of Computer Science, 1996.
- [Das et al., 2013] P. Das, N. Johnson, and A. Banerjee. Online lazy updates for portfolio selection with transaction costs. In Proceedings of the Twenty-Seventh AAAI Conference on Arti- ficial Intelligence, July , USA., 2013.
- [Das et al., 2014] P. Das, N. Johnson, and A. Banerjee. On- line portfolio selection with group sparsity. In Proceedings of The Twenty-Eighth AAAI Conference on Artificial Intelli- gence,July 27-31st, pages 1185-1191, 2014.
- [Gyorfi and Vajda, 2008] L. Gyorfi and I. Vajda. Growth Op- timal Investment with Transaction Costs. Springer-Verlag Berlin Heidelberg, 2008.
- [Helmbold et al., 1998] D. Helmbold, E. Scahpire, Y. Singer, and M. Warmuth. On-line portfolio selection using mul- tiplicative updates. Mathematical Finance, 8(4):325-347, 1998.
- [Huang et al., 2013] D.J. Huang, J.L Zhou, B. Li, S.C.H. Hoi, and S.G. Zhou. Robust median reversion strategy for on-line portfolio selection. In Proceedings of the 23rd International Joint Conference on Artificial Intelligence, August 3-9, pages 2006-2012, 2013. IJCAI
- [Iyengar and Cover, 2000] G.N. Iyengar and T.M. Cover. Growth optimal investment in horse race markets with costs. IEEE Transactions on Information Theory, 46(7):2675-2683, Nov 2000.
- [Iyengar, 2002] G. Iyengar. Discrete time growth optimal in- vestment with costs. Working Paper, 2002.
- [Kalai and Vempala, 2000] A Kalai and S. Vempala. Efficient algorithms for universal portfolios. In Proceedings 41st An- nual Symposium on Foundations of Computer Science, pages 486-491, 2000.
- [Kelly, 1956] J.L. Kelly. A new interpretation of information rate. Information Theory, IRE Transactions on, 2(3):185-189, September 1956.
- [Kozat and Singer, 2008] S.S. Kozat and A.C. Singer. Universal switching portfolios under transaction costs. In Processing, ICASSP. IEEE International Conference on Acoustics, Speech and Signal, pages 5404-5407, 2008.
- [Kozat and Singer, 2009] S.S. Kozat and A.C. Singer. Switch- ing strategies for sequential decision problems with multi- plicative loss with application to portfolios. IEEE Transac- tions on Signal Processing, 57(6):2192-2208, June 2009.
- [Kozat and Singer, 2011] S.S. Kozat and A.C. Singer. Universal semiconstant rebalanced portfolios. Mathematical Finance, 21(2):293-311, 2011.
- [Kschischang et al., 2001] F.R. Kschischang, B.J. Frey, and H.- A. Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on Information Theory, 47(2):498-519, Feb 2001.
- [Li and Hoi, 2014] B. Li and S.C.H. Hoi. Online portfolio selec- tion: A survey. ACM Computing Surveys, 46(3):35:1-35:36, 2014.
- [Markowitz, 1952] H. Markowitz. Portfolio selection. The Jour- nal of Finance, 7(1):77-91, 1952.
- E. Ordentlich and T.M. Cover. Online portfolio selection. Proceedings of the 9th Annual Conference on Computational Learning Theory, 1996.
- [Ormos and Urban, 2011] M. Ormos and A. Urban. Perfor- mance analysis of log-optimal portfolio strategies with trans- action costs. Quantitative Finance, 2011.
- [Schafer, 2002] D. Schafer. Nonparametric estimation for finan- tial investment under log-utility. PhD Dissertation, Mathe- matical Institute, University Stuttgart. Shaker Verlag, Aachen, 2002.
- [Willems, 1996] F.M.J. Willems. Coding for a binary in- dependent piecewise-identically-distributed source. IEEE, 42(6):2210-2217, Nov 1996.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Portfolio selection (PS) aims to optimize the allocation of wealth across a set of assets to achieve certain long-term financial goal. Some early research on PS can be dated back to the mean variance theory [Markowitz, 1952], which optimizes portfolios by trading off the expected return (mean) and risk (variance). The subsequent capital growth theory [Kelly, 1956] focuses on multiple-periods or sequential PS, aiming at maximizing portfolio's expected growth rate, or expected log return. While both theories can solve the PS problem, the latter is fitted to the online scenario and thus constitutes the basis of online PS, and has been extensively explored in artificial intelligence [Cover, 1991; Cover and Ordentlich, 1996; 1998] and machine learning communities [Agarwal et al., 2006; Borodin et al., 2004; Huang et al., 2013].
Most state-of-the-art on-line PS strategies ignore transaction cost [Li and Hoi, 2014]. Transaction cost, as one central friction in financial markets, is prevalent in almost all of the financial trading. When investors face transaction costs in financial markets, their trading strategies may be much different. Therefore, how investors should trade in the presence of transaction cost remains an open yet important question.
Recently, some on-line PS studies [Blum and Kalai, 1997; Helmbold et al., 1998; Kozat and Singer, 2011; Das et al., 2013; 2014] have attempted to address transaction cost. Though these transaction cost aware algorithms, such as universal portfolio (UP) based strategies [Blum and Kalai, 1997], achieve encouraging results on many datasets, the actual suffering under transaction cost is still very high. This is because the existing UP based transaction cost aware strategies often rebalance their target portfolio vectors at every investment period, which is not always necessary, and makes the total transaction cost increase rapidly. Furthermore, these algorithms have an exponential complexity in the number of stocks [Blum and Kalai, 1997], which makes them impractical in real world scenarios.
To address the above drawbacks, in this paper, we present a new multi-period online PS strategy named semi-universal portfolio (SUP) with transaction cost. The basic idea is to employ Cover's UP as a moving target portfolio and rebalance the portfolio only at some selected instants, which may avoid rebalancing when the transaction cost outweighs the benefit of rebalancing. Then, we approach this strategy from a competitive algorithmic perspective, and compete against all such SUPs with arbitrary numbers of rebalancing times and at arbitrary corresponding rebalancing instants. We show that the proposed SUP strategy is universal and has an upper bound on the regret. We also develop an efficient implementation of the universal algorithm based on non-uniform random walks and learn the semi-universal portfolios based on an online factor graph algorithm.
To the best of our knowledge, the proposed SUP is the first algorithm that explicitly exploits the transaction cost for online PS by considering a Cover's moving target portfolio with occasional rebalancing. Though simple in nature, SUP suffers much less under transaction cost than existing algorithms and has been empirically validated via extensive experiments on real markets. On the one hand, the SUP strategy significantly surpasses a number of state-of-the-art transaction cost aware strategies in terms of long-term compound return. On the other hand, it has a polynomial complexity in the number of stocks and thus has better scalability in practice.
The rest of the paper is organized as follows: Section 2 formulates the on-line PS problem with transaction cost, and Section 3 reviews some related works. Section 4 presents the proposed algorithm, and Section 5 empirically evaluates its effectiveness on real markets. Section 6 concludes the paper.
2 Problem Setting
Consider a financial market with m assets for n trading periods. The asset prices on the tth period are represented by a close price vector pt ∈ Rm+ , and each element pit is the close price of asset i. The changes of asset prices are denoted by a price relative vector xt = (x1t , . . . , xmt ) ∈ Rm+ , where xjt is the ratio of current close price to last close price of asset j at the tth period, i.e., xjt = pjt /pjt-1 . We denote xn1 = (x1, . . . , xn) as the sequence of price relative vectors for n periods. We abbreviate xn1 to xn below.
The capital of the m assets at the beginning of the tth period is denoted as a portfolio vector bt = (b1t , . . . , bmt ) ∈ Rm+ , where bjt is the proportion of wealth invested in the j th asset at the tth period. Typically, we assume that the portfolio is self-financed and no margin/short is allowed, which means bt ∈ ∆m, where ∆m = {bt : bt ∈ Rm+ , ∑mj=1 bjt = 1}. The investment procedure is denoted as a portfolio strategy, i.e., b1 = 1m 1 and following sequence of mappings bt : (Rm+ )t-1 → ∆m, t = 1, 2, . . . , where bt = bt(xt-1 ) is the portfolio used at the tth trading period, given the last market sequence xt-1 = (x1, . . . , xt-1). We denote by Bn = [b1, b2, ..., bn] the strategy for n periods.
At the tth trading period, a portfolio bt achieves a portfolio period return st, i.e., the wealth increases by a factor of st = bTt xt = ∑mj=1 bjt xjt . When the portfolio manager sets up his new portfolio at the beginning of the (t+1)th period, i.e., buys/sells stocks according to the actual portfolio vector bt+1, he has to pay transaction cost. We assume a symmetric proportional transaction cost with cost ratio c, where c = cs + cb for both selling cs and buying cb and 0 ≤ c ≤ 1, i.e., the trade of 1 dollar worth of asset i nets only 1 - c dollars. Hence, the portfolio manager should spend the transaction costs Ct = [C 1 t , . . . ,C m t ]T ∈ Rm+ at the beginning of the (t+1)th period, where C i t = st|bit - bit+1 |c is the cost for the ith asset, bit represents the current portfolio of the ith asset at the end of the tth period and the current portfolio vector bt = [b1t , . . . , bmt ]T = [ b1t x1t m∑ bit xit , ..., bmt xmt m∑ bit xit ]T . The total costs
for all assets at the beginning of the (t+1)th period are denoted as Costt = CTt e, where e = [1, . . . , 1]T ∈ Rm+ . We denote sct = st -Costt as the net wealth at the end of the tth period, which is less than st after the transaction. We will use the above formula to solve the SUP strategy with transaction cost in this paper.
Since we reinvest and adopt price relative, the portfolio wealth will multiplicatively grow. Thus, after n trading periods, a portfolio strategy Bn+1 produces a portfolio cumulative wealth with transaction cost Scn , Scn (xn ) = S0 ∏nt=1 (sct ), where S0 is the initial wealth, which is set to 1 in this paper.
Finally, we formulate the on-line PS problem as a sequential decision task. The portfolio manager aims to design a strategy Bn+1 to maximize the portfolio cumulative wealth Scn . The portfolios are selected in a sequential fashion. At each period t, given the historical information, the manager learns to select a new portfolio vector bt for the next price relative vector xt, where the decision criterion varies among different managers. The resulting portfolio bt is scored based on the portfolio period return of sct . Such procedure repeats until the end of trading periods and the portfolio strategy is finally scored by the cumulative wealth Scn .
3 Background Review
On-line PS has been extensively explored following the principle of Kelly investment [Kelly, 1956]. Although the need for considering transaction cost has been mentioned in [Cover, 1991; 1996; Ordentlich and Cover, 1996; Helmbold et al., 1998; Borodin et al., 2004; Li and Hoi, 2014], only a few works deal with online PS with transaction cost.
Blum and Kalai [1997] exploited universal portfolios [Cover, 1991] with proportional transaction cost, which pays transaction cost proportionally from each asset and utilizes Cover's UP formulation as a moving target portfolio, and then rebalances the portfolio at each investment period. Bean and Singer [2011; 2012], Kozat and Singer [2008; 2009] discussed switching strategies with transaction cost, which transfers the benchmark portfolio according to the market information and also rebalances at each investment period. On the other hand, some strategies focus on occasional rebalancing. Helmbold et al. [1998] considered constant rebalanced portfolio (CRP) with transaction cost, and further introduced a semi-CRP (SCRP), which rebalances only at some periods. Blum and Kalai [1997] showed that no strategy can guarantee the exponential growth rate of the best SCRP in hindsight, even without commission. Recently, Kozat and Singer [2011] extended this idea to a universal SCRP strategy that rebalances the target portfolio vectors in arbitrary investment periods.
Moreover, there is another category of online PS that investigates transaction cost via parameters update of stochastic optimization model. Das et al. [2013] proposed online lazy updates (OLU) and online lazy updates with group sparsity (OLU-GS) [2014] for transaction cost based on the exponential gradient algorithm [Helmbold et al., 1998], which rebalances the portfolio vector by sparse or lazy updates of the parameters in the optimization model.
Finally, there are some algorithms that deal with growth optimal investment with transaction cost in discrete times. Cover and Iyengar [2000] formulated the problem of horse race markets. Iyengar [2002] considered growth optimal investment with several assets. Bobryk and Stettner [1999] investigated the case of PS with consumption. Schafer [2002] considered the maximization of the long run expected growth rate. Gyorfi and Vajda [2008] investigated discrete time infinite horizon growth optimal investment with transactions cost. Ormos and Urbn [2011] presented a nonparametric model using kernel-based agents to approximate the maximum theoretical growth rate with transaction cost.
3.1 Analysis of ExistingWork
The most related works to this paper are the UP-based, SCRP and OLU strategies. Here we analyze their drawbacks.
First, let us focus on the transaction costs of these existing works. In practice, at the beginning of the tth period, a Kelly portfolio manager intends to rebalance the portfolio from closing price rebalanced portfolio bt-1 to a new portfolio bt. After the rebalancing portfolio period, return st-1 will be decomposed into two parts: the net wealth sct-1 in the new portfolio bt and the transaction costs incurred during the buying and selling. If the wealth on asset i before rebalancing at the (t -1)th period is higher than that after reblancing, that is, bit-1 st-1 ≥ bit sct-1 , then there will be a selling rebalancing with transaction cost rates cs. Otherwise, a buying rebalancing with transaction cost rates cb is required. Denote Vt-1 = [V 1 t-1 , · · · , V m t-1 ] as the trading volume at the (t - 1)th period, where V i t-1 = ¯bit-1 st-1 - bit sct-1 , and let x+ be the positive part of x. Formally,
Thus, after k trading periods, the portfolio manager obtains a portfolio cumulative wealth with transaction cost Sck :
With this, we can see that the cumulative wealth and transaction cost heavily rely on the target portfolio bt, price relative xt (t = 1, · · · , n) and the total trading times k (k ≤ n).
Now we turn to the algorithms: UP-based, SCRP and OLU, which investigate the online PS with transaction cost in the framework of competitive analysis and all belong to the benchmarks and follow-the-winner category [Li and Hoi, 2014]. The UP-based transaction cost aware strategy is extended from Cover's UP and employs bi = ∫∆mbSc i-1 (b)dµ(b) ∫∆mSc i-1 (b)dµ(b) as a target portfolio. Although this strategy keeps a moving target portfolio that can avoid the impact of market information, it rebalances the portfolio vector at every period, which means that the trade volume Vj ̸= 0, and thus
Rather than rebalancing at every investment period, SCRP considers choosing k suitable periods from the whole investment periods (1, · · · , n) to rebalance and keeps a fixed target portfolio b = [1/m, . . . , 1/m]T ∈ Rm+ , which means that the trading volume Vj > 0 for the t1 th , . . . , tk th periods, and Vj = 0 for the other n-k periods, therefore the transaction cost is reduced severely.
OLU uses an online update setting where the target portfolio satisfies bt+1 = arg min b∈∆m (-log(bT xt)) + α ‖b -bt‖1 +
12 ‖b -bt‖22 . The parameter α > 0 decides how often the trading is done. A large α leads to lazy update of the portfolio with a small number of transactions, while a small α allows the portfolio to change more frequently, which means Vj is close or equals to zero for some investment period j, and thus the cost is reduced.
Though these strategies empirically effective on most datasets, they have potential problems. First, the UP based algorithms rebalance it portfolio vector at every investment period, thus the total transaction cost increases rapidly, which results in poor performance in practice. Moreover, UP is also computationally demanding and has unsatisfactory empirical performance [Helmbold et al., 1998]. Second, SCRP uses the same weight on each asset/stock in all investment periods, which does not change with the dynamic market and thus degrades the final cumulative wealth. Third, for OLU the difficulty of parameter selection substantially influences the effectiveness of the algorithm and even the final cumulative wealth. Considering these drawbacks of the existing works, we try to develop a new SUP strategy with transaction cost, which combines the idea of occasional rebalancing with a moving target portfolio.
4 Semi-Universal Portfolios
4.1 Motivation
Theoretical and empirical results [Helmbold et al., 1998; Kozat and Singer, 2011] for CRP strategy show that if a portfolio rebalance only on a subset of the possible trading days, it will reduce the transaction commissions remarkably and thus achieve maximum cumulative wealth on most datasets. This idea is also true for UP strategy. Let us consider a toy example to illustrate this point.
Assume a market consists of two stocks and the investment periods is set to 6 days. Let [3, 3, 3, 0.33, 0.33, 0.33] and [1/1.1, 1/1.1, 1/1.1, 1.1, 1.1, 1.1] be the price sequence of the two stocks. Here c = 0.1. We assume the initial vector of UP, SCRP, OLU, SUP are all b1 = [1/2, 1/2]T . Let Sn(UP) be the wealth achieved by the UP strategy:
| C2 | C3 | C4 | C5 | C6 | Cost | Scn | |
|---|---|---|---|---|---|---|---|
| UP | 0.046 | 0.092 | 0.095 | 0.059 | 0.038 | 0.329 | 1.384 |
| SCRP | 0.052 | 0.099 | 0 | 0 | 0 | 0.152 | 1.567 |
| OLU | 0.039 | 0.067 | 0.103 | 0.032 | 0.028 | 0.269 | 1.457 |
| SUP | 0.046 | 0.092 | 0 | 0 | 0 | 0.137 | 1.577 |
Scn (UP) = S0 ∏nt=1 (sct ). The portfolio will rebalance at every period. For SUP, if the cost of rebalancing Costt is larger than the factor of increasing wealth st in UP at the end of tth period, we will not trade at the beginning of (t+1)th and the portfolio will run itself. Otherwise, the portfolio will rebalance to Cover's UP bt+1. This is the main point of SUP strategy. For OLU, we use updates setting in Section 3.1 where the parameters are η = 20, α = 0.1. OLU will also trade at every period. For SCRP, we will not rebalance at (t +1)th period when Costt > st. Otherwise, the portfolio will rebalance to the target portfolio b = [1/2, 1/2]T . We compute the cost, the wealth gain and rebalancing times for each strategy, which are illustrated in Table 1.
The results clearly show that the total cost of UP is the largest with 5 times rebalancing, which thus leads to the smallest wealth gain. By Contrast, the proposed methods has the least transaction commissions with 2 times rebalancing and attains the largest total wealth. Furthermore, both SUP and SCRP do not change the portfolio at 4th , 5th , 6th period, but the wealth gain of SUP is larger than SCRP, which shows that the moving target portfolio used in SUP is superior to the fixed target portfolio used in SCRP. Note that although the toy example is on two assets, such advantage can be easily extended to the scenario of multiple assets. Based on the above motivation, we propose SUP strategy in the following and then solve it by developing an universal algorithm.
4.2 Two Semi-Universal Portfolio Strategies
SUP is to exploit the rebalancing of Cover's UP at some selected instants. We first give a standard SUP strategy, which rebalances the portfolio vector to UP at selected instants with all the knowledge of the past market. However, with the increase of investment periods, it might be better to consider only the most recent market. Therefore, we present an alternative version SUP-q strategy by considering a market sliding window-q, in which the rebalanced portfolio depends on the price relative vector of the last q periods.
SUP strategy
We divide the total investment periods n into an arbitrary number (say k) segments, and fit each segment to a Cover's UP. Let Tk,n be a rebalancing path with k rebalancings, which is represented by (t1, · · · , tk). Given n and k, there exists ( n-1 k ) such possible choices for Tk,n.
For an arbitrary sequence of price relative vectors xn and a given Cover UP bi, i = 1 . . . k, a competing SUP with a rebalancing path Tk,n divides xn into k + 1 segments such that xn is obtained by the concatenation of
The SUP with the rebalancing path Tk,n rebalances only to Cover's UP bi (i = 1, . . . , k) on the selected times (t1, ..., tk). For notational simplicity, we assume t0 = 1 and tk+1 = n + 1. Suppose we pay transaction cost only at the start of each segment that rebalances to Cover's UP bi (i = 1, . . . , k).
In each segment, this SUP will achieve the accumulated wealth si = bTi ⊗ti-1 t=ti-1 xt, where ⊗ denotes element-wise product, b1 = ( 1m , . . . , 1m ) , bi = ∫∆m bSc ti-1 (b)dµ(b) ∫∆m Sc ti-1 (b)dµ(b) , and Sc ti-1 (b) = Sti-1(b) - ∑ti-1 j=1 Costj, Sti-1(b) = ti-1 ∏ bT xj, µ(b) equals to the uniform distribution. Then,
for a selected rebalancing path Tk,n, the total accumulated wealth including commission costs c = cs + cb on xn by using a Cover's UP b is Sc (xn |Bk, Tk,n) = Πk+1 i=1 sci , which is the combined gains of each segment's, where sci is the net
j=1 wealth in ith segment, i.e., sci = si -Costi.
SUP-q strategy
For the SUP strategy, Sc ti-1 (b) is the net wealth in all the last ti -1 periods. While for SUP-q strategy, Sc ti-1 (b) means the net wealth in the last q periods. That is, when we rebalance to the universal portfolio, the portfolio depends only on the prices of the last q periods, i.e., Sc ti-1 (b) = ti-1 ∏ k=ti-1-q sck . The other parts are the same as in the SUP strategy.
We next investigate the proposed strategies from the framework of competing algorithms. In determining the best algorithm in the competing class, we attempt to outperform all such portfolios, including the one that has been optimized by choosing the rebalancing path Tk,n and k and UP strategy bi in each segment based on observing the entire sequence xt, t = 1, ..., n - 1 in advance, including the transaction costs. In other words, we try to seek an algorithm such that even in the worst case, it will achieve the performance of the best algorithm in the competition class, uniformly for all sequences xn and all n. As such, we try to minimize the following wealth ratio with transaction cost:
where Sc (xn |̂bu,n) = ∏nt=1 (̂bTu,txt - Costt) is the wealth achieved by this algorithm; ̂bu,t is a sequential assignment at time t, i.e., ̂bu,t may be a function of x1, ..., xt-1 but does not depend on the future; Tk,n represents any rebalancing times (t1, ..., tk) and any k. Since the geometric average return over the period is (Scn )(1/n) , we will minimize the log geometric average ratio lnRcb (n) n alternatively. In this way, we will show that we can construct a sequential portfolio for which the logarithm of this ratio is at most k ln(n) + O(k + 1) for any of Tk,n, k or n, without knowledge of Tk,n, k and n a priori. So we have the following universal theorem.
4.3 Universal Theorem
Theorem 1 Let {xt}t≥1 be an arbitrary sequence of price relative vectors such that xt ∈ Rm+ for all t and where some components of xt can be zero. Then, for all ε > 0 and given a Cover's universal portfolio bi, i = 1 . . . k, bi ∈ Rm+ , Σmj=1 bji = 1, we can construct sequential portfolios ̂bu,t with complexity linear in t per investment period, such that, when applied to {xt}t≥1 for any c = cs + cb, and for all k, n and a parameter δ > 0 for random walks, the wealth ratio Rcb(n) satisfies
(i) SUP strategy,
for any Tk,n representing rebalancing times (t1, ..., tk) and any k, such that ̂bu,t does not depend on Tk,n, k or n.
Theorem 1 states that given a UP strategy bi (i = 1 . . . k), the logarithm of the wealth ratio of the universal sequential portfolio ̂bu,t is within O(k ln(n)) for any n of the best batch SUP with any k rebalancing times (tuned to the underlying sequence), uniformly, for every sequence of price relatives {xt}t≥1 and c.
Note that the bound in Theorem 1 is different from those given in SCRP [Kozat and Singer, 2011]. Our bound consists of two parts: one is the regret on universal portfolio bi, which comes from [Blum and Kalai, 1997]; another is the regret on the rebalancing path Tk,n, where a Krichevsky-Trofimov (KT) weighting [Willems, 1996] of the probability of the path is used, which is the same as that in SCRP.In addition, our regret is related to the parameter δ of randomwalks [Kalai and Vempala, 2000] and c, which is also different from SCRP. Due to space limit, here we omit the proof of Theorem 1.
4.4 Factor Graph-Based Implementation
We now need to solve semi-universal portfolio ̂bu,t. Because SUP defined in Section 4.1 is ideal, that is, if we compare the wealth and cost at every period, for given n and k, there exist ( n-1 k ) such possible rebalancing time Tk,n. Moreover, with no information of the future price, we don't know the parameter k in the real world. Therefore, there are 2n-1 different rebalancing path and the algorithm complexity will be very large.
Due to the above fact, we will use the factor graphbased implementation [Kschischang et al., 2001] to solve the ̂bu,t. In Figure 1, any directed path represents a rebalancing path where a horizontal move denotes no rebalancing, while an upward move represents a rebalancing. We label the last transition times with state variables st = 1, 2, ..., t, and each class represented as a box. We then define Sc t (xt , s, j) as the net wealth of jth asset/stock achieved on xt by all sequential strategies that have the last rebalancing time at st , i.e., if st = s then Sc t (xt , s, j) = Pkt(st = s|st-1 = s)Sc t-1 (xt-1 , s, j)xjt , s = 1, · · · , t -1, where Pkt is KT weighting [Willems, 1996]. If there is a rebalancing at time t, then, the net wealth will rebalance from Sc t-1 (xt-1 , s, j) to Sc t (xt , t, j), and Sc t (xt , t, j) = t-1 ∑ s=1( m∑ j=1 Sc t-1 (xt-1 , s, j))Pkt(st = t|st-1 = s)bjt xjt , bjt is the universal portfolio of j asset at tth period. We can formulate the wealth achieved by each subsets, and then, the wealth gain can be the sum of all the subset Scu (xt ) = ∑t-1 s=1 Sc t (xt , s, j) + Sc t (xt , t, j) . Since, Scu (xn ) = n∏ t=1 Scu(xt ) Scu (xt-1 ) = n∏ t=1(̂bu,t)T · xt . Finally, we can obtain the recurrence formula of ̂bu,t as follows:

Here, σt-1 (s, j) = Sc t-1 (xt-1 ,s,j) ∑t-1 s=1 ∑mr=1 Sc t-1 (xt-1 ,s,r) , bt is universal portfolio at tth investment period. Due to space limit, here we omit some detailed formulas and computation analysis.
Based on the analysis above, we can design the proposed algorithm with a polynomial complexity. The computation process for ̂bu,t of SUP strategy is outlined in Algorithm 1, and for m > 2 it is also outlined in the random walk Algorithm 2.
5 Experiments
In this section, we use the index-wealth gain and turnover to measure the performance of the SUP algorithms (SUP and SUP-q), and compare them with four of the most relevant transaction cost aware strategies (CRP [Cover, 1991],
Algorithm 1 Online factor graph implementation for SUP
Input: xn price relative vector Output: b the portfolio Procedure: Initialize b1 = [1/m, . . . , 1/m], S0 (0, 0, :) = b1 ̂bu,t = b1 for t = 1 to N do Wealth gain ̂bTu,txt for s = 1 to t - 1 do for j = 1 to m do calculate Sc t (xt , s, j) end for end for for s = 1 to t - 1 do for j = 1 to m do calculate Sc t (xt , t, j) end for end for calculate ̂bu,t+1 from (1) end for
Algorithm 2 Random walk implementation for m > 2
Input: Minimum coordinate:δ0 Spacing of grid:δ Number of steps in randomwalk: S Output: TheSamples∆m Procedure: for i = 1 to Samples do for s = 1 to walk do Choose 1 ≤ j ≤ n - 1 at random Choose X ∈ {-1, +1} randomly if δ0 ≤ ri +Xδ and δ0 ≤ rn -Xδ then x := Qt(r1 , r2 , ..., rn ) y := Qt(r1 , r2 , ..., rj + Xδ, ..., rn - Xδ) % [Kalai and Vempala, 2000]. With probability Min(1, x/y) rj := rj + Xδ, rn = rn -Xδ; end if end for end for
SCRP [Kozat and Singer, 2011], OLU [Das et al., 2013] and UP [Blum and Kalai, 1997]) on two datasets: NYSE(O) and SP500. The first two strategies CRP and SCRP are the "Benchmark" strategies, UP and OLU belong to "follow the winner" category. Moreover, SCRP and OLU are the two newest transaction cost aware strategies for online PS. We focus on the performance of investing into two stocks and evaluate the average wealth over 50 pairs of stocks.
5.1 Datasets
Experiments are conducted on two historical datasets 1 . The first one is the well-known NYSE(O) dataset, which consists of 36 stocks in New York Stock Exchange for a 22-year period [Cover, 1991]. The second is SP500, which is the Standard & Poor's 500 with 1276 daily prices from Jan. 2, 1998 to Jan. 31, 2003. We choose 2 days as an investment period.
1 All datasets and their compositions can be downloaded from http://olps.stevenhoi.org/.
| Strategy | c=0 | c=0.001 | c=0.01 | c=0.02 | c=0.05 |
|---|---|---|---|---|---|
| CRP | 23.519 | 23.387 | 22.233 | 21.017 | 17.754 |
| SCRP | 23.754 | 23.753 | 23.740 | 23.726 | 23.684 |
| OLU | 23.624 | 23.487 | 23.012 | 22.235 | 20.037 |
| UP | 23.513 | 23.429 | 22.693 | 21.909 | 19.758 |
| SUP | 23.909 | 23.908 | 23.894 | 23.880 | 23.837 |
| SUP-q | 24.092 | 24.090 | 24.078 | 24.064 | 24.024 |
| Strategy | c=0 | c=0.001 | c=0.01 | c=0.02 | c=0.05 |
|---|---|---|---|---|---|
| CRP | 1.7340 | 1.7339 | 1.7101 | 1.6764 | 1.5792 |
| SCRP | 1.7444 | 1.7410 | 1.7334 | 1.7329 | 1.7312 |
| OLU | 1.7439 | 1.6481 | 1.6316 | 1.6152 | 1.5664 |
| UP | 1.7428 | 1.7406 | 1.7210 | 1.6995 | 1.6371 |
| SUP | 1.7538 | 1.7538 | 1.7533 | 1.7527 | 1.7511 |
| SUP-q | 1.7541 | 1.7541 | 1.7535 | 1.7530 | 1.7513 |
5.2 Results
The two datasets NYSE(O) and SP500 contain 36 and 25 different stocks respectively, from each of which we randomly select 50 pairs of stocks, and invest them using the six strategies: CRP, SCRP, OLU, UP, SUP and SUP-q. Here, we set q=100 in SUP-q, η=20 and α=0.1 in OLU. Table 2 and Table 3 presents respectively the wealth achieved by various strategies on NYSE(O) and SP500 when the cost ratio c=0, 0.001, 0.01, 0.02 and 0.05. In all cases, we can see that SUP and SUP-q outperform the other strategies. Intuitively, SUP and SUP-q can reduce the transaction costs and react well to the dynamic market.
Fig. 2 shows the turnover results of the six strategies. turnover indicates the average percentage of wealth traded in each period, which is used for stability analysis of trading strategy. From Fig. 2, we can see that SUP and SUP-q achieve smaller turnover than the others. With smaller turnover and higher net wealth, the SUP and SUP-q strategies are more profitable and stable, and incur less transaction cost.

6 Conclusion
In this paper, we proposed a novel on-line PS strategy named semi-universal portfolio (SUP) with transaction cost, which rebalances its portfolio only at some selected instants. The proposed approach can solve the transaction cost problem of UP strategy caused by frequently adjusting portfolio at every period. Experiments on real markets show that the proposed SUP strategy can achieve better performance than major existing strategies. Future work will study other universal portfolios and do theoretical analysis on the rebalancing problem.
@inproceedings{ijcai2015p32,
title = {Semi-Universal Portfolios with Transaction Costs},
author = {Huang, Dingjiang and Zhu, Yan and Li, Bin and Zhou, Shuigeng and Hoi, Steven C. H.},
booktitle = {Proceedings of the Twenty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-15}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {Qiang Yang and Michael Wooldridge},
pages = {178--183},
year = {2015},
month = {7},
note = {Main Track},
url = {https://ijcai.org/proceedings/2015/32},
}
TY - CPAPER TI - Semi-Universal Portfolios with Transaction Costs AU - Huang, Dingjiang AU - Zhu, Yan AU - Li, Bin AU - Zhou, Shuigeng AU - Hoi, Steven C. H. T2 - Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-15 PB - International Joint Conferences on Artificial Intelligence PY - 2015 SP - 178 EP - 183 UR - https://ijcai.org/proceedings/2015/32 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: