Next Article in Journal
Optimal Model for Carsharing Station Location Based on Multi-Factor Constraints
Previous Article in Journal
Designing the Uniform Stochastic Photomatrix Therapeutic Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Lower and Upper Bounds for the Discrete Bi-Directional Preemptive Conversion Problem with a Constant Price Interval

by
Michael Schwarz
Department of Operations Research and Business Informatics, Saarland University, 66123 Saarbrücken, Germany
This work is based on the author’s PhD thesis.
Algorithms 2020, 13(2), 42; https://doi.org/10.3390/a13020042
Submission received: 30 December 2019 / Revised: 31 January 2020 / Accepted: 14 February 2020 / Published: 18 February 2020
(This article belongs to the Special Issue Online Algorithms in Trading Systems)

Abstract

:
In the conversion problem, wealth has to be distributed between two assets with the objective to maximize the wealth at the end of the investment horizon. The bi-directional preemptive conversion problem with a constant price interval is the only problem, of the four main variants of the conversion problem, that has not yet been optimally solved by competitive analysis. Assuming a given number of monotonous price trends called runs, lower and upper bounds for the competitive ratio are given. In this work, the assumption of a given number of runs is rejected and lower and upper bounds for the bi-directional preemptive conversion problem with a constant price interval are given. Furthermore, an algorithm based on error balancing is given which at minimum achieves the given upper bound. It can also be shown that this algorithm is optimal for the single-period model.

1. Introduction

In the conversion problem (CP), an initial wealth W 0 is distributed between two assets, e.g., dollars and yen. At the beginning, the wealth is fully invested in dollars. The objective is to maximize the terminal wealth W T at time T which is the end of the investment horizon. The distribution of wealth can be redone at specific points in time t = 1 , , T . Conversion can only be done at the price q t which is valid at time t. At time T all wealth has to be invested in one certain asset. Let q = q 1 , , q T be the sequence of the prices, and let b = b 1 , , b T be the sequence of the wealth distributions, where b t is the percentage of wealth which is invested in dollars. In fact, the CP is able to find the optimal sequence b , depending on the price sequence q .
The difficulty of this problem follows from the fact that the sequence q is not known in advance. At each time t = 1 , , T , a new element q t of the sequence q is revealed and a decision has to be made with incomplete information. These kind of problems are called online   problems (see [1]).
There are many variants of the CP which can be differentiated by the nature of the search, the nature of conversion, and the given information (see [2]). The nature of the search describes the direction(s) in which conversion is allowed. In the uni-directional CP, it is only allowed to convert from one asset into another asset, but not to convert back. In contrast, in bi-directional conversion it is allowed to convert back and forth between the two assets. The nature of conversion describes the amount that can be converted at once. In non-preemptive conversion it is only allowed to convert all or nothing. Thus, at each time t the wealth is fully invested in one of the two assets. In contrast, in preemptive conversion it is allowed to convert an arbitrary part of the wealth. From both characteristics, the four main variants of the CP follow: uni-directional non-preemptive CP, uni-directional preemptive CP, bi-directional non-preemptive CP, and bi-directional preemptive CP.
Given information refers to the input sequence. In this work, it is assumed that q t lies within a constant price interval [ m , M ] . So each price has to be between a lower bound m and an upper bound M. It holds that 0 < m q t M , with t = 1 , , T . Another given information often used in bi-directional conversion is the number of runs k (see [3,4,5]). A run is a partial sequence of consecutive prices which monotonously increase or decrease. The number of runs k can be given in addition to or instead of the number of points in time T.
Algorithms which solve online problems are called online algorithms. In the conversion literature, competitive analysis is one common measure to evaluate online algorithms introduced by [6]. In competitive analysis an online algorithm (ON) is compared with the optimal offline algorithm (OPT). This algorithm has all information about the price sequence and makes optimal decisions. Let O P T ( q ) be the optimal solution on sequence q , and let O N ( q ) be the solution of the algorithm which has to be evaluated. Furthermore, let Ω be the set of all possible input sequences. To evaluate an online algorithm with competitive analysis, that value c is searched, for which
c max q Ω O P T ( q ) O N ( q )
holds true.
Then c is called the competitive ratio. From Equation (1) follows that the ratio between the optimal solution and the evaluated algorithm can never be greater than c. An algorithm with a smaller c is better. An online algorithm that achieves the smallest possible c is called optimal. Another performance measure is the performance ratio (see [7]). Here, it is assumed that a class of distributions can be determined where the distribution of the input sequences is part of it. That means, only a subset Ω Ω is considered. Thus, the performance ratio is a bound for the ratio between O P T ( q ) and O N ( q ) , which holds only for a part of the possible input sequences. The performance ratio is a lower bound for the competitive ratio.
Three of the four main variants of the CP are optimally solved. Reference [8] considers the uni-directional non-preemptive CP and provides the online algorithm RPP, which solves the variant of the CP optimally, in the case that M and m are given. The algorithm uses a reservation price q . If the first price q t q appears, the algorithm converts all wealth. The uni-directional preemptive CP with given M , m , and T is considered by [3,9]. They provide the optimal online algorithm uTH. The competitive ratio c ( u T H ) of uTH is
c ( u T H ) = T · 1 m · c ( u T H ) 1 M m 1 T
for a given T and discrete time. The authors provide also a formula for the competitive ratio in the case of continuous time.
The bi-directional non-preemptive CP with given M and m is optimally solved by [5]. The optimal algorithm MRPR(k) calculates depending on the number of runs for each run an own reservation price. The competitive ratio of MRPR(k) is close to M m 2 3 k 2 . The bi-directional preemptive CP has not yet been optimally solved. Authors in [3] provide the non-optimal online algorithm bTH. Depending on the number of runs, k bTH considers the bi-directional preemptive CP as k separate uni-directional preemptive conversion problems. For each of the k runs, bTH applies the algorithm uTH, such that an upper bound U
U = ln M m 1 c ( u T H ) 1 k
and a lower bound L
L = T · 1 m · c ( u T H ) 1 M m 1 T k 2
for even k can be provided. The authors in [4] provide the algorithm bTH’. Analogous to bTH, bTH’ applies the uni-directional algorithm uTH’, which is based on uTH, on each run k. The competitive ratio of uTH’ and bTH’ are (see [4])
c ( u T H ) = ln M c ( u T H ) · m 1 c ( u T H ) 1 2
and
c ( b T H ) = c ( u T H ) k 2 .
Based on bTH’, the authors in [4] provide an improved lower bound for the bi-directional preemptive CP and continuous time.
In the literature, there are alternative assumptions on the price sequence. One of these assumptions is that prices are interrelated. That means, two consecutive prices can maximally differ by two given factors, θ 1 and θ 2 , with 0 < θ 1 < 1 < θ 2 (see [10,11,12]). Researchers in [12] provide (among other things) an optimal algorithm for the bi-directional preemptive CP with interrelated prices.
Some authors have also considered additional constraints. Those in [13], considered the uni-directional non-preemptive CP with decreasing M over time. Authors in [14] considered the uni-directional preemptive CP, but they divided the wealth into u equal valued units and it is only allowed to convert one unit per point in time t. Based on this, the authors in [15] considered a problem that is allowed to convert an integer number of units per point in time. Researchers in [16,17] considered the bi-directional non-preemptive CP with a bounded number of transactions.
The authors in [8,18] show that the CP is a special case of the portfolio selection problem (PSP). In the PSP, wealth can be distributed on n 2 assets. For n = 2 , the PSP corresponds to the bi-directional preemptive CP.
In this work, the upper and lower bounds for the competitive ratio of the bi-directional preemptive CP are given. These bounds hold for a given T, discrete time, and a constant price interval between the price bounds m and M.

2. Results

2.1. Problem Formulation

In the bi-directional preemptive CP, a player converts wealth between two assets, e.g., dollars and yen. At the beginning, the initial wealth, W 0 , is invested in dollars. At each time t = 1 , , T a price q t is given. Converting dollars leads to q t yen and converting yen leads to 1 q t dollar. The objective is to maximize the wealth at time T. At time T all wealth has to be invested in dollars, i.e., b t = 1 . At each time t = 1 , , T 1 the player can choose an arbitrary distribution of wealth, i.e., b t 0 , 1 . For the terminal wealth W T , it holds that W T = W 0 · t = 1 T 1 q t q t + 1 + b · 1 q t q t + 1 . In the following, the problem description is summarized as a mathematical program:
Given : q , T Search : b = b 1 , , b T max b t W T = W 0 · t = 1 T 1 q t q t + 1 + b · 1 q t q t + 1 s . t . ( I ) b t [ 0 , 1 ] , t = 1 , , T 1 ( II ) b T = 1
Note that the mathematical program describes a problem in which the wealth has to be invested in dollars at the end. It is also possible that the wealth has to be invested in yen at the end. The asset in which the wealth has to be invested at the end is indicated by b T . However, b T does not influence the objective function. Therefore, the competitive ratio is independent from the final wealth distribution. Thus, it is sufficient to consider only the case where wealth has to be invested in dollars at the end.
In this work, the player has the given information that the price will stay within a price interval, i.e., q t [ m , M ] for all t = 1 , , T , where m represents a lower bound and M an upper bound.

2.2. 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 , , 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 , , J E i .
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 2 m M 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 { m , M } . These price sequences are q 1 = q 1 , m and q 2 = q 1 , M . On sequence q 1 , OPT invests the whole wealth in yen and obtains O P T ( q 1 ) = W 0 · q 1 m . ON becomes O N ( q 1 ) = W 0 · q 1 m + b 1 · 1 q 1 m . For the too-little error holds:
E 1 = O P T ( q 1 ) O N ( q 1 ) = W 0 · q 1 m W 0 · q 1 m + b 1 · ( 1 q 1 m ) = q 1 m q 1 m + b 1 · ( 1 q 1 m ) .
In the sequence q 2 , OPT does not invest in yen and obtains O P T ( q 2 ) = W 0 . ON has O N ( q 2 ) = W 0 · q 1 M + b · 1 q 1 M . For the too-much error holds:
E 2 = O P T ( q 2 ) O N ( q 2 ) = W 0 W 0 · q 1 M + b 1 · 1 q 1 M = 1 q 1 M + b 1 · 1 q 1 M .
Error balancing is done by equalizing the two errors, i.e., E 1 = E 2 . Rearranging to b 1 leads to:
b 1 = 1 q 1 M 2 q 1 M m q 1 .
Inserting Equation (10) into Equation (8) and Equation (9) leads to:
O P T ( q 1 ) O N ( q 1 ) = O P T ( q 2 ) O N ( q 2 ) = 2 q 1 M m q 1 1 m M .
To determine the price q 1 = q which leads to the highest ratio of OPT and ON, the first derivative d d q 2 q M m q 1 m M of Equation (11) is set equal to zero:
M · m q 2 1 M m = 0 .
Rearranging Equation (12) to q leads to:
q 2 = M · m .
Since q > 0 holds true, it follows:
q = M · m 1 2 .
For the second derivative holds:
d 2 d ( q ) 2 2 q M m q 1 m M = 2 · M · m ( m M ) · ( q ) 3 .
Inserting Equation (14) into Equation (15) leads to a negative value. That means, the function of the ratio between OPT and ON has a maximum at this price. Inserting Equation (14) into Equation (11) and rearranging leads to the highest possible error for T = 2 :
O P T ( q ) O N ( q ) 2 m M 1 2 + 1 q Ω .
Equation (10) leads to an optimal decision. Therefore, it is not possible that an algorithm exists which achieves a smaller competitive ratio than 2 m M 1 2 + 1 for T = 2 . ☐
In the following, the EBA algorithm for the bi-directional preemptive CP is given (for more details, see [19]). The algorithm is based on Equation (10) and is optimal for T = 2 :
Algorithm EBA :
Given: M , m , T
Step 1: Determine b t for t = 1 , , T 1 with
b t = 1 q t M 2 q t M m q t .
Step 2: Set b T = 1 .
Note that [12] provides the algorithm OCIP to solve the bi-directional preemptive CP with interrelated prices. OCIP is similar to EBA. The CP with a constant price interval can be reformulated as CP with interrelated prices, with the factors θ 1 , t = m q t and θ 2 , t = M q t t = 1 , , T . This problem can be solved by using EBA. In contrast, OCIP can be used if θ 1 , t = θ 1 and θ 2 , t = θ 2 t = 1 , , T hold true.
Theorem 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 2 m M 1 2 + 1 T 2 .
Proof of Theorem 1.
Let q = q 1 , , q T be a price sequence for which it holds that every second price has to be m or M. On such a sequence, an algorithm which invests all wealth in yen at price m and all wealth in dollars at price M makes optimal decisions at every even t. At every odd t, the same two errors can be made. First, investing too much wealth in yen when the next price will be M. Second, investing too little wealth in yen when the next price will be m.
On a sequence with T prices, T 2 errors can be made. On each partial sequence consisting of two prices, where q 2 { m , M } holds for the second price, the same maximum ratio between OPT and ON can be achieved. From Lemma 1, it follows that the competitive ratio on a sequence with T = 2 cannot be smaller than 2 m M 1 2 + 1 . Therefore, on a sequence with arbitrary T, the competitive ratio of an optimal algorithm cannot be smaller than this with the power of T 2 . Thus, it holds that
c 2 m M 1 2 + 1 T 2 .
Since EBA is optimal for T = 2 , it follows that on each sequence with arbitrary T 2 , using Equation (10) is the optimal decision at t = T 1 . This follows from the fact that both errors which can occur are balanced. Nevertheless, Equation (10) does not lead to optimal decisions at t T 2 .
Lemma 2.
EBA is not optimal for the bi-directional preemptive conversion problem with a constant price interval and given M , m , and T for T 3 .
Proof of Lemma 2.
Consider the sequence q 1 = q 1 , q 2 , q 3 with q 1 < ( M · m ) 1 2 and q 2 < q 1 . From Equation (14), it follows that the first derivative of the ratio between OPT and ON for T = 2 is zero for the value ( M · m ) 1 2 . There is no other positive value for which the derivative is zero. Thus, the closer the price is on ( M · m ) 1 2 , the higher the ratio between OPT and ON within one period can be.
Furthermore, it is known that the maximum ratio of OPT and ON within one period is equal in the cases of raising or falling prices. However, due to this, the sequence q 1 cannot be a worst-case-sequence. The ratio of OPT and ON at the first period can raise by the same factor, regardless of a raising or falling price. The ratio at the second period can be higher if it holds q 2 > q 1 . Thus, there is no worst-case-sequence that fulfills the properties of sequence q 1 . It would be better to choose a wealth distribution that invests less in yen than EBA. This reduces the ratios of OPT an ON on worst-case-sequences, with q 2 > q 1 . ☐

2.3. Calculating the Upper Bound

Authors in [19] used EBA to give an upper bound for the bi-directional preemptive conversion problem with constant price interval and unknown k. The upper bound is based on the idea that there is a sequence, on which the maximum ratio that can be achieved within a period is achieved within every period (see Theorem 2).
Theorem 2.
For the competitive ratio of an optimal online algorithm for the bi-directional preemptive conversion problem with given M, m, and T holds c 2 m M 1 2 + 1 T 1 .
Proof of Theorem 2.
The upper bound for the competitive ratio follows from EBA. From Equation (16) follows the highest possible ratio between OPT and EBA, within one period. There are T 1 periods in a sequence with T prices. Thus, the ratio between OPT and ON can raise T 1 times. Therefore, an optimal algorithm has to achieve a competitive ratio smaller than or equal to the right side of Equation (16), with the power of T 1 . ☐
Nevertheless, the upper bound is still not tight and can be improved. To achieve this, the competitive ratio of EBA for T = 3 can be determined. First the definition of a symmetric algorithm is introduced and it is shown that EBA is a symmetric algorithm. Therefore, b t is defined as function of the free variable q t , i.e., b t ( q t ) .
Definition 1.
An online algorithm is called symmetric if it holds b t ( q t ) = 1 b t M · m q t t = 1 , , T .
The authors in [19] showed that for a symmetric algorithm that holds that on each sequence q = q 1 , q 2 , q T , the ratio between OPT and ON is the same as on sequence q = M · m q 1 , M · m q 2 , , M · m q T . Thus, it is only necessary to consider a part of the possible sequences to determine the worst-case-sequences, e.g., it is sufficient to consider only sequences that start with a raising price.
Lemma 3.
EBA is a symmetric online algorithm.
Proof. 
An algorithm is symmetric if it holds b t ( q t ) = 1 b t M · m q t . Thus, for EBA must hold
1 q t M 2 q t M m q t = 1 1 M · m q t M 2 M · m q t M m M · m q t .
Rearranging (19) leads to
1 q t M 2 q t M m q t = 1 q t M 2 q t M m q t .
Thus, it follows that EBA is a symmetric online algorithm. ☐
Theorem 3.
For the competitive ratio of an optimal online algorithm for the bi-directional preemptive conversion problem with given M, m, and T = 3 holds
c ( M · m 2 · M · q w c 1 + q w c 1 2 ) · ( M · m 2 · M · q w c 2 + q w c 2 2 ) q w c 1 · ( m M ) · M · ( m q w c 1 q w c 2 + q w c 1 · q w c 2 )
with
q w c 1 = ( f + g ) 2 3 ( f + g ) 1 3 · m · M m 2 · M 2 + m 3 · M ( m 2 · M ) · ( f + g ) 1 3
and
q w c 2 = m 2 · M m · q w c 1 · ( 2 · M + q w c 1 ) + 2 · M · q w c 1 2 m · ( M 2 · q w c 1 ) + q w c 1 2
with
f = 2 · m 4 · M 2 + 4 · m 3 · M 3 2 · m 2 · M 4
and
g = ( m 9 · ( M ) 3 + 7 · m 8 · M 4 19 · m 7 · M 5 + 25 · m 6 · M 6 16 · m 5 · M 7 + 4 · m 4 · M 8 ) 1 2 .
Proof of Theorem 3.
Using EBA, there are four possible types of worst-case-sequences for T = 3 . These differ by their price development:
  • the price raises twice,
  • the price first raises and then falls,
  • the price first falls and then raises,
  • the price falls twice.
As EBA balances the errors that can occur at the last period, type 1 and 2, and also type 3 and 4 are balanced. As EBA is symmetric, the errors of type 1 and 4 are also balanced. Thus, in all four types of possible worst-case-sequences the errors are balanced and it is sufficient to consider one type of sequences. Consider the sequence q 1 = q 1 , q 2 , M with q 1 < q 2 < M . For this sequence holds:
O P T ( q 1 ) O N ( q 1 ) = 1 q 1 q 2 + b 1 · 1 q 1 q 2 · q 2 M + b 2 · 1 q 2 M .
Inserting Equation (17) into Equation (22) and rearranging leads to:
O P T ( q 1 ) O N ( q 1 ) = ( M · m 2 · M · q 1 + q 1 2 ) · ( M · m 2 · M · q 2 + q 2 2 ) q 1 · ( m M ) · M · ( m q 1 q 2 + q 1 · q 2 ) .
To find a maximum of a function with two free variables (here q 1 and q 2 ), the partial derivatives
q 1 = M · m 2 m · ( M · ( 2 · q 1 + q 2 ) + q 1 · ( q 1 2 · q 2 ) ) + q 1 2 · ( 2 · M q 2 ) q 1 2 · ( m M ) · ( M · m M · ( q 1 + q 2 ) + q 1 · q 2 ) 2 · M · ( M · m + q 2 · ( q 2 2 · M ) ) q 1 2 · ( m M ) · ( M · m M · ( q 1 + q 2 ) + q 1 · q 2 ) 2
and
q 2 = 2 · M 2 · q 1 q 2 2 · q 1 + M · m · ( M 2 · q 2 + q 1 ) + M · q 2 · ( q 2 + 2 · q 1 ) q 1 · ( m M ) · ( M · m M · ( q 1 + q 2 ) + q 1 · q 2 ) 2 · ( M · m + q 1 · ( q 1 2 · M ) ) q 1 · ( m M ) · ( M · m M · ( q 1 + q 2 ) + q 1 · q 2 ) 2
have to be calculated. Both derivatives are set equal to zero. Thus, it follows from Equation (24) after rearranging to q 2 :
q 2 = m 2 · M m · q 1 · ( 2 · M + q 1 ) + 2 · M · q 1 2 m · ( M 2 · q 1 ) + q 1 2 .
From Equation (25) after rearranging to q 1 follows:
q 1 = M · ( m · ( M 2 · q 2 ) + q 2 2 ) M · m + 2 · M 2 2 · M · q 2 + q 2 2 .
Note that there are two other solutions for q 2 ; however, both are independent from q 1 . Further, the denominators of the Equations (26) and (27) cannot be zero as it holds that 0 < m < M .
Inserting Equation (26) into Equation (27) and rearranging leads to:
q 1 = q w c 1
Inserting Equation (28) into Equation (26) leads to:
q 2 = m 2 · M m · q w c 1 · ( 2 · M + q w c 1 ) + 2 · M · q w c 1 2 m · ( M 2 · q w c 1 ) + q w c 1 2 = q w c 2 .
Inserting Equations (28) and (29) into Equation (23) leads to Equation (21). ☐
Based on Theorem 3, an improved upper bound can be calculated for arbitrary T 3 .
Theorem 4.
For the competitive ratio of an optimal online algorithm for the bi-directional preemptive conversion problem with given M, m and T holds c ( M · m 2 · M · q w c 1 + q w c 1 2 ) · ( M · m 2 · M · q w c 2 + q w c 2 2 ) q w c 1 · ( m M ) · M · ( m q w c 1 q w c 2 + q w c 1 · q w c 2 ) T 2 for T 3 .
Proof of Theorem 4.
From Equation (21) follows, using EBA, the ratio between OPT and ON cannot grow more than the factor ( M · m 2 · M · q w c 1 + q w c 1 2 ) · ( M · m 2 · M · q w c 2 + q w c 2 2 ) q w c 1 · ( m M ) · M · ( m q w c 1 q w c 2 + q w c 1 · q w c 2 ) within two periods. Thus, for a sequence with T 1 periods, the competitive ratio has to be lower or equal to
( M · m 2 · M · q w c 1 + q w c 1 2 ) · ( M · m 2 · M · q w c 2 + q w c 2 2 ) q w c 1 · ( m M ) · M · ( m q w c 1 q w c 2 + q w c 1 · q w c 2 ) T 2 .
Note that from Lemma 1 and Theorem 4 follows the upper bound for the competitive ratio of EBA.
A lower upper bound for the bi-directional preemptive CP with a constant price interval can be found by determining the competitive ratio of EBA for T > 3 . However, the complexity raises. Furthermore, even if the competitive ratio for arbitrary T 2 is known, the upper bound could be improved as EBA is not optimal for T 3 .

2.4. Comparison of the Competitive Ratios

One question is how EBA performs compared to the algorithms for the bi-directional preemptive CP with a constant price interval which exist in literature. The authors in [3,4] do not provide a formula for the competitive ratio which can be rearranged to c. This makes it hard to proof if one of the algorithms is better than the others. Therefore, an experimental analysis is used to compare the algorithms. Furthermore, since [3,4] use the number of runs k in the formula for their competitive ratios, new competitive ratios for these algorithms have to be determined which do not depend on k. In fact, only lower bounds for the competitive ratio will be determined. Therefore, the performance ratio for these algorithms is calculated on sequences where the algorithms do not convert.
Theorem 5.
For the competitive ratio of bTH’ for the bi-directional preemptive conversion problem with a constant price interval and given M , m , and T holds c ( b T H ) c ( u T H ) T 2 .
Proof of Theorem 5.
Only sequences on which bTH’ does not trade are considered. The highest ratio between OPT and ON results on the sequence q 1 = c ( u T H ) · m , m , c ( u T H ) · m , m , , c ( u T H ) · m , m for even T 2 . It holds that:
O P T ( q 1 ) = c ( u T H ) · m m T 2 , O N ( q 1 ) = 1 , O P T ( q 1 ) O N ( q 1 ) = c ( u T H ) T 2
In case of odd T, OPT and ON have the same wealth as in case of T 1 . It holds
c ( b T H ) c ( u T H ) T 2 .
Theorem 6.
For the competitive ratio of bTH for the bi-directional preemptive conversion problem with a constant price interval and given M , m , and T holds c ( b T H ) c ( u T H ) T 2 .
Proof of Theorem 6.
The proof is analogous to the proof of Theorem 5. It holds that
c ( b T H ) c ( u T H ) T 2 .
Since it holds that c ( u T H ) < c ( u T H ) (see [4]), it also holds that c ( u T H ) T 2 < c ( u T H ) T 2 . Therefore, EBA is only compared with bTH. For the experimental analysis, the following parameters are used: M { 2 , 10 , 100 , 1000 } , T { 2 , 5 , 7 , 13 } and m = 1 . Table 1 shows the values for the upper bound of EBA and the lower bound of bTH.
From Table 1, it follows that both algorithms achieve the same competitive ratio for T = 2 . This is not surprising. bTH is optimal for a sequence consisting of one run. A sequence with T = 2 points in time consists of one run. Thus, bTH is also optimal in the single-period model. The upper bounds for the competitive ratio of EBA are lower than the lower bounds of the competitive ratio of bTH for T { 7 , 13 } . Only for T = 5 and small values of M the results of bTH are lower than the results of EBA. In these cases, it is not known which algorithm is better. The results indicate that EBA is getting better compared to bTH with increasing T and with an increasing ratio M m . This is not surprising. EBA is designed with the objective to perform well in the case of given T and unknown k. In contrast, bTH is designed with the objective to perform well in the case of given k. Nevertheless, these results show that there is a lack in the literature considering the bi-directional preemptive CP with a constant price interval, and given T and unknown k.

3. Conclusions

In this work, the bi-directional preemptive CP with a constant price interval is considered. For the first time upper and lower bounds that are independent from the number of runs, are given. Furthermore, the algorithm EBA is presented. EBA optimally solves the problem for T = 2 . Due to this, the performance ratio of EBA for a specific type of sequences could be used to calculate the lower and upper bound. EBA is based on the idea of error balancing. The definition of a symmetric algorithm is introduced. This definition makes it easier to determine the competitive ratio of a certain type of online algorithms.
The algorithm EBA is compared with the two other competitive online algorithms for the bi-directional preemptive CP with a constant price interval that exists in the literature. For specific parameters, EBA is the best algorithm known so far. However, it is shown that EBA is not optimal in the case of T 3 . Therefore, one open question is how to optimally solve the bi-directional preemptive CP with constant price interval for T 3 . Another open question is how to solve the corresponding PSP with n 2 assets.

Acknowledgments

My special thanks go to Günter Schmidt for his comments and support during my PhD thesis.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Borodin, A.; El-Yaniv, R. Online Computation and Competitive Analysis; Cambridge University Press: Cambridge, UK, 1998. [Google Scholar]
  2. Mohr, E.; Ahmad, I.; Schmidt, G. Online algorithms for conversion problems. A survey. Surv. Oper. Res. Manag. Sci. 2014, 19, 87–204. [Google Scholar] [CrossRef]
  3. El-Yaniv, R.; Fiat, A.; Karp, R.M.; Turpin, G. Competitive analysis of financial games. In Proceedings of the 33rd Annual Symposium on Foundations of Computer Science, Pittsburgh, PA, USA, 24–27 October 1992; pp. 327–333. [Google Scholar]
  4. Dannoura, E.; Sakurai, K. An improvement on El-Yaniv-Fiat-Karp-Turpin’s money-making bi-directional trading strategy. Inf. Process. Lett. 1998, 66, 27–33. [Google Scholar] [CrossRef]
  5. Schmidt, G. Competitive analysis of bi-directional non-preemptive conversion. J. Comb. Optim. 2017, 34, 1096–1113. [Google Scholar] [CrossRef]
  6. Sleator, D.D.; Tarjan, R.E. Amortized Efficiency of List Update and Paging Rules. Commun. ACM 1985, 28, 202–208. [Google Scholar] [CrossRef]
  7. Koutsoupias, E.; Papadimitriou, C.H. Beyond Competitive Analysis. SIAM J. Comput. 2000, 30, 300–317. [Google Scholar] [CrossRef] [Green Version]
  8. El-Yaniv, R. Competitive solutions for online financial problems. ACM Comput. Surv. 1998, 30, 28–69. [Google Scholar] [CrossRef]
  9. El-Yaniv, R.; Fiat, A.; Karp, R.M.; Turpin, G. Optimal Search and One-Way Trading Online Algorithms. Algorithmica 2001, 30, 101–139. [Google Scholar] [CrossRef] [Green Version]
  10. Zhang, W.; Xu, Y.; Zheng, F.; Dong, Y. Optimal algorithms for online time series search and one-way trading with interrelated prices. J. Comb. Optim. 2012, 23, 159–166. [Google Scholar] [CrossRef]
  11. Schroeder, P.; Kacem, I. New algorithms for online time series search with interrelated prices. In Proceedings of the 2019 6th International Conference on Control, Decision and Information Technologies, Paris, France, 23–26 April 2019; pp. 1682–1687. [Google Scholar]
  12. Schroeder, P.; Kacem, I.; Schmidt, G. Optimal online algorithms for the portfolio selection problem, bi-directional trading and -search with interrelated prices. RAIRO Oper. Res. 2019, 53, 559–576. [Google Scholar] [CrossRef]
  13. Damaschke, P.; Ha, P.H.; Tsigas, P. Online Search with Time-Varying Price Bounds. Algorithmica 2009, 55, 619–642. [Google Scholar] [CrossRef] [Green Version]
  14. Lorenz, J.; Panagiotou, K.; Steger, A. Optimal Algorithms for k-Search with Application in Option Pricing. Algorithmica 2009, 55, 311–328. [Google Scholar] [CrossRef]
  15. Zhang, W.; Xu, Y.; Zheng, F.; Liu, M. Online algorithms for the general k-search problem. Inf. Process. Lett. 2011, 111, 678–682. [Google Scholar] [CrossRef]
  16. Fung, S.P.Y. Optimal Online Two-Way Trading with Bounded Number of Transactions. Algorithmica 2019, 81, 4238–4257. [Google Scholar] [CrossRef] [Green Version]
  17. Li, F. Two-Way Currency Trading Algorithms in the Discrete Setting. In Algorithmic Aspects in Information and Management; Springer: Cham, Switzerland, 2016; Volume 9849, pp. 169–178. [Google Scholar]
  18. Dochow, R. Online Algorithms for the Portfolio Selection Problem; Springer Gabler: Wiesbaden, Germany, 2016. [Google Scholar]
  19. Schwarz, M. Kompetitive Algorithmen für den Börsenhandel. Ph.D. Thesis, Saarland University, Saarbrücken, Germany, 2019. [Google Scholar]
Table 1. The experimental results for the upper bound of EBA and the lower bound of bTH.
Table 1. The experimental results for the upper bound of EBA and the lower bound of bTH.
M1000100102
T
EBA21.93871.81821.51951.1716
511.09497.48433.53211.5494
736.955820.47506.63811.9286
131365.7294419.223844.06383.7193
bTH21.93871.81821.51951.1716
512.19487.64723.48941.5385
761.800026.81637.24301.9615
139130.61541233.733966.28464.0865

Share and Cite

MDPI and ACS Style

Schwarz, M. Lower and Upper Bounds for the Discrete Bi-Directional Preemptive Conversion Problem with a Constant Price Interval. Algorithms 2020, 13, 42. https://doi.org/10.3390/a13020042

AMA Style

Schwarz M. Lower and Upper Bounds for the Discrete Bi-Directional Preemptive Conversion Problem with a Constant Price Interval. Algorithms. 2020; 13(2):42. https://doi.org/10.3390/a13020042

Chicago/Turabian Style

Schwarz, Michael. 2020. "Lower and Upper Bounds for the Discrete Bi-Directional Preemptive Conversion Problem with a Constant Price Interval" Algorithms 13, no. 2: 42. https://doi.org/10.3390/a13020042

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop