## 2 Results
### Calculating the Lower Bound  
To determine a lower bound for an online optimization problem, it is sufficient to find an algorithm that is optimal on a part of the possible input sequences (see [4]). As the algorithm is optimal even if it holds only for certain input sequences, there is no algorithm that can achieve a smaller performance ratio on these sequences. Therefore, no algorithm can achieve a smaller competitive ratio than this performance ratio. To determine the performance ratio, the worst-case-sequences are searched, which maximize the ratio between OPT and ON. Therefore, the errors which can occur have to be identified. An error describes a type of deviation from the optimal decision. In the CP, there are two possible errors which may occur. It is possible to convert too much or too little wealth into yen. If the price raises, the best decision is to invest all of the wealth in dollars, and if the price drops, the best decision is to invest all of the wealth in yen. As it is not known in advance if a price will raise or drop, both errors are possible at each time. These errors are negatively correlated. For example, if the player converts more to yen, the too-little error decreases, but at the same time, the too-much error increases. Let \(E_{i}\) be the maximum value for a specific error type \(i=1,\ldots,J\), where \(J\) is the number of types of errors which can occur using a specific online algorithm. The competitive ratio of this algorithm holds:  
\[c=\max_{i=1,\ldots,J}E_{i}. \tag{7}\]  
Using error balancing, decisions are made in the way that the highest possible values for all errors are equal. This minimizes the maximum value over all errors. **Lemma 1**. : _There is no deterministic algorithm that achieves a smaller competitive ratio for the bi-directional preemptive conversion problem, with given \(M\), \(m\), and \(T\), than \(\frac{2}{\left(\frac{m}{M}\right)^{\frac{1}{2}}+1}\) for \(T=2\)._  
Proof of Lemma 1.: Lemma 1 is proven by error balancing. In the single-period model, only one decision has to be made. The following two errors can occur: convert too little or too much wealth. An algorithm is optimal for \(T=2\) if both errors are balanced. In the single-period model, the highest too-little error occurs if the price drops to \(m\). In contrast, the highest too-much error occurs if the price raises to \(M\). Thus, it is only necessary to consider sequences with \(q_{2}\in\{m,M\}\). These price sequences are \(\mathbf{q_{1}}=q_{1},m\) and \(\mathbf{q_{2}}=q_{1},M\). On sequence \(\mathbf{q_{1}}\), OPT invests the whole wealth in yen and obtains \(OPT(\mathbf{q_{1}})=W_{0}\cdot\left(\frac{q_{1}}{m}\right)\). ON becomes \(ON(\mathbf{q_{1}})=W_{0}\cdot\left(\frac{q_{1}}{m}+b_{1}\cdot\left(1-\frac{q_{ 1}}{m}\right)\right)\). For the too-little error holds:  
\[E_{1}=\frac{OPT(\mathbf{q_{1}})}{ON(\mathbf{q_{1}})}=\frac{W_{0}\cdot\frac{q_ {1}}{m}}{W_{0}\cdot\left(\frac{q_{1}}{m}+b_{1}\cdot\left(1-\frac{q_{1}}{m} \right)\right)}=\frac{\frac{q_{1}}{m}}{\frac{q_{1}}{m}+b_{1}\cdot\left(1-\frac {q_{1}}{m}\right)}. \tag{8}\]  
In the sequence \(\mathbf{q_{2}}\), OPT does not invest in yen and obtains \(OPT(\mathbf{q_{2}})=W_{0}\). ON has \(ON(\mathbf{q_{2}})=W_{0}\cdot\left(\frac{q_{1}}{M}+b\cdot\left(1-\frac{q_{1}} {M}\right)\right)\). For the too-much error holds:  
\[E_{2}=\frac{OPT(\mathbf{q_{2}})}{ON(\mathbf{q_{2}})}=\frac{W_{0}}{W_{0}\cdot \left(\frac{q_{1}}{M}+b_{1}\cdot\left(1-\frac{q_{1}}{M}\right)\right)}=\frac{ \frac{q_{1}}{M}+b_{1}\cdot\left(1-\frac{q_{1}}{M}\right)}{}. \tag{9}\]  
Error balancing is done by equalizing the two errors, i.e., \(E_{1}=E_{2}\).