# Optimal Selling Rule in a Regime Switching Lévy Market

Authors: Moustapha Pemy
Journal: International Journal of Mathematics and Mathematical Sciences
 (2011)

---

## Abstract

This paper is concerned with a finite-horizon optimal selling rule problem when the underlying stock price
movements are modeled by a Markov switching Lévy process. Assuming that the transaction fee of the selling
operation is a function of the underlying stock price, the optimal selling rule can be obtained by solving an
optimal stopping problem. The corresponding value function is shown to be the unique viscosity solution to
the associated HJB variational inequalities. A numerical example is presented to illustrate the results.


---

## Body

## 1. Introduction

One of the major decision investors have to make on a daily basis is to identify the best time to sell or buy a particular stock. Usually if the right decision is not taken at the right time, this will generally result in large losses for the investor. Such decisions are mainly affected by various macro- and micro-economical parameters. One of the main factors that affect decision making in the marketplace is the trend of the stock market. In this paper, we study trading decision making when we assume that market trends are subject to change and that these fluctuations can be captured by a combination of a latent Markov chain and a jump process. In fact, we model the stock price dynamics with a regime switching Lévy process. Regime switching Lévy processes are obtained by combining a finite number of geometric Lévy processes modulated by a finite-state Markov chain. This type of processes clearly capture the main features of a wide variety of stock such as energy stock and commodities which usually display a lot of spikes and seasonality. Selling rule problems in general have been intensively studied in the literature, and most of the work have been done when the stock price follows a geometric Brownian motion or a simple Markov switching process. Among many others, we can cite the work of Zhang [1]; in this paper, a selling rule is determined by two threshold levels, and a target price and a stop-loss limit are considered. One makes a selling decision whenever the price reaches either the target price or the stop-loss limit. The objective is to choose these threshold levels to maximize an expected return function. In [1], such optimal threshold levels are obtained by solving a set of two-point boundary value problems. Recently Pemy and Zhang [2] studied a similar problem in the case where there is no jump process associated and the underlying dynamics is just a traditional Markov switching process built by coupling a set of geometric Brownian motions.In this paper, we extend the result of Pemy and Zhang [2], we consider an optimal selling rule among the class of almost all stopping times under a regime switching Lévy model. We study the case when the stock has to be sold within a prespecified time limit. Given a transaction cost which is a function of the underlying stock price, the objective is to choose a stopping time so as to maximize an expected return. The optimal stopping problem was studied by McKean [3] back to the 1960s when there is no switching; see also Samuelson [4] in connection with derivative pricing and Øksendal [5] for optimal stopping in general. In models with regime switching, Guo and Zhang [6] considered the model with a two-state Markov chain. Using a smooth-fit technique, they were able to convert the optimal stopping problem to a set of algebraic equations under certain smoothness conditions. Closed-form solutions were obtained in these cases. However, it can be shown with extensive numerical tests that the associated algebraic equations may have no solutions. This suggests that the smoothness (C2) assumption may not hold in these cases. Moreover, the results in [5, 6] are established on an infinite time horizon setup. However, in practice, an investor often has to sell his stock holdings by a certain date due to various nonprice-related considerations such as year-end tax deduction or the need for raising cash for major purchases. In these cases, it is necessary to consider the corresponding optimal selling with a finite horizon. It is the purpose of this paper to treat the underlying finite horizon optimization problem with possible nonsmoothness of the solutions to the associated HJB variational inequalities. We resort to the concept of viscosity solutions and show that the corresponding value function is indeed the only viscosity solution to the HJB variational inequalities. We clearly prove that the value function of this optimal stopping time problem is the unique viscosity solution to the associated HJB variational inequalities, which enables us to run some numerical schemes in order to approximate the value function and derive the both the continuation region and the stopping region. It is well known that the optimal stopping rule can be determined by the corresponding value function; see, for example, Krylov [7] and Øksendal [5] for diffusions, Pham [8] for jump diffusions, and Guo and Zhang [6] and [9] for regime switching diffusions.The paper is organized as follows. In the next section, we formulate the problem under consideration and then present the associated HJB inequalities and their viscosity solutions. In Section3, we obtain the continuity property of the value function and show that it is the only viscosity solution to the HJB equations. In Section 4, we give a numerical example in order to illustrate our results. To better present the results without undue technical difficulties, all proofs are moved to the appendix placed at the end of the paper.


