Optimal Double Stopping Problems for Maxima and Minima of Geometric Brownian Motions

We present closed-form solutions to some double optimal stopping problems with payoffs representing linear functions of the running maxima and minima of a geometric Brownian motion. It is shown that the optimal stopping times are th first times at which the underlying process reaches some lower or upper stochastic boundaries depending on the current values of its running maximum or minimum. The proof is based on the reduction of the original double optimal stopping problems to sequences of single optimal stopping problems for the resulting three-dimensional continuous Markov process. The latter problems are solved as the equivalent free-boundary problems by means of the smooth-fit and normal-reflection conditions for the value functions at the optimal stopping boundaries and the edges of the three-dimensional state space. We show that the optimal stopping boundaries are determined as the extremal solutions of the associated first-order nonlinear ordinary differential equations. The obtained results are related to the valuation of perpetual real double lookback options with floating sunk costs in the Black-Merton-Scholes model.


Formulation of the Problems
The main aim of this paper is to present closed-form solutions to the discounted optimal double stopping problems with the values: and for some given constants L i ≥ 1 ≥ K i > 0 , for i = 1, 2 . Here, for a precise formulation of the problem, we consider a probability space (Ω, F, P) with a standard Brownian motion B = (B t ) t≥0 . We assume that the process X = (X t ) t≥0 is defined by: so that it solves the stochastic differential equation: where < r , r > 0 and > 0 are given constants, and x > 0 is fixed. In our application, the process X describes the current state of technological progress, which changes over time due to the active process of research and development in a branch of the industry, where r is the discount rate. The running maximum S = (S t ) t≥0 and minimum Q = (Q t ) t≥0 of the process X defined by: for arbitrary 0 < q ≤ x ≤ s , respectively, can be interpreted as the best and the worst market valuation of technology achieved so far. Suppose that the suprema in (1) and (2) are taken over all stopping times and with respect to the natural filtration (F t ) t≥0 of the process X, and the expectations there are taken with respect to the risk-neutral probability measure P. In this case, the values of (1) and (2) can be interpreted as the rational (or no-arbitrage) values of (perpetual) real lookback compound options with present values, which are linear in the running maximum or minimum of X, as well as sunk cost investment amounts, which are constant or linear in X, in the Black-Merton-Scholes model, respectively (see, e.g. Dixit and Pindyck [Dixit and Pindyck (1994); Chapter X] for the examples of standard compound real options).
The problem of (1), which has its dual of (2), is a typical valuation problem for financial lookback options. It has, however, a broader interpretation related to capital budgeting of real investment decisions, that is, real lookback options. In particular, by utilising the approach presented in this paper, decision makers are able to quantify the financial value of investments in new promising technologies, as well as of the policy mechanisms that can be used to incentivise such investments. More specifically, we have in mind that the current state of technological progress is observable and is described by the process X, whereas r is the discount rate. (1) In order to adopt a new technology at time t ≥ 0 , a firm is required to pay sunk costs which are proportional to the value of the technology in the market denoted by X = (X t ) t≥0 . This implies that more valuable developments are also associated with higher investment cost (for example, due to competition for suppliers). Typically, however, there is a time lag between a technological breakthrough and the actual realisation of the full potential of a new technology. The latter often requires additional investment in complementary technologies, changes in business processes or proper infrastructure (see Brynjolfsson and Hitt (2003) and Brynjolfsson et al. (2017)). In our problem, this feature is encapsulated by a second option available to the firm upon adoption of the new technology. We call this feature the commercialisation option. More specifically, by paying the sunk costs K 1 X , the firm is able to realise the full potential of the technology, given by the running maximum S of the process X. These sunk costs are proportional to the current market value of the technology's potential due to, for example, the need to develop technology-specific infrastructure. Ideally, the firm would like to enter the market, adopt the technology, when the cost of acquisition is low, and undertake further investments, once the technology is valuable enough. In other words, a firm would like to identify future winners early on, as once the market identifies the winning technologies, the costs of their adoption will be high. Hence, if the firm realises the potential of a technology too late, it pays larger sunk costs and delays further investments in developing this technology. Consequently, some emerging technologies reach their productive potential later than it might be desirable from a social welfare point of view. In this paper, we propose a valuation framework that allows to quantify the value associated with implementing a specific incentive mechanism inspired by financial lookback options, which stimulates innovations by reducing the firm's regret of missing out on investment opportunities. This mechanism takes the form of an investment cost subsidy, which is equal to the difference between the current market value of the technology given by X, and the minimal value it has achieved until this moment Q. Then, upon the technology adoption, the firm receives the value L 1 X which is proportional to its current value X, whereas the costs paid by the firm are equal to Q, which reduces its regret associated with failing to time the market.
From the derived closed-from solutions we conclude that under such a support mechanism, firms have an incentive to adopt a technology when X is moving away from its running minimum Q. In this case, the technology is more valuable. Upon adoption the following two cases can occur. If the technology is sufficiently promising, then the firm will wait with commercialisation. This happens, because the probability that a new, higher, maximum S will be reached soon is large and, thus, there is a larger potential for a higher payoff which induces the firm to wait with commercialisation. However, if the market value is small relative to its running maximum S, then the firm commercialises the technology immediately after adoption as it is now unlikely that the technology will improve in comparison to its best performance achieved so far to warrant waiting for a higher maximum. These results show that double lookback options allow a social planner to subsidise the most efficient technologies without having to pick winners ex ante. Rather, the benefit of such a subsidy is a direct support for the realised winners, that is, the most desirable technologies as evidenced by market value, which could result in a considerable welfare increase.
Discounted optimal stopping problems for certain reward functionals depending on the running maxima and minima of continuous Markov (diffusion-type) processes were initiated by Shepp and Shiryaev (1993) and further developed by Pedersen (2000); Guo and Shepp (2001); Gapeev (2007); Guo and Zervos (2010); Peskir (2012Peskir ( , 2014Glover et al. (2013); Rodosthenous and Zervos (2017); Gapeev (2019Gapeev ( , 2020; ; Gapeev and Li (2021); Gapeev and Al Motairi (2021); Gapeev (2022) among others. The main feature in the analysis of such optimal stopping problems was that the normal-reflection conditions hold for the value functions at the diagonals of the state spaces of the multi-dimensional continuous Markov processes having the initial processes and the running extrema as their components. It was shown, by using the established by Peskir (1998) maximality principle for solutions of optimal stopping problems, which is equivalent to the superharmonic characterisation of the value functions, that the optimal stopping boundaries are characterised by the appropriate extremal solutions of certain (systems of) first-order nonlinear ordinary differential equations. Other optimal stopping problems in models with spectrally negative Lévy processes and their running maxima were studied by Asmussen et al. (2003); Avram et al. (2004);Ott (2013); Kyprianou and Ott (2014) among others.
We further consider the problems of (1) and (2) as the associated double (two-step) optimal stopping problems of (6) and (7) for the three-dimensional continuous Markov processes having the process X as well as its running maximum S and minimum Q as their state space components. The resulting problems turn out to be necessarily three-dimensional in the sense that they cannot be reduced to optimal stopping problems for Markov processes of lower dimensions. The original optimal double stopping problems are reduced to the appropriate sequences of single optimal stopping problems which are solved as the equivalent free-boundary problems for the value functions which satisfy the smooth-fit conditions at the optimal stopping boundaries and the normal-reflection conditions at the edges of the state space of the three-dimensional processes. The multiple (multi-step) optimal stopping problems for one-dimensional diffusion processes have recently drawn a considerable attention in the related literature. Duckworth and Zervos (2000) studied an investment model with entry and exit decisions alongside a choice of the production rate for a single commodity. The initial valuation problem was reduced to a double (two-step) optimal stopping problem which was solved through the associated dynamic programming differential equation. Carmona and Touzi (2008) derived a constructive solution to the problem of pricing of perpetual swing contracts, the recall components of which could be viewed as contingent claims with multiple exercises of American type, using the connection between optimal stopping problems and the associated with them Snell envelopes. Carmona and Dayanik (2008) then obtained a closed form solution of a multiple (multi-step) optimal stopping problem for a general linear regular diffusion process and a general payoff function among others. The problem of pricing of American compound standard put and call options in the classical Black-Merton-Scholes model was explicitly solved in Gapeev and Rodosthenous (2014a). The same problem in the more general stochastic volatility framework was studied by Chiarella and Kang (2009), where the associated two-step free-boundary problems for partial differential equations were solved numerically, by means of a modified sparse grid approach.
The rest of the paper is organised as follows. In Sect. 2, we embed the original problems with the values V * i , for i = 1, 2 , in (1) and (2) into the optimal multiple stopping problems for the values functions V * i (x, s, q) , for i = 1, 2 , in (6) and (7) for the three-dimensional continuous Markov process (X, S, Q) defined in (3) and (5), respectively. It is shown that the optimal exercise times * 1 (S, Q) and * 2 (S, Q) are the first times at which the process X reaches some upper or lower boundaries b * (S, Q) or a * (S, Q) depending on the current values of either the processes S and Q, respectively. In Sect. 3, we derive closed-form expressions for the candidate value functions for V * i (x, s, q) , for i = 1, 2 , as solutions to the equivalent free-boundary problems and apply the normal-reflection conditions at the edges of the three-dimensional state space for (X, S, Q) to characterise the candidate optimal stopping boundaries for b * (S, Q) and a * (S, Q) or as the minimal and maximal solutions of the appropriate first-order nonlinear ordinary differential equations, respectively. In Sect. 4, by applying the change-of-variable formula with local time on surfaces from Peskir (2007), it is verified that the resulting solutions to the free-boundary problem provide the expressions for the value functions and the optimal stopping boundaries for the underlying asset price process in the original problems. In Sect. 5, we recall the explicit solutions of the inner optimal stopping problems with the value functions U * 1 (x, s) and U * 2 (x, q) from (72). The main results of the paper are stated in Theorem 4.1. The resulting method is presented in Corollary 4.2 and described in Remark 4.3.

Preliminaries
In this section, we describe the structure of the three-dimensional optimal stopping problems of (1) and (2) which are related to the floating sunk costs real double lookback option pricing problems and formulate the equivalent free-boundary problems.

The Two-step Optimal Stopping Problems
It is seen that the problems of (1) and (2) can naturally be embedded into the optimal double stopping problems for the (time-homogeneous strong) Markov process (X, S, Q) = (X t , S t , Q t ) t≥0 defined in (3) and (5) with the values: and for some L i ≥ 1 ≥ K i > 0 , for i = 1, 2 , fixed, where the suprema are taken over all stopping times and with respect to the filtration (F t ) t≥0 . In this case, by virtue of the strong Markov property of the process (X, S, Q), the original problems of (6) and (7) can be reduced to the optimal stopping problems with the values: where the suprema are taken over all stopping times of (X, S, Q), and we set: for some L 1 ≥ 1 ≥ K 2 > 0 fixed, respectively. Here, the functions U * 1 (x, s) and U * 2 (x, q) represent the values of the optimal stopping problems formulated in (72), where the optimal stopping times * i , for i = 1, 2 , have the form of (73), for some boundaries 0 < g * (s) ≡ * s < s and h * (q) ≡ * q > q > 0 determined in Corollary 5.1 below.

The Outer Optimal Stopping Problems
Let us first transform the rewards in the expressions of (8) and (9) with the aim to formulate the associated optimal stopping problems. For this purpose, we use standard arguments based on an application of Itô's formula (see, e.g. [Liptser and Shiryaev (2001); Theorem 4.4] or [Revuz and Yor (1999); Chapter II, Theorem 3.2]) to show that the infinitesimal operator of the process (X, S, Q) from (4) and (5) acts on an arbitrary function V(x, s, q) from the class C 2,1,1 on E according to the rule: while we should also assume that: in order to have the operator well-defined at d 1 and d 2 , respectively (see, e.g. [Peskir (1998); Subsection 3.1]). We first recall from the results of Beibel and Lerche (1997); Pedersen (2000) and Guo and Shepp (2001) (as well as Gapeev (2020)) on the expressions in (85)-(86) for the value functions U * 1 (x, s) and U * 2 (x, q) in (72) which solve the freeboundary problems in (74)-(80) that the processes e −rt U * 1 (X t , S t ) and e −rt U * 2 (X t , Q t ) admit the representations: and where the stochastic integrals with respect to the standard Brownian motion B = (B t ) t≥0 are continuous square-integrable martingales. Let us now apply Itô's formula to the processes e −rt G i (X t , S t , Q t ) , for i = 1, 2 , to obtain: and with for each 0 < q < x < s , and all t ≥ 0 , where I(⋅) denotes the indicator function. Here, is the infinitesimal operator of the process (X, S, Q) having the form of (10)-(11) above, and the processes N i = (N i t ) t≥0 , for i = 1, 2 , defined by: for all t ≥ 0 , are continuous square-integrable martingales under the probability measure P. It also follows from the explicit expressions in (3)-(4) for the process X under the assumption < r as well as from the properties of the partial derivatives x G i (x, s, q) , for i = 1, 2 , and the structure of the other processes included into the expressions of (14) and (16) that the processes N i , for i = 1, 2 , defined in (18) are uniformly integrable. Note that the processes S and Q may change their values only at the times when X t = S t and X t = Q t , for t ≥ 0 , respectively, and such times accumulated over the infinite horizon form the sets with zero Lebesgue measure, so that the indicators in the expressions of (14) and (16) as well as (18) can be ignored (see also Proof of Theorem 4.1 below for more explanations and references). Then, inserting in place of t and applying Doob's optional sampling theorem (see, e.g. [Liptser and Shiryaev (2001); Chapter III, Theorem 3.6] or [Revuz and Yor (1999); Chapter II, Theorem 3.2]) to the expressions in (14) and (16), we get that the equalities: and hold, for any stopping time with respect to the filtration (F t ) t≥0 . Hence, taking into account the expressions in (19) and (20), we conclude that the optimal stopping problems with the values of (8) are equivalent to the optimal stopping problems with the value functions: and where the functions H i (x, s, q) , for i = 1, 2 , are defined in (15) and (17), for (x, s, q) ∈ E , respectively. Here, we denote by E x,s,q the expectation with respect to the probability measures P x,s,q under which the three-dimensional (time-homogeneous strong Markov) processes (X, S, Q) starts at (x, s, q) ∈ E , and by E = {(x, s, q) ∈ ℝ 3 | 0 < q ≤ x ≤ s} the state spaces of (X, S, Q). We further obtain solutions to the optimal stopping problems in (21) and (22) and verify below that the value functions V * i (x, s, q) , for i = 1, 2 , are the solutions of the problems in (8), and thus, give the solutions of the original multiple optimal stopping problems in (1) and (2), under s = q = x.
It follows from the results of general theory of optimal stopping problems for Markov processes (see, e.g. [Peskir and Shiryaev (2006); Chapter I, Subsection 2.2]) that the continuation and stopping regions of the optimal stopping problems in (8) have the form: for every i = 1, 2 , respectively. It is seen from the results of Theorem 4.1 below that the value function V * i (x, s, q) is continuous, so that the set C * i is open and D * i is closed, for every i = 1, 2.

The Structure of Optimal Stopping Times
Let us now specify the structure of the optimal stopping times in the outer optimal stopping problems of (21) and (22). (i) It follows from the structure of the second integrals of (21) and (22) as well as the facts that the process S is increasing and the process Q is decreasing that it is not optimal to exercise the outer parts of the contracts (or exercise the double lookback options for the first time), whenever the appropriate integrands are positive. In other words, the diagonals belong to the continuation regions C * 1 and C * 2 in (23), respectively. Moreover, it follows from the structure of the first integrals of (21) and (22) that it is not optimal to exercise the outer parts of the contracts (or exercise the double lookback options for the first time) when the inequalities for all t ≥ 0 , respectively. In other words, these facts mean that the (23).
(ii) We now observe that it follows from the definition of the process (X, S, Q) in (3) and (5) and the structure of the rewards in (21) and (22) that, for each s > 0 fixed, there exist 0 < q ≤ x such that x is sufficiently close to s and the point (x, s, q) belongs to the stopping region D * i , for every i = 1, 2 . Moreover, for each q > 0 fixed, there exist 0 < x ≤ s such that x is sufficiently close to q and the point (x, s, q) belongs to D * i , for i = 1, 2 . By virtue of arguments similar to the ones applied in [Dubins et al. (1993); Subsection 3.3] and [Peskir (1998); Subsection 3.3], these properties can be explained by the facts that the costs of waiting until the process X coming from either such a large x > 0 decreases to the current value of the running minimum process Q or such a small x > 0 increases to the current value of the running maximum process S may be too large due to the presence of the discounting factors in the reward functionals of (21) and (22). Furthermore, by virtue of the asymptotic distributional properties of the running maximum S and minimum Q from (5) of the geometric Brownian motion X from (3)-(4) on the infinitesimally small time intervals (see, e.g. [Dubins et al. (1993); Subsection 3.3] for similar arguments applied to the running maxima of the Bessel processes, [Peskir (1998); Proposition 2.1] for similar properties of the running maxima of general diffusion processes, and [Gapeev and Li (2021); Theorem 2.1, Part (i)] for similar properties of the running maxima and minima of geometric Brownian motions), it follows that the reward functionals in (21) and (22) infinitesimally increase when X t = Q t or X t = S t , for each t ≥ 0 . This fact also shows that all points (x, s, q) from the diagonals (23), respectively. On the one hand, if we take some (x, s, q) ∈ D * 1 from (23) such that x > (1 ∨ r∕((r − )L 1 ))q and use the fact that the process (X, S, Q) started at some (x � , s, q) such that 0 < (1 ∨ r∕((r − )L 1 ))q < x < x � < s passes through the point (x, s � , q) , for some s ′ ≥ s , before hitting the plane d 1 = {(x, s, q) ∈ ℝ 3 | 0 < x = q < s} , then the representation of (19) for the reward functional in (21) implies that V * 1 (x � , s, q) ≤ V * 1 (x, s, q) = 0 holds, so that (x � , s, q) ∈ D * 1 . Moreover, if we take some (x, s, q) ∈ D * 2 from (23) such that 0 < x < (r∕((r − )K 2 ) ∧ 1)s and use the fact that the process (X, S, Q) started at some (x �� , s, q) such that 0 < q < x �� < x < (r∕((r − )K 2 ) ∧ 1)s passes through the point (x, s, q �� ) , for some 0 < q ′′ ≤ q , before hitting the diagonal d 2 = {(x, s, q) ∈ ℝ 3 | 0 < q < x = s} , then the representation of (20) for the reward functional in (22) implies that V * 2 (x �� , s, q) ≤ V * 2 (x, s, q) = 0 holds, so that (x �� , s, q) ∈ D * 2 . Thus, we may conclude that the stopping regions D * i , for i = 1, 2 , from (23) have the right-hand and left-hand parts, respectively.
(iii) We may therefore conclude that there exist functions b * (s, q) and a * (s, q) such that the inequalities H i (x, s, q) < 0 , for i = 1, 2 , hold, for (x, s, q) ∈ E such that x ≥ b * (s, q) or x ≤ a * (s, q) , respectively. In this respect, the continuation regions C * i , for i = 1, 2 , in (23) have the form: while the stopping regions D * i , for i = 1, 2 , in (23) are given by: (Figs. 1-2 on this page illustrate computer drawings of the optimal stopping boundaries b * (s, q) and a * (s, q).) (iv) Let us finally clarify the location of the boundaries b * (s, q) and a * (s, q) in relation to the optimal stopping boundaries g * (s) and h * (q) from (73) for the optimal stopping problems with the value functions U * 1 (x, s) and U * 2 (x, q) in (72) below. For this purpose, we use the notations of the functions F i (x, s, q) , for i = 1, 2 , from (36) and (37) below. Suppose that either the inequality b * (s, q) < h * (q) or a * (s, q) > g * (s) holds, for some 0 < q < g * (s) < s and 0 < q < h * (q) < s . In this case, for each point (x, s, q) such that x ∈ (b * (s, q), h * (q)) and 0 < q < x ≤ g * (s) < s , we would have s, q) contradicting the fact that , for all (x, s, q) ∈ E . Also, for each point (x, s, q) such that x ∈ (g * (s), a * (s, q)) and , for all (x, s, q) ∈ E . Hence, we may conclude that the inequalities b * (s, q) ≥ h * (q) and a * (s, q) ≤ g * (s) should hold, for all 0 < q < g * (s) < s and 0 < q < h * (q) < s , respectively.
(v) Recall that the problem of (1) can be interpreted as the combined problem of finding the optimal time to adopt a new technology in the presence of an investment cost subsidy and then to determine when it is optimal to commercialise it. The subsidised technology adoption occurs when the process X hits the boundary b * (S, Q) from above, implying that the first investment occurs when X moves away from its running minimum Q and the technology becomes more valuable. Upon adoption the following two cases can occur. If the technology is sufficiently promising, that is, if X is sufficiently large, so that X > g * (S) holds, then the firm will wait with commercialisation. This is because the probability that a new, higher, maximum S will be reached soon is large, and thus, there is a larger potential for a higher payoff which induces the firm to wait with commercialisation. If however, X is relatively small, then the firm commercialise the technology immediately after adoption as it is now unlikely that the technology will improve in comparison to its best performance achieved so far to warrant waiting for a higher maximum.

The Free-boundary Problems
In order to find analytic expressions for the unknown value functions V * i (x, s, q) , for i = 1, 2 , from (21) and (22) with the unknown boundaries b * (s, q) and a * (s, q) from (24)-(25), let us use the results of general theory of optimal stopping problems for Markov processes (see, e.g. [Peskir and Shiryaev (2006); Chapter IV, Section 8]) as well as optimal stopping problems for maximum processes (see, e.g. [Peskir and Shiryaev (2006); Chapter V, Sections 15-20] and references therein). We can therefore reduce the optimal stopping problems of (21) and (22) to the equivalent free-boundary problems: where the instantaneous-stopping as well as the smooth-fit and normal-reflection conditions of (28)-(30) are satisfied, for each 0 < q < s . Observe that the superharmonic characterisation of the value function (see, e.g. [Peskir and Shiryaev (2006); Chapter IV, Section 9]) implies that V * i (x, s, q) , for i = 1, 2 , are the smallest functions satisfying (26)-(27) with (28) and (31)-(32) with the boundaries b * (s, q) and a * (s, q) , respectively. Note that the inequalities in (33)-(34) follow directly from the arguments of parts (i) and (ii) of Subsection 2.3 above.

Solutions to the Free-boundary Problems
In this section, we obtain closed-form expressions for the value functions V * i (x, s, q) , for i = 1, 2 , in (21) and (22) associated with the perpetual real double lookback options on maxima and minima and derive first-order nonlinear ordinary differential equations for the optimal stopping boundaries b * (s, q) and a * (s, q) from (24)-(25) as solutions to the freeboundary problems in (26)-(34).

The Candidate Value Functions
We first observe that the general solutions of the second-order ordinary differential equations in (10) + (26)-(27) have the form: for every i = 1, 2 , with the particular solutions: and for all 0 < q ≤ x ≤ s , respectively. Here, C i,j (s, q) , for i, j = 1, 2 , are some continuously differentiable functions, and the numbers j , j = 1, 2 , are given by: so that 2 < 0 < 1 < 1 , as well as the identity: 2 holds. Then, by applying the conditions from (28)-(30) to the function in (35), we get that the equalities: are satisfied, for 0 < q < s , where the functions F i (x, s, q) , for i = 1, 2 , are defined in (36)-(37). Now, by solving the system of equations in (40)-(41), we obtain that the candidate value function admits the representation: for q ≤ x < b(s, q) , where for 0 < g * (s) ≤ q < s , and for 0 < q < g * (s) < s , and every j = 1, 2 . Also, by solving the system of equations in (42)-(43), we obtain that the candidate value function admits the representation: for a(s, q) < x ≤ s , where for 0 < q < s ≤ h * (q) , and (39) (49) V 2 (x, s, q;a(s, y)) = C 2,1 (s, q;a(s, q)) x 1 + C 2,2 (s, q;a(s, q)) x 2 − F 2 (x, s, q) (51) C 2,j (s, q;a(s, q)) = 3−j (s − q + (L 2 − K 2 )a(s, q)) − (L 2 − K 2 )a(s, q) for 0 < q < h * (q) < s , and every j = 1, 2. Moreover, by means of straightforward computations, it can be deduced from the expression in (46) with (36) that the first-order and second-order partial derivatives x, s, q;b(s, q)) and xx V 1 (x, s, q;b(s, q)) of the function V 1 (x, s, q;b(s, q)) take the form: and on the interval q < x < b(s, q) , for each 0 < q < s . Also, by means of straightforward computations, it can be deduced from the expression in (49) with (37) that the first-order and second-order partial derivatives x V 2 (x, s, q;a(s, q)) and xx V 2 (x, s, q;a(s, q)) of the function V 2 (x, s, q;a(s, q)) take the form: and on the interval a(s, q) < x < s , for each 0 < q < s.

The Candidate Stopping Boundaries
In order to derive first-order nonlinear ordinary differential equations for the candidate boundary functions, we further assume that the functions b(s, q) and a(s, q) are continuously differentiable. Then, applying the condition of (44) to the functions C 1,j (s, q;b(s, q)) , for j = 1, 2 , in (47)-(48), we obtain the equalities: for 0 < g * (s) ≤ q < s , and for 0 < q < g * (s) < s . Here, by virtue of the structure of the equation in (56), we have b(s, q) = * q with * > 1 from (84), for all q > g * (s) and each s > 0 . Note that the candidate value function V 1 (x, s, q;b(s, q)) in (46) with (47)-(48) is (strictly) increasing in b(s, q), so that we should take the candidate stopping boundary b(s, q), for i = 1, 2 , as the minimal solution of the first-order nonlinear ordinary differential equation in (57) located above the plane Hence, applying the condition of (45) to the functions C 2,j (s, q;a(s, q)) , for j = 1, 2 , in (50)-(51), we obtain the equalities: for 0 < q < s ≤ h * (q) , and for 0 < q < h * (q) < s . Here, by virtue of the structure of the equation in (58), we have a(s, q) = * s with 0 < * < 1 from (82), for all 0 < s < h * (q) and each q > 0 . Note that the candidate value function V 2 (x, s, q;a(s, q)) in (46) with (47)-(48) is (strictly) decreasing in a(s, q), so that we should take the candidate stopping boundary a(s, q), for i = 1, 2 , as the maximal solution of the first-order nonlinear ordinary differential equation in (59) located below the plane d 2 = {(x, s, q) ∈ ℝ 3 | 0 < q < x = s}.

The Minimal and Maximal Admissible Solutions b * (s, q) and a * (s, q).
We further consider the minimal and maximal admissible solutions of first-order nonlinear ordinary differential equations as the smallest and largest possible solutions b * (s, q) and a * (s, q) of the equations in (57) and (59), which satisfy the inequalities 0 < q < h * (q) ≤ b * (s, q) ≤ s , and 0 < q ≤ a * (s, q) ≤ g * (s) < s , for all 0 < q < g * (s) < s and 0 < q < h * (q) < s . By virtue of the classical results on the existence and uniqueness of solutions for first-order nonlinear ordinary differential equations, we may conclude that these equations admit (locally) unique solutions, because of the facts that their right-hand sides represent (locally) continuous functions in (s, q, b(s, q)) and (s, q, a(s, q)) and (locally) Lipschitz functions in b(s, q) and a(s, q), for each 0 < q < g * (s) < s and 0 < q < h * (q) < s fixed (see also [Peskir (1998); Subsection 3.9] for similar arguments based on the analysis of other first-order nonlinear ordinary differential equations). Then, it is shown by means of technical arguments based on Picard's method of successive approximations that there exist unique solutions b(s, q) and a(s, q) to the equations in (57) and (59) started at some points (q 0 , s, q 0 ) and (s 0 , s 0 , q) , for each 0 < q 0 < g * (s) < s and 0 < q < h * (q) < s 0 fixed (see also [Graversen and Peskir (1998); Subsection 3.2] and [Peskir (1998); Example 4.4] for similar arguments based on the analysis of other first-order nonlinear ordinary differential equations).
Hence, in order to construct the appropriate functions b * (s, q) and a * (s, q) which satisfy the equations in (56) and (58) and stays strictly above and below the appropriate diagonals respectively, we construct the sequences of solutions satisfying such properties and intersecting d 1 and d 2 (see also [Peskir (2014); Subsection 3.5] (among others) for a similar procedure applied for solutions of other first-order nonlinear ordinary differential equations). For this purpose, for any decreasing and increasing sequences (q l ) l∈ℕ and (s l ) l∈ℕ , such that 0 < q l < g * (s) < s and 0 < q < h * (q) < s l , we can construct the sequences of solutions b l (s, q) and a l (s, q) , for l ∈ ℕ , to the equations in (57) and (59), for all 0 < q < q l and s > s l such that b l (s, q l ) = q l and a l (s l , q) = s l holds, for each 0 < q l < g * (s) < s and 0 < q < h * (q) < s l , and every l ∈ ℕ . It follows from the structure of the equations in (57) and (59) that the inequalities q b l (s, q l ) < 1 and s a l (s l , q) < 1 should hold for the derivatives of the corresponding (58) s a(s, q) = 2 (s∕a(s, q)) 1 − 1 (s∕a(s, q)) 2 1 2 (s∕a(s, q) − (r − )K 2 ∕r)((s∕a(s, q)) 1 − (s∕a(s, q)) 2 ) (59) s a(s, q) = 2 (s∕a(s, q)) 1 − 1 (s∕a(s, q)) 2 1 2 ((s − q)∕b(s, q) + (r − )(L 2 − K 2 )∕r)((s∕a(s, q)) 1 − (s∕a(s, q)) 2 ) functions, for each 0 < q l < g * (s) < s and 0 < q < h * (q) < s l , and every l ∈ ℕ (see also [Pedersen (2000); pages 979-982] for the analysis of solutions of another first-order nonlinear differential equation). Observe that, by virtue of the uniqueness of solutions mentioned above, we know that each two curves q ↦ b l (s, q) and q ↦ b m (s, q) as well as s ↦ a l (s, q) and s ↦ a m (s, q) cannot intersect, for each 0 < q < g * (s) < s and 0 < q < h * (q) < s , and l, m ∈ ℕ , such that l ≠ m , and thus, we see that the sequence (b l (s, q)) l∈ℕ is decreasing and the sequence (a l (s, q)) l∈ℕ is increasing, so that the limits b * (s, q) = lim l→∞ b l (s, q) and a * (s, q) = lim l→∞ a l (s, q) exist, for each 0 < q < s , respectively. We may therefore conclude that b * (s, q) and a * (s, q) provides the minimal and maximal solutions to the equations in (57) and (59) such that b * (s, q) > q and a * (s, q) < s holds, for all 0 < q < g * (s) < s and 0 < q < h * (q) < s.

Main Results and Proofs
In this section, based on the facts proved above, we formulate and prove the main result of the paper. Observe that, by means of the change-of-measure arguments from Shepp and Shiryaev (1994) and Gapeev (2019), the problems of (6)-(7) can be reduced the appropriate optimal stopping problems for the two-dimensional Markov process (S∕X, Q∕X) = (S t ∕X t , Q t ∕X t ) t≥0 . However, we follow the classical approach initiated in Shepp and Shiryaev (1993) and to solve them as three-dimensional optimal stopping problems.
Theorem 4.1 Let the process (X, S, Q) be given by (3)-(4) and (5) with > 0 , < r , and r > 0 . Then, the value functions of the optimal stopping problems in (21) and (22), for some L i ≥ 1 ≥ K i > 0 , for i = 1, 2 , fixed, admit the representations: and while the optimal stopping times have the form: where the candidate value functions and boundaries are specified as follows: (i) the function V 1 (x, s, q;b * (s, q)) is given by (46) with (47)- (48), where the boundary b * (s, q) satisfying the inequality b * (s, q) ≥ h * (q) represents the minimal solution of the first-order nonlinear ordinary differential equation in (57) (84), for g * (s) ≤ q < s; (ii) the function V 2 (x, s, q;a * (s, q)) is given by (49) with (50)-(51), where the boundary a * (s, q) satisfying the inequality a * (s, q) ≤ g * (s) represents the maximal solution of the first-order nonlinear ordinary differential equation in (59) such that a * (s, q) < s , Recall that we can put s = q = x to obtain the values of the original perpetual real floating-cost double lookback call-put and put-call option pricing problems of (1) and (2) from the values of the double optimal stopping problems of (6) and (7), which are equivalent to the sequence of single optimal stopping problems of (21)- (22) and (72). Note that, since the both parts of the assertion stated above are proved using similar arguments, we may only give a proof for the case of the three-dimensional single optimal stopping problem of (22), which is related to the outer perpetual real lookback put-call options.
Proof In order to verify the assertion of part (ii) stated above, it remains for us to show that the function defined in the right-hand side of (61) coincides with the value function in (22) and that the stopping time * 2 in (62) is optimal with the boundary a * (s, q) being the solution of the system in (42)-(43)+(45) specified in (49)-(51) with (58)-(59). For this purpose, let us denote by V 2 (x, s, q) the right-hand side of the expression in (61) associated with a * (s, q) . Then, it is shown by means of straightforward calculations from the previous section that the function V 2 (x, s, q) solves the left-hand system of (26)-(34). Recall that the function V 2 (x, s, q) is C 2,1,1 on the closure C 2 of C 2 and is equal to 0 on D 2 , which are defined as C * 2 , C * 2 and D * 2 in (24) and (25) with a(s, q) instead of a * (s, q) , respectively. Hence, taking into account the assumption that the boundary a * (s, q) is (at least piecewise) continuously differentiable, for all 0 < q < s , by applying the change-of-variable formula from [Peskir (2007); Theorem 3.1] to the process e −rt V 2 (X t , S t , Q t ) (see also [Peskir and Shiryaev (2006); Chapter II, Section 3.5] for a summary of the related results and further references), we obtain the expression: for all t ≥ 0 . Here, the process M 2 = (M 2 t ) t≥0 defined by: is a continuous local martingale with respect to the probability measure P x,s,q . Note that, since the time spent by the process (X, S, Q) at the boundary surface {(x, s, q) ∈ E | x = a(s, q)} as well as at the diagonals d 1 = {(x, s, q) ∈ ℝ 3 | 0 < x = q ≤ s} and d 2 = {(x, s, q) ∈ ℝ 3 | 0 < q ≤ x = s} is of zero Lebesgue measure (see, e.g. [Borodin and Salminen (2002); Chapter II, Section 1]), the indicators in the second line of the formula in (63) as well as in the expression of (64) can be ignored. Moreover, since the component Q decreases only when the process (X, S, Q) is located on the diagonal d 1 = {(x, s, q) ∈ ℝ 3 | 0 < x = q < s} , while the component S increases only when the process (X, S, Q) is located on the diagonal d 2 = {(x, s, q) ∈ ℝ 3 | 0 < q < x = s} , the indicators appearing in the third line of (63) can be set equal to one. Finally, we observe from the expressions in (49) and (50)-(51) that the function V 2 (x, s, q) does not actually depend on the variable q, and thus, the partial derivative q V 2 (x, s, q) is equal to 0 in the region x ≤ s} , we may conclude that the second integral in the third line of (63) is actually equal to zero. It follows from straightforward calculations and the arguments of the previous section that the function V 2 (x, s, q) satisfies the second-order ordinary differential equation in (27), which together with the left-hand conditions of (28)-(29) and (31) as well as the fact that the left-hand inequality in (34) holds imply that the inequality ( V 2 − rV 2 )(x, s, q) ≤ −H 2 (x, s, q) is satisfied, for all (x, s, q) ∈ E such that 0 < q < x < s and x ≠ a * (s, q) . Moreover, we observe directly from the expressions in (49) with (50)-(51) as well as (54)-(55) that the value function V 2 (x, s, q) is convex and increases from zero, because its first-order partial derivative x V 2 (x, s, q) is positive and increases from zero, while its second-order partial derivative xx V 2 (x, s, q) is positive, on the interval q ∨ a * (s, q) < x ≤ s . Thus, we may conclude that the left-hand inequality in (32) holds, which together with the left-hand conditions of (28)-(29) and (31) imply that the inequality V 2 (x, s, q) ≥ 0 is satisfied, for all (x, s, q) ∈ E . Let ( n ) n∈ℕ be the localising sequence of stopping times for the process M 2 from (64) such that n = inf{t ≥ 0 | |M 2 t | ≥ n} , for each n ∈ ℕ . It therefore follows from the expression in (63) that the inequalities: hold, for any stopping time with respect to the natural filtration of (X, S, Q) and each n ∈ ℕ fixed. Then, taking the expectation with respect to P x,s,q in (65), by means of Doob's optional sampling theorem, we get: for all (x, s, q) ∈ E and each n ∈ ℕ . Hence, letting n go to infinity and using Fatou's lemma, we obtain from the expressions in (66) that the inequalities: hold, for any stopping time and all (x, s, q) ∈ E. We now prove the fact that the boundary a * (s, q) specified above is optimal. By virtue of the fact that the function V 2 (x, s, q) from the right-hand side of the expression in (61) associated with the boundary a * (s, q) satisfies the equation of (27) and the right-hand condition of (28), and taking into account the structure of * 2 in (62), it follows from the expression in (63) that the equalities: hold, for all (x, s, q) ∈ E and each n ∈ ℕ . Observe that, by virtue of the arguments from [Shepp and Shiryaev (1993); pages 635-636], the property: holds, where the function G 2 (x, s, q) is defined in (9), for all (x, s, q) ∈ E . We also note that the variable e −r * 2 V 2 (X * 2 , S * 2 , Q * 2 ) is finite on the event { * 2 = ∞} as well as recall from the arguments of Beibel and Lerche (1997) and Pedersen (2000) that the property P x,s,q ( * 2 < ∞) = 1 holds, for all (x, s, q) ∈ E . Hence, letting n go to infinity and using the right-hand condition of (28), we can apply the Lebesgue dominated convergence theorem to the expression of (68) to obtain the equality: (66) E x,s,q � ∧ n 0 e −ru H 2 (X u , S u , Q u ) du + � ∧ n 0 e −ru dS u ≤ E x,s,q e −r( ∧ n ) V 2 (X ∧ n , S ∧ n , Q ∧ n ) E x,s,q ∫ * 2 ∧ n 0 e −ru H 2 (X u , S u , Q u ) du + ∫ * 2 ∧ n 0 e −ru dS u = E x,s,q e −r( * 2 ∧ n ) V 2 (X * 2 ∧ n , S * 2 ∧ n , Q * 2 ∧ n ) + ∫ * 2 ∧ n 0 e −ru H 2 (X u , S u , Q u ) du + ∫ * 2 ∧ n 0 e −ru dS u = V 2 (x, s, q) + E x,s,q M 2 * 2 ∧ n = V 2 (x, s, q) (69) E x,s,q sup t≥0 e −r( * 2 ∧t) G 2 (X * 2 ∧t , S * 2 ∧t , Q * 2 ∧t ) ≤ (1 + L 2 ) E x,s,q sup t≥0 S * 2 ∧t < ∞ for all (x, s, q) ∈ E , which together with the inequalities in (67) directly implies the desired assertion. We finally recall from the results of part (iii) of Subsection 2.3 above implied by standard comparison arguments applied to the value functions of the appropriate optimal stopping problems that the inequality a * (s, q) ≤ g * (s) should hold for the optimal stopping boundary, for 0 < q < h * (q) < s . Thus, taking into account the fact that a * (s, q) = g * (s) ≡ * s with 0 < * < 1 from (82), for q < s ≤ h * (q) , we may conclude that the inequality a * (s, q) ≤ g * (s) holds, for all 0 < q < s , that completes the verification. ◻

Corollary 4.2
The optimal method of exercising the perpetual real double lookback callput and put-call options on the maxima and minima with the values in (1) and (2), which are equivalent to the ones of (6) and (7), acts as follows. After the outer options with the equivalent value functions from (21) and (22) are exercised at the first exit times * i , for i = 1, 2 , from (62) with the boundaries b * (s, q) and a * (s, q) specified in Theorem 4.1 above, the inner options should be exercised at the first hitting times: with the boundaries g * (s) and h * (q) specified in Corollary 5.1 below, respectively.

Remark 4.3
Note that in the cases in which one starts from the stretch, that is, when x = s = q holds, the subsequent exercise of the outer and inner perpetual real lookback put and call options with the value functions in (21) and (22) may actually follow the subsequent exercise of the standard perpetual real lookback put and call options with the value functions in (72). More precisely, when the process X starts at some x = s = q , by virtue of the facts that the inequalities 0 < * < 1 and * > 1 hold for the unique solutions of the arithmetic equations in (82) and (84) below, the outer options should be exercised when the process X reaches an upper boundary b * (S, Q)[≥ h * (Q)] or a lower boundary a * (S, Q)[≤ g * (S)] , respectively. However, in the cases in which the process X starts at some x < g * (s) < s or x > h * (q) > q , the outer perpetual real lookback call-put and putcall options on the maxima and minima should be exercised only at the times at which the underlying asset price process reaches the upper boundary [h * (Q) <]b * (S, Q)[< g * (S)] or the lower boundary [h * (Q) <]a * (S, Q)[< g * (S)] , respectively, and then, the appropriate inner options should be exercised at the same time.

Appendix
In this section, we derive explicit solutions to the optimal stopping problems of (72) below which are related to the perpetual American lookback options on the maximum and minimum. Although, by means of the change-of-measure arguments from Shepp and Shiryaev (1994) and Gapeev (2019), the problems of (72) can be reduced to the appropriate optimal stopping problems for one-dimensional Markov processes S∕X = (S t ∕X t ) t≥0 and Q∕X = (Q t ∕X t ) t≥0 , we follow the arguments of Sects. 2-4 to solve them as two-dimensional optimal stopping problems, in order to spare some space of the paper. Note that the left-hand (70) E x,s,q ∫