#### Optimal Online Two-way Trading with Bounded Number of Transactions

##### Stanley P. Y. Fung

We consider a two-way trading problem, where investors buy and sell a stock whose price moves within a certain range. Naturally they want to maximize their profit. Investors can perform up to $k$ trades, where each trade must involve the full amount. We give optimal algorithms for three different models which differ in the knowledge of how the price fluctuates. In the first model, there are global minimum and maximum bounds $m$ and $M$. We first show an optimal lower bound of $\varphi$ (where $\varphi=M/m$) on the competitive ratio for one trade, which is the bound achieved by trivial algorithms. Perhaps surprisingly, when we consider more than one trade, we can give a better algorithm that loses only a factor of $\varphi^{2/3}$ (rather than $\varphi$) per additional trade. Specifically, for $k$ trades the algorithm has competitive ratio $\varphi^{(2k+1)/3}$. Furthermore we show that this ratio is the best possible by giving a matching lower bound. In the second model, $m$ and $M$ are not known in advance, and just $\varphi$ is known. We show that this only costs us an extra factor of $\varphi^{1/3}$, i.e., both upper and lower bounds become $\varphi^{(2k+2)/3}$. Finally, we consider the bounded daily return model where instead of a global limit, the fluctuation from one day to the next is bounded, and again we give optimal algorithms, and interestingly one of them resembles common trading strategies that involve stop loss limits.

arrow_drop_up