## 2. Problem Formulation

Given an integerm≥2, let α(t)∈ℳ={1,2,…,m} denote a Markov chain with an m×m matrix generator Q=(qij)m,m, that is, qij≥0 for i≠j and Σj=1mqij=0 for i∈ℳ and a Lévy process (ηt)t. Let N be the Poisson random measure of (ηt)t, then it is defined as follows: for any Borel set U⊂ℝ,   (2.1)N(t,U)=∑0<s≤t1U(ηs-ηs-).
The differential form of N is denoted by N(dt,dz). Let ν be the Lévy measure of (ηt)t; we have ν(U)=E[N(1,U)] for any Borel set U⊂ℝ. We define the differential form N¯(dt,dz) as follows:   (2.2)N¯(dt,dz)={N(dt,dz)-ν(dz)dt,if|z|<1,N(dt,dz),if|z|≥1.
From Lévy-Khintchine formula, we have  (2.3)∫Rmin⁡(|z|2,1)ν(dz)<∞.
In our regime switching Lévy market model, the stock price denoted by X(t) satisfies the following Lévy stochastic differential equation
(2.4)dX(t)=X(t)(μ(α(t))dt+σ(α(t))dW(t)+∫Rγ(α(t))zN¯(dt,dz)),X(s)=x,s≤t≤T,
where x is the initial price and T is a finite time. For each state i∈ℳ, μ(i) the rate of return, σ(i) the volatility and γ(i) the jump intensity are known and satisfied the linear growth condition. There exists a constant C>0 such that for all x∈ℝ and all t∈[0,T], we have
(2.5)x2(μ(α(t))2+σ(α(t))2+∫R|γ(α(t))|2z2ν(dz))≤C(1+x2).W(t) is the standard Weiner process, and Ñ(dt,dz) represents the differential form of the jump measure of ηt. The processes W(·), α(·), and η(·) are defined on a probability space (Ω,ℱ,P) and are independent of each other.In this paper, we consider the optimal selling rule with a finite horizonT. We assume that the transaction cost function a(·)>0 is the function of the stock price itself. In this case, we take into account all costs associated with the selling operation. The main objective of this selling problem is to sell the stock by time T so as to maximize the quantity E[e-r(τ-s)(X(τ)-a(X(τ)))], where r>0 is a discount rate.Letℱt=σ{α(s),W(s),η(s);s≤t} and let Λs,T denote the set of ℱt-stopping times such that s≤τ≤T a.s. The value function can be written as follows:  (2.6)v(s,x,i)=sup⁡τ∈Λs,TE[e-r(τ-s)(X(τ)-a(X(τ)))∣X(s)=x,α(s)=i].Given the value functionv(s,x,i), it is typical that an optimal stopping time τ* can be determined by the following continuation region:(2.7)D={(t,x,i)∈[0,T)×R×M;v(t,x,i)>x-a(x)},
as follows:(2.8)τ*=inf⁡{t>0;(t,X(t),α(t))∉D}.
It can be proved that if τ*<+∞, then  (2.9)v(s,x,i)=Es,x,i[e-r(τ*-s)(X(τ*)-a(x))].
Thus, τ* is the optimal stopping time; see [9].The process(X(t),α(t)) is a Markov process with generator 𝒜 defined as follows:(2.10)(Af)(s,x,i)=12x2σ2(i)∂2f(s,x,i)∂x2+xμ(i)∂f(s,x,i)∂x+Qf(s,x,⋅)(i)+∫R(f(s,x+γ(i)xz)-f(s,x)-γ(i)xz1{|z|<1}(z)∂f∂x)ν(dz),
where   (2.11)Qf(s,x,⋅)(i)=∑j≠iqij(f(s,x,j)-f(s,x,i)).
The corresponding Hamiltonian has the following form:  (2.12)H(i,s,x,u,Dsu,Dxu,Dx2u)=min⁡⁡[ru(s,x,i)-∂u(s,x,i)∂s-(Au)(s,x,i),u(s,x,i)-(x-a(x))]=0.
Note that X(t)>0 for all t. Let ℝ+=(0,∞). Formally, the value function v(s,x,i) satisfies the HJB equation  (2.13)H(i,s,x,v,Dsv,Dxv,Dx2v)=0,for(s,x,i)∈[0,T)×R+×M,v(T,x,α(T))=(x-a(x)).
In order to study the possibility of existence and uniqueness of a solution of (2.12), we use a notion of viscosity solution introduced by Crandall et al. [10].Definition 2.1.
We say thatf(s,x,i) is a viscosity solution of
(2.14)H(i,s,x,f,∂f∂s,∂f∂x,∂2f∂x2)=0,fori∈M,s∈[0,T),x∈R+,f(T,x,α(T))=(x-a(x)).
If(1)
for allx∈ℝ+f(T,x,α(T))=(x-a(x)), and for each i∈ℳ, f(s,x,i) is continuous in (s,x), moreover, there exist constants K and κ such that(2.15)f(s,x,i)≤K(1+|x|κ),(2)
for eachi∈ℳ,
(2.16)H(i,s0,x0,f,∂ϕ∂s,∂ϕ∂x,∂2ϕ∂x2)≤0
whenever ϕ(s,x)∈C2 such that f(s,x,i)-ϕ(s,x) has local maximum at (s,x)=(s0,x0),(3)
and for eachi∈ℳ,
(2.17)H(i,s0,x0,f,∂ψ∂s,∂ψ∂x,∂2ψ∂x2)≥0
whenever ψ(s,x)∈C2 such that f(s,x,i)-ψ(s,x) has local minimum at (s,x)=(s0,x0).
Letf be a function that satisfies (2.3). It is a viscosity subsolution (resp. supersolution) if it satisfies (2.4) (resp. (2.5)).


## 3. Properties of Value Functions

In this section, we study the continuity of the value function, show that it satisfies the associated HJB equation as a viscosity solution, and establish the uniqueness. We first show the continuity property.Lemma 3.1.
For eachi∈ℳ, the value function v(s,x,i) is continuous in (s,x). Moreover, it has at most linear growth rate, that is, there exists a constant C such that |v(s,x,i)|≤C(1+|x|).The continuity of the value function and its at most linear growth will be very helpful in deriving the maximum principle which itself guarantees the uniqueness of the value function. The following lemma is a simple version of the dynamic programming principle in optimal stopping. A similar result has been proven in Pemy [9]. For general dynamic programming principle, see Krylov [7] for diffusions, Pham [8] for jump diffusions, and Yin and Zhang [11] for dynamic models with regime switching.Definition 3.2.
For eachε>0, a stopping time τε∈Λs,T is said to be ɛ-optimal if
(3.1)0≤v(s,x,i)-E[e-r(τɛ-s)v(τε,X(τε),α(τε))]≤ε.Lemma 3.3.
(1) Let β,γ∈Λs,T two stopping time such that s≤β≤γ a.s., then one has
(3.2)E[e-r(β-s)v(β,X(β),α(β))]≥E[e-r(γ-s)v(γ,X(γ),α(γ))].
In particular for any stopping timeθ∈Λs,T, one has
(3.3)v(s,x,i)≥Es,x,i[e-r(θ-s)v(θ,X(θ),α(θ))].
(2)
Letθ∈Λs,T such that s≤θ≤τϵ for any ɛ>0, where τϵ an ε-optimal stopping time. Then, one has(3.4)v(s,x,i)=Es,x,i[e-r(θ-s)v(θ,X(θ),α(θ))].
With  Lemma3.3 at our hand, we proceed and show that the value function v(s,x,i) is a viscosity solution of the variational inequality (2.13).Theorem 3.4.
The value functionv(s,x,i) is a viscosity solution of (2.13).


### 3.1. Uniqueness of the Viscosity Solution

In this subsection, we will prove that the value function defined in (2.6) is the unique viscosity solution of the HJB equation (2.13). We begin by recalling the definition of parabolic superjet and subjet.Definition 3.5.
Letf(s,x,i):[0,T]×ℝ×ℳ→ℝ. Define the parabolic superjet by
(3.5)P2,+f(s,x,i)={12(p,q,M)∈R×R:f(t,y,i)≤f(s,x,i)+p(t-s)+q(y-x)+12(y-x)2M+o(|y-x|2)as(t,y)⟶(s,x)},
and its closure is
(3.6)P¯2,+f(s,x,i)={(p,q,M)=lim⁡n→∞(pn,qn,Mn)with(pn,qn,Mn)∈P2,+f(sn,xn,i)andlim⁡n→∞(sn,xn,f(sn,xn,i))=(x,f(s,x,i))}.
Similarly, we define the parabolic subjet 𝒫2,-f(s,x,i)=-𝒫2,+(-f)(s,x,i) and its closure 𝒫¯2,-f(s,x,i)=-𝒫¯2,+(-f)(s,x,i)We have the following result.Lemma 3.6.
𝒫2,+f(s,x,i) (resp. 𝒫2,-f(s,x,i)) consist of the set of (∂ϕ(s,x)/∂s,∂ϕ(s,x)/∂x,∂2ϕ(s,x)/∂x2) where ϕ∈𝒞2([0,T]×ℝ) and f-ϕ has a global maximum (resp. minimum) at (s,x).A proof can be found in Fleming and Soner [12].The following result from Crandall et al.  [10] is crucial for the proof of the uniqueness.Theorem 3.7 (Crandall et al. [10]).
Fori=1,2, let Ωi be locally compact subsets of ℝ, and Ω=Ω1×Ω2, and let ui be upper semicontinuous in [0,T]×Ωi, and 𝒫¯Ωi2,+ui(t,x) the parabolic superjet of ui(t,x), and ϕ twice continuously differentiable in a neighborhood of [0,T]×Ω.
Set(3.7)w(t,x1,x2)=u1(t,x1)+u2(t,x2)
for (t,x1,x2)∈[0,T]×Ω, and suppose (t̂,x̂1,x̂2)∈[0,T]×Ω is a local maximum of w-ϕ relative to [0,T]×Ω. Moreover, let us assume that there is an r>0 such that for every M>0 there exists a C such that for i=1,2(3.8)bi≤Cwhenever(bi,qi,Xi)∈PΩi2,+ui(t,xi),|xi-x̂i|+|t-t̂|≤r,|ui(t,xi)|+|qi|+‖Xi‖≤M.
Then, for each ϵ>0, there exists Xi∈𝒮(1)=ℝ such that
(1)
(3.9)(bi,Dxiϕ(t̂,x̂),Xi)∈P¯Ωi2,+ui(t̂,x̂i)fori=1,2,(2)
(3.10)-(1ϵ+‖D2ϕ(x̂)‖)I≤(X100X2)≤D2ϕ(x̂)+ϵ(D2ϕ(x̂))2,(3)
(3.11)b1+b2=∂ϕ(t̂,x̂,ŷ)∂t.We have the following maximum principle.Theorem 3.8 (Comparison Principle).
Ifv1(t,x,i) and v2(t,x,i) are continuous in (t,x) and are, respectively, viscosity subsolution and supersolution of (2.13) with at most a linear growth. Then,
(3.12)v1(t,x,i)≤v2(t,x,i)∀(t,x,i)∈[0,T]×R+×M.The following lemma is be very useful in derivation of the maximum principle.Lemma 3.9.
LetCLip([0,T]×ℝ×ℳ) be the set of functions v(s,x,i) on [0,T]×ℝ×ℳ which are continuous with respect to s and Lipschitz continuous with respect to the variable x. For fixed tδ∈[0,T] and α0∈ℳ, let the operator ℱ on ℝ×CLip([0,T]×ℝ×ℳ)×ℝ×ℝ be defined as follows:
(3.13)F(x,v,β,X)=-12x2σ2(α0)X-xμ(α0)β-Qv(tδ,x,⋅)(α0)-∫R(v(tδ,x+γ(α0)xz,α0)-v(tδ,x,α0)-γ(α0)xz1{|z|<1}(z)β)ν(dz).
Then, there exits a constant C>0 such that
(3.14)F(y,w,a(x-y)-by,Y)-F(x,v,a(x-y)+bx,X)≤C(x2X-y2Y)+Ca|x-y|2+Cb(1+|x2|)+Qv(tδ,x,⋅)(α0)-Qw(tδ,y,⋅)(α0)+∫Rn(12v(tδ,x+γ(α0)zx,α0)-w(tδ,y+γ(α0)zy,α0)-v(tδ,x,α0)+w(tδ,y,α0)12)ν(dz),
for any v,w∈CLip([0,T]×ℝ×ℳ) and x,y,a,b,X,Y∈ℝ.Remark 3.10.
Theorem3.8 obviously implies the uniqueness of the viscosity solution of the variational inequality (2.13). If we assume that (2.13) has two solutions v1 and v2 with linear growth, then they are both viscosity subsolution and supersolution of (2.13). Therefore, using the fact that v1 is subsolution and v2 is supersolution,  Theorem 3.8 implies that v1(t,x,i)≤v2(t,x,i) for all (t,x,i)∈[0,T]×ℝ+×ℳ. And conversely, we also have v2(t,x,i)≤v1(t,x,i) for all (t,x,i)∈[0,T]×ℝ+×ℳ, since v2 is subsolution and v1 is supersolution. Consequently, we have v1(t,x,i)=v2(t,x,i) for all (t,x,i)∈[0,T]×ℝ+×ℳ, which confirms the fact the value function defined on (2.6) is the unique solution of the variational inequality (2.13).


## 3.1. Uniqueness of the Viscosity Solution

In this subsection, we will prove that the value function defined in (2.6) is the unique viscosity solution of the HJB equation (2.13). We begin by recalling the definition of parabolic superjet and subjet.Definition 3.5.
Letf(s,x,i):[0,T]×ℝ×ℳ→ℝ. Define the parabolic superjet by
(3.5)P2,+f(s,x,i)={12(p,q,M)∈R×R:f(t,y,i)≤f(s,x,i)+p(t-s)+q(y-x)+12(y-x)2M+o(|y-x|2)as(t,y)⟶(s,x)},
and its closure is
(3.6)P¯2,+f(s,x,i)={(p,q,M)=lim⁡n→∞(pn,qn,Mn)with(pn,qn,Mn)∈P2,+f(sn,xn,i)andlim⁡n→∞(sn,xn,f(sn,xn,i))=(x,f(s,x,i))}.
Similarly, we define the parabolic subjet 𝒫2,-f(s,x,i)=-𝒫2,+(-f)(s,x,i) and its closure 𝒫¯2,-f(s,x,i)=-𝒫¯2,+(-f)(s,x,i)We have the following result.Lemma 3.6.
𝒫2,+f(s,x,i) (resp. 𝒫2,-f(s,x,i)) consist of the set of (∂ϕ(s,x)/∂s,∂ϕ(s,x)/∂x,∂2ϕ(s,x)/∂x2) where ϕ∈𝒞2([0,T]×ℝ) and f-ϕ has a global maximum (resp. minimum) at (s,x).A proof can be found in Fleming and Soner [12].The following result from Crandall et al.  [10] is crucial for the proof of the uniqueness.Theorem 3.7 (Crandall et al. [10]).
Fori=1,2, let Ωi be locally compact subsets of ℝ, and Ω=Ω1×Ω2, and let ui be upper semicontinuous in [0,T]×Ωi, and 𝒫¯Ωi2,+ui(t,x) the parabolic superjet of ui(t,x), and ϕ twice continuously differentiable in a neighborhood of [0,T]×Ω.
Set(3.7)w(t,x1,x2)=u1(t,x1)+u2(t,x2)
for (t,x1,x2)∈[0,T]×Ω, and suppose (t̂,x̂1,x̂2)∈[0,T]×Ω is a local maximum of w-ϕ relative to [0,T]×Ω. Moreover, let us assume that there is an r>0 such that for every M>0 there exists a C such that for i=1,2(3.8)bi≤Cwhenever(bi,qi,Xi)∈PΩi2,+ui(t,xi),|xi-x̂i|+|t-t̂|≤r,|ui(t,xi)|+|qi|+‖Xi‖≤M.
Then, for each ϵ>0, there exists Xi∈𝒮(1)=ℝ such that
(1)
(3.9)(bi,Dxiϕ(t̂,x̂),Xi)∈P¯Ωi2,+ui(t̂,x̂i)fori=1,2,(2)
(3.10)-(1ϵ+‖D2ϕ(x̂)‖)I≤(X100X2)≤D2ϕ(x̂)+ϵ(D2ϕ(x̂))2,(3)
(3.11)b1+b2=∂ϕ(t̂,x̂,ŷ)∂t.We have the following maximum principle.Theorem 3.8 (Comparison Principle).
Ifv1(t,x,i) and v2(t,x,i) are continuous in (t,x) and are, respectively, viscosity subsolution and supersolution of (2.13) with at most a linear growth. Then,
(3.12)v1(t,x,i)≤v2(t,x,i)∀(t,x,i)∈[0,T]×R+×M.The following lemma is be very useful in derivation of the maximum principle.Lemma 3.9.
LetCLip([0,T]×ℝ×ℳ) be the set of functions v(s,x,i) on [0,T]×ℝ×ℳ which are continuous with respect to s and Lipschitz continuous with respect to the variable x. For fixed tδ∈[0,T] and α0∈ℳ, let the operator ℱ on ℝ×CLip([0,T]×ℝ×ℳ)×ℝ×ℝ be defined as follows:
(3.13)F(x,v,β,X)=-12x2σ2(α0)X-xμ(α0)β-Qv(tδ,x,⋅)(α0)-∫R(v(tδ,x+γ(α0)xz,α0)-v(tδ,x,α0)-γ(α0)xz1{|z|<1}(z)β)ν(dz).
Then, there exits a constant C>0 such that
(3.14)F(y,w,a(x-y)-by,Y)-F(x,v,a(x-y)+bx,X)≤C(x2X-y2Y)+Ca|x-y|2+Cb(1+|x2|)+Qv(tδ,x,⋅)(α0)-Qw(tδ,y,⋅)(α0)+∫Rn(12v(tδ,x+γ(α0)zx,α0)-w(tδ,y+γ(α0)zy,α0)-v(tδ,x,α0)+w(tδ,y,α0)12)ν(dz),
for any v,w∈CLip([0,T]×ℝ×ℳ) and x,y,a,b,X,Y∈ℝ.Remark 3.10.
Theorem3.8 obviously implies the uniqueness of the viscosity solution of the variational inequality (2.13). If we assume that (2.13) has two solutions v1 and v2 with linear growth, then they are both viscosity subsolution and supersolution of (2.13). Therefore, using the fact that v1 is subsolution and v2 is supersolution,  Theorem 3.8 implies that v1(t,x,i)≤v2(t,x,i) for all (t,x,i)∈[0,T]×ℝ+×ℳ. And conversely, we also have v2(t,x,i)≤v1(t,x,i) for all (t,x,i)∈[0,T]×ℝ+×ℳ, since v2 is subsolution and v1 is supersolution. Consequently, we have v1(t,x,i)=v2(t,x,i) for all (t,x,i)∈[0,T]×ℝ+×ℳ, which confirms the fact the value function defined on (2.6) is the unique solution of the variational inequality (2.13).


## 4. Numerical Example

This example is for a stock which share price roughly around $55 in average; in this example we assume that the market has two main movements: an uptrend and a downtrend. Thus the Markov chainα takes two states ℳ={1,2}, where α(t)=1 denotes the uptrend and α(t)=2 denotes the downtrend. The transaction fee a=0.5, the discount rate r=0.05, the return vector is μ=(0.01,-0.01), the volatility vector is σ=(0.4,0.2), the intensity vector is λ=(0.25,0.5), the time T=0.35 (in year), and the generator of the Markov chain is(4.1)Q=(-0.0230.0231.023-1.023).Figures1 and 2 represent the value function v(t,x,i) computed by solving the nonlinear system of equations (2.13) and the free boundary curves in both trends. These curves divide the plane in two regions. The region below the free boundary curve is the continuation region, and the region above the free boundary curve is the stopping region. In other terms, whenever the share price at any given time within the interval [0,T] is below the free boundary curve, it is optimal for the investor to hold the stock. And whenever the share price is above the free boundary, it is optimal for the investor to sell. This selling rule is obviously easy to implement. This example clearly shows that the selling rule derived by our method can be very attractive to practitioners in an automated trading setting.Value functionsv(t,x,1) for the uptrend and v(t,x,2) for the downtrend.
(a)(b)Free boundary curves.
(a)(b)



---

*Source: 264603-2011-08-01.xml*