text:
\section{Introduction}
The object of this paper is to study the problem of maximizing expected utility from consumption and terminal wealth in an incomplete pure-jump asset price model with jump-size distributions modulated by an underlying continuous-time finite-state Markov chain, and totally inaccessible jump times that coincide with the transition times of the Markov chain. This financial market model is an extension of the jump-telegraph model proposed by L\'opez and Ratanov \cite{lopezrat} to the case in which the underlying Markov chain has more than two states. This generalization is mainly motivated by the empirical results of Konikov and Madan \cite{konmadan} that suggest that more than two regimes should be considered.

Markov-modulated regime-switching models have attracted considerable attention in financial modelling in the past 15 years as they allow for time-inhomogeneity in the asset dynamics that capture important features of financial time series such as asymmetric and heavy-tailed asset returns, time-varying conditional volatility and volatility clustering, as well as structural changes in economics conditions.

Our approach to the portfolio-consumption problem is largely based on the martingale approach and convex duality techniques for utility maximization in incomplete markets initiated by He and Pearson \cite{hepearson}, Karatzas et al. \cite{karatzas91}, Cvitani\'{c} and Karatzas \cite{cvikar}, and extended by Kramkov and Schachermayer \cite{kramsch} to the general semi-martingale setting. In the particular case of market models driven by jump-diffusion, Goll and Kallsen \cite{goll2000}, Kallsen \cite{kallsen2000} and more recently Michelbrink and Le \cite{michelbrink}, use the martingale approach to obtain explicit solutions for agents with logarithmic and power utility functions. Callegaro and Vargiolu \cite{callevar} obtain similar results in jump-diffusion models with Poisson-type jumps.

To the best of our knowledge, this is the first paper that uses the martingale approach to study the problem of maximizing utility from consumption and terminal wealth in a pure-jump model with Markov-modulated jumps. Only the optimal investment problem for jump-diffusion models studied  by B\"{a}uerle and Riedler \cite{bauerle2007} seems comparable to the formulation of the problem in the present paper. They use, however, the standard dynamic programming approach and are only able to derive some bounds on the optimal policy. Moreover, they assume that the jump-sizes do not depend on the underlying Markov chain.

The main result of this paper is a sufficient condition for existence of an optimal portfolio-consumption pair. This condition is given in terms of the solution pair of a linear backward SDE with respect to the compensated (random) counting measure associated with the marked point process consisting of the jump times and the corresponding (Markov-modulated) jumps. The coefficients of the backward SDE are related to the state-price densities via the convex conjugate of the utility functions. Although the optimality condition in the main result seems rather restrictive, in the last section we show that it simplifies significantly in the case of logarithmic utility functions.

The key assumption throughout is that the compensator of the counting measure has an (intensity) kernel that is also Markov-modulated, similar to the model proposed recently by Elliott and Siu \cite{elliottsiu}. In fact, using results on jump-telegraph processes with Markov-modulated jumps, we prove that if the underlying Markov chain takes only two values, our market model actually satisfies the main assumption, hence generalizing the model of Elliott and Siu \cite{elliottsiu}.

The outline of the paper is as follows. In Section 2 we describe the stochastic setting and information structure for the market model, introduce the wealth equation and define the optimal investment problem. In Section 3, following arguments similar to Michelbrink and Le \cite{michelbrink}, we formulate and prove the main result of this paper.  In section 4 we present some basic properties of the telegraph process with Markov-modulated jumps and prove that our market model satisfies the main assumption in the case of two regimes. Finally, Section 5 illustrates the main result by considering the special case of agents with logarithmic and fractional power (CRRA) utility. We also present some numerical results for the case of logarithmic utility and, using results from Section 4, we find a closed-form solution for the optimal value function in the case of two regimes.

\section{Market model, wealth equation and portfolio-consumption problem}
In this section we describe the stochastic setting and information structure for the market model  and introduce the wealth process and utility maximization problem from consumption and terminal wealth.

We fix an finite investment horizon $T>0.$ Let $\eps(\cdot)=\{\eps(t)\}_{t\in[0,T]}$ be a continuous-time Markov chain with finite state-space $\mathcal{I}=\{0,1,\ldots,m-1\}.$ Let $\set{\tau_n}_{n\geq 1}$ denote the jump times of the Markov chain $\eps(\cdot),$ and let $\eps_n:=\eps(\tau_n-)$ denote the state of $\eps(\cdot)$ right before the $n$-th jump.

Let $E$ be an Euclidean space with Borel $\sigma$-algebra $\B(E).$ For each $i\in\mathcal{I}$, let $\{Y_{i,n}\}_{n\geq 1}$ denote a sequence of $E$-valued independent random variables with distributions
\[
\Prob(Y_{i,n}\in dy)={F}_i(dy), \ \ n\geq 1.
\]
For each $i\in\mathcal{I},$ the event $\eps(t)=i$ represents that the economy or business cycle is in the $i$-th state at time $t.$ Let $(r_i)_{i\in\calI}$ with $r_i>0$ and $(\mu_i)_{i\in\calI}$ denote the vectors of instantaneous interest rates and stock appreciation rates in each state or regime. The financial market consists of a default-free money-market account with Markov-modulated continuously compounded return rate $\{r_{\eps(t)}\}_{t\in[0,T]},$ that is, its price process $B=\{B_t\}_{t\in[0,T]}$ satisfies
\[
B_t=\exp\left(\int_0^tr_{\eps(s)}ds\right), \ \ t\in[0,T],
\]
and a risky asset or stock with price process $S=\{S_t\}_{t\in[0,T]}$ solution of the equation
\begin{equation}\label{eqS0}
dS_t=S_{t-}\,dX_t
\end{equation}
where $X=\{X_t\}_{t\in[0,T]}$ is the pure-jump process with Markov-modulated jumps
\[
X_t=\int_0^t\mu_{\eps(s)}\,ds+\sum_{\tau_n\le t}f_{\eps_n}(Y_{\eps_n,n}), \ \ t\in[0,T].
\]
For each $i\in\calI,$ $f_i:E\rightarrow (-1,\infty)\setminus\set{0}$ is a measurable map, integrable with respect to the distribution $F_i(dy).$ Throughout, we assume that the distributions $F_i$ are pairwise independent, as well independent of the Markov chain $\eps(\cdot).$

Let $\gamma:\Omega\times \B(E)\otimes\B([0,T])\to\set{1,2,\ldots}$ be the random counting measure associated with the  sequence $\set{(\tau_n,Y_{\eps_n,n})}_{n\geq 1}$ defined as
\[
\gamma(A\times(0,t]):=\sum_{n=1}^\infty\mathbf{1}_{\set{\tau_n\le t,Y_{\eps_n,n}\in A}}=\sum_{\tau_n\le t}\mathbf{1}_{\set{Y_{\eps_n,n}\in A}}, \ \ A\in\mathcal{B}(E), \ \ t\in [0,T]
\]
The random measure $\gamma$ is known as marked point process or multivariate point process with mark space $E,$ see e.g. Jacod and Shiryaev \cite[Chapter III, Definition 1.23]{js} or Jeanblanc et al \cite[Section 8.8]{jeanblanc}.

For each $A\in\B(E),$ the counting process $N_t(A):=\gamma(A\times(0,t])$ counts the number of marks with values in $A$ up to time $t.$ The underlying filtration $\Fil=\set{\calF_t}_{t\in  [0,T]}$ is defined as the filtration generated by these counting processes, augmented with the $\sigma$-algebra $\calF_0$ of $\Prob$-null events,
\[
\calF_t:=\calF_0\vee\sigma(N_s(A):0\le s\le t, \ A\in\B(E)), \ \ t\in  [0,T].
\]
The predictable $\sigma$-algebra $\calP$ on $\Omega\times  [0,T]$ is defined as the $\sigma$-algebra generated by adapted left-continuous processes. A real-valued process $\set{\phi_t}_{t\in  [0,T]}$ is said to be $\mathds{F}$-predictable if the random function $\phi(t,\omega)=\phi_t(\omega)$ is measurable with respect to $\calP$.

Similarly, a map $\phi:\Omega\times  [0,T]\times E\to\R$ is said to be $\Fil$-predictable if it is measurable with respect to the product $\sigma$-algebra $\calP\otimes\B(E).$ For $\phi$ $\Fil$-predictable, we may define the stochastic integral of $\phi$ with respect to the random measure $\gamma(dy,dt)$ as follows
\begin{equation*}
\int_{(0,t]}\int_{E} \phi(s,y)\gamma(dy,ds)
:=\sum_{\tau_n\leq t}\phi(\tau_n,Y_{\eps_n,n})=\sum_{n=1}^{N_t(E)}\phi(\tau_n,Y_{\eps_n,n}), \ \ t\in [0,T].
\end{equation*}
Using this definition, we can rewrite equation (\ref{eqS0})  as
\begin{equation}\label{eqS}
dS_t={S_{t-}}\left[\mu_{\eps(t)}\,dt+\int_{E} f_{\eps(t-)}(y)\,\gamma(dy,dt)\right].
\end{equation}
The solution of this linear equation is given by the process
\begin{align*}
S_t&=S_0\mathcal{E}_t\left(\int_0^\cdot\mu_{\eps(s)}\,ds+\int_0^\cdot\int_E f_{\eps(s-)}(y)\,\gamma(dy,ds) \right)\\
&=S_0\exp\left(\int_0^t\mu_{\eps(s)}\,ds\right)\prod_{n=1}^{N_t(E)}(1+f_{\eps_n}(Y_{\eps_n,n})), \ \ t\in [0,T].
  \end{align*}
Here, $\mathcal{E}_t(\cdot)$ denotes the stochastic (Dol\'{e}ans-Dade) exponential, see e.g. Jeanblanc et al \cite[Section 9.4.3]{jeanblanc}. Moreover, since $f_i(y)>-1,$ the price process $S$ satisfies
\begin{align*}
S_t&=S_0\exp\biggl(\int_0^t\mu_{\eps(s)}\,ds+\sum_{n=1}^{N_t(E)}\ln(1+f_{\eps_n}(Y_{\eps_n,n}))\biggr)\\
&=S_0\exp\left(\int_0^t\mu_{\eps(s)}\,ds+\int_0^t\int_{E}\ln(1+f_{\eps(s-)}(y))\,\gamma(dy,ds)\right), \ \ t\in [0,T].
\end{align*}
 The log-returns of the stock process $S_t$ are then given by the pure-jump process with Markov-modulated random jumps
\[
\ln\Bigl(\frac{S_t}{S_0}\Bigr)=\int_0^t\mu_{\eps(s)}\,ds+\sum_{n=1}^{N_t(E)}\ln(1+f_{\eps_n}(Y_{\eps_n,n})), \ \ t\in [0,T].
\]
For an agent willing to invest in the financial market described above, let $\pi_t$ denote the fraction of wealth invested in the risky asset $S_t$ at time $t,$ so that the fraction of wealth invested in the money account $B_t$ is $1-\pi_t.$ Recall that a positive value for $\pi_t$ represents a long position in the risky asset, whereas a negative $\pi_t$ stands for a short position.

During the time interval $[0,T],$ the investor is allowed to consume at an instantaneous consumption rate $c_t.$ In the following, we consider only portfolio-consumption pairs $(\pi,c)=\set{(\pi_t,c_t)}_{t\in [0,T]}$ that are $\Fil$-predictable, satisfy the integrability condition
\[
\int_0^T(\pi_t^2+c_t)\,dt<+\infty, \ \ \mbox{a.s.},
\]
as well as the so-called \emph{self-financing condition}, that is, for an initial wealth $x>0$ and a portfolio-consumption pair $(\pi,c),$ the wealth $V_t$ at time $t$ of the investor satisfies the stochastic differential equation
\begin{equation}\label{eqV}
\begin{split}
dV_t&=(V_{t-}r_{\eps(t)}-c_t)\,dt+\pi_tV_{t-}\left\{(\mu_{\eps(t)}-r_{\eps(t)})\,dt+\int_{E} f_{\eps(t-)}(y)\,\gamma(dy,dt)\right\},\\
V_0&=x.
\end{split}
\end{equation}
We denote with $V^{x,\pi,c}=\{V_t^{x,\pi,c}\}_{t\in [0,T]}$  the solution to equation (\ref{eqV}). In particular, if there is no consumption i.e. $c_t =0$ for all $t\in[0,T],$ equation (\ref{eqV}) is linear and its solution is given explicitly by
\begin{align}
V_t^{x,\pi,0}&=x\mathcal{E}_t\left(\int_0^\cdot \left[r_{\eps(s)}+\pi_s\left(\mu_{\eps(s)}-r_{\eps(s)}\right)\right]\,ds+\int_0^\cdot\int_E\pi_s f_{\eps(s-)}(y)\,\gamma(dy,ds)\right)\notag\\
&=x\exp\left(\int_0^t\left[\pi_s\mu_{\eps(s)}
+(1-\pi_s)r_{\eps(s)}\right]\,ds\right)\prod_{n=1}^{N_t(E)}(1+\pi_{\tau_n}f_{\eps_n}(Y_{\eps_n,n})).\label{Vpi0}
\end{align}
Notice that this is always positive if, for instance, short-selling is not allowed for any of the assets i.e. if $\pi_t\in [0,1]$ for all $t\in[0,T].$
We can use (\ref{Vpi0}) to find an expression for the wealth process $V^{x,\pi,c}$ in terms of $V^{1,\pi,0}=\{V_t^{1,\pi,0}\}_{t\in [0,T]},$ the wealth process with initial wealth $1$ and portfolio-consumption pair $(\pi,0),$ as follows:  consider the process
\[
\xi_t^{x,\pi,c}:=x-\int_0^t\frac{c_s}{V_{s-}^{1,\pi,0}}\,ds, \ \ t\in [0,T].
\]
In differential form, we have $V_{t-}^{1,\pi,0}\,d\xi_t^{{x,\pi,c}}=-c_t\,dt.$ Then
\begin{align*}
d\left(\xi_t^{{x,\pi,c}}V_t^{1,\pi,0}\right)&=\xi_t^{{x,\pi,c}}\,dV_t^{1,\pi,0}+V_{t-}^{1\pi,0}\,d\xi_t^{{x,\pi,c}}\\
&=\xi_t^{{x,\pi,c}}V_{t-}^{1,\pi,0}\left(\left[r_{\eps(t)}+\pi_t\left(\mu_{\eps(t)}-r_{\eps(t)}\right)\right]\,dt+\pi_t\int_{E} f_{\eps(t-)}(y)\,\gamma(dy,dt)\right)-c_t\,dt.
\end{align*}
Since $\xi_0^{{x,\pi,c}}V_0^{1,\pi,0}=x,$ by uniqueness of solution to equation (\ref{eqV}), the wealth process $V^{x,\pi,c}$ is a modification of
\begin{equation}\label{xiV}
  \begin{split}
&\xi_t^{{x,\pi,c}}V_t^{1,\pi,0}=\\
&\phantom{\gamma t}\biggl[x-\int_0^t\frac{c_s}{V_{s-}^{1,\pi,0}}\,ds\biggr]\exp\left(\int_0^t\left[\pi_s\mu_{\eps(s)}
+(1-\pi_s)r_{\eps(s)}\right]\,ds\right)\prod_{n=1}^{N_t(E)}(1+\pi_{\tau_n}f_{\eps_n}(Y_{\eps_n,n})).
\end{split}
\end{equation}
Notice that the portfolio-consumption pair $(\pi,c)$ leads to positive wealth at time $t\in [0,T]$ if, almost surely
\[
\int_0^t\frac{c_s}{V_{s-}^{1,\pi,0}}\,ds<x \ \ \mbox{ and } \ \ \pi_{\tau_n}f_{\eps_n}(Y_{\eps_n,n})>-1, \ \forall \tau_n\le t.
\]
The class $\calA(x)$ of admissible pairs for initial wealth $x>0$ is defined as the set of portfolio-consumption pairs $(\pi,c)$  for which equation (\ref{eqV}) possesses an unique strong solution $V^{x,\pi,c}=\{V_t^{x,\pi,c}\}_{t\in [0,T]}$ such that $V_t^{x,\pi,c}\geq 0,$ a.s. for all $t\in[0,T].$

We now define the utility maximization problem for optimal choice of portfolio and consumption processes.
Let $U_1 : [0,T] \times [0,\infty) \rightarrow [-\infty,\infty)$ and $U_2 : [0,\infty) \rightarrow [-\infty,\infty)$ denote consumption and
investment utility functions respectively, satisfying the following conditions
\begin{enumerate}
\item[(i)] $U_1(t,x) > -\infty$
and $U_2(x) > -\infty$
for all $t\in [0,T]$
and $x \in (0,\infty)$

\item[(ii)] for each $t \in [0,T]$ the mappings
$U_1(t,\cdot): (0,\infty) \rightarrow \R$
and $U_2(\cdot) : (0,\infty) \rightarrow \R$
are strictly increasing, strictly concave, of class $C^{1}$ on $(0,\infty),$
such that
\[
\lim_{x \downarrow 0, \; x > 0} \frac{\partial U_1}{\partial x}(t,x) = +\infty,\;\;\;
\lim_{x \rightarrow \infty}  \frac{\partial U_1}{\partial x}(t,x) = 0,\;\;\;
\lim_{x \downarrow 0, \; x > 0} U_2'(x) = +\infty,\;\;\;
\lim_{x \rightarrow \infty}  U_2'(x) = 0.
\]
\item[(iii)] $U_1$ and
$\frac{\partial U_1}{\partial x}$
are continuous on $[0,T]\times (0,\infty)$.
\end{enumerate

Given the initial state of the Markov chain $\eps(0)=i\in\calI,$ let $\tilde{\calA}_i(x)$ denote the class of admissible portfolio-consumption strategies $(\pi,c)\in\calA(x)$ such that
\[
\Exp_i\left[\int_0^T U_1(t,c_t)^{-}\,dt+U_2(V_T^{x,\pi,c})^{-}\right]>-\infty,
\]
where $\alpha^{-}:=\min\set{0,\alpha}$ is the negative part of $\alpha\in\R$ and $\Exp_i[\cdot]:=\Exp[\cdot|\eps(0)=i].$ We define the utility functional
\[
J_i(x;\pi,c):=\Exp_i\left[\int_0^T U_1(t,c_t)\,dt+U_2(V_T^{x,\pi,c})\right], \ \ (\pi,c)\in\tilde{\calA}_i(x),
\]
and consider the following utility maximization problem from terminal wealth and consumption
\begin{equation}\label{utilitymax}
\vartheta_i(x):=\sup_{(\pi,c)\in\tilde{\calA}_i(x)}J_i(x;\pi,c), \ \ x>0, \ \ i\in\calI.
\end{equation}
An admissible portfolio-consumption pair $(\hat{\pi},\hat{c})\in\tilde{\calA}_i(x)$ is said to be optimal for the initial state $\eps(0)=i$ and initial wealth $x>0$ if $\vartheta_i(x)=J_i(x;\hat{\pi},\hat{c}).$

\section{Martingale approach and main result}
Recall that the compensator $\rho(dy,dt)$ of the marked point process $\gamma(dy,dt)$ is the unique (possibly, up to a null set) predictable random measure such that, for every $\Fil-$predictable map $\phi(t,y)$ the two following conditions hold
\begin{itemize}
  \item[i.] The process
  \[
  \int_0^t\int_E\phi(s,y)\,\rho(dy,ds), \ \ t\geq 0,
  \]
  is $\Fil-$predictable.

  \item[ii.] If the process
  \[
  \int_0^t\int_E\abs{\phi(s,y)}\,\rho(dy,ds)<+\infty, \ \ \forall t\geq 0.
\]
is increasing and locally integrable, then
\[
M_t(\phi):=\int_0^t\int_E \phi(s,y)\,\gamma(dy,ds)-\int_0^t\int_E\phi(s,y)\,\rho(dy,ds), \ \ t\geq 0,
\]
is $\Fil$-local martingale (see e.g. Jeanblanc et al \cite[Definition 8.8.2.1]{jeanblanc}).
\end{itemize}
The following is the main assumption for the rest of this section
\begin{Assumption}\label{A1}
There exists $(\lambda_i)_{i\in\calI}$ with $\lambda_i>0$ for all $i\in\calI$ such that the compensator $\rho(dy,dt)$ of $\gamma(dy,dt)$ satisfies
  \begin{equation}\label{condrho}
  \rho(dy,dt)=F_{\eps(t-)}(dy)\lambda_{\eps(t-)}\,dt, \ \mbox{ a.s.}
  \end{equation}
\end{Assumption}

\begin{remark}
Condition (\ref{condrho}) is similar to the main assumption in the recent paper by Elliott and Siu \cite{elliottsiu}. In the next section, using properties of jump-telegraph processes, we will prove that Assumption \ref{A1} actually holds for our market model in the case of a two-state Markov chain.
\end{remark}

\begin{remark}
Under Assumption \ref{A1}, the counting process $N_t(A):=\gamma(A\times (0,t])$ is an inhomogeneous Poisson process with stochastic (Markov-modulated) intensity $F_{\eps(t-)}(A)\lambda_{\eps(t-)},$ see e.g. Jeanblanc et al \cite[Section 8.4.2]{jeanblanc} or the proof of Corollary \ref{lemrhodis} below.
\end{remark}
Let $\widetilde{\gamma}(dy,dt):=\gamma(dy,dt)- F_{\eps(t-)}(dy)\lambda_{\eps(t-)}\,dt$ denote the compensated martingale measure associated with the counting measure $\gamma(dy,dt).$ We define equivalent martingale probability measures via the Radon-Nikodym densities
\[
\left.\frac{d\Qbf^\varphi}{d\Prob}\right|_{\calF_t}:=Z_t^\varphi, \ \ t\in[0,T],
\]
where $Z^\varphi=\{Z_t^\varphi\}_{t\in[0,T]}$ is the solution of the linear SDE
\begin{equation}\label{eq:dZt}
dZ_t=Z_{t-}\int_{E}(\varphi_{\eps(t-)}(y)-1)\,\widetilde{\gamma}(dy,dt), \ \ Z_0=1,
\end{equation}
and, for each $i\in\calI,$ $\varphi_i:\Omega\times E\to (0,\infty)$ is a nonnegative-valued $\Fil$-predictable map satisfying $\int_E\varphi_{i}(y)\,F_{i}(dy)<+\infty$ a.s. In what follows, we denote $\varphi=(\varphi_i)_{i\in\calI}.$

If the process $Z^\varphi$  satisfies $\Exp[Z_T^\varphi]=1,$ then $Z^\varphi$ is a $\Fil$-martingale under $\Prob,$ and $\Qbf^\varphi$ defines a probability measure on $(\Omega,\calF_T),$ see e.g. Theorem T10 in Br\'{e}maud \cite[Chapter VIII]{bremaud}. Moreover, the compensator measure $\rho^\varphi(dy,dt)$ of $\gamma(dy,dt)$ under $\Qbf^\varphi$ satisfies

\[
\rho^\varphi(dy,dt)=F_{\eps(t-)}^\varphi(dy)\lambda_{\eps(t-)}^\varphi\,dt
\]
where, for each $i\in\calI,$
\begin{align*}
F_{i}^\varphi(dy)&:=\frac{\varphi_{i}(y)}{h_{i}^\varphi}F_{i}(dy),\\
\lambda_{i}^{\varphi}&:=\lambda_{i}h_{i}^\varphi,
\end{align*}
and
\[
h_{i}^\varphi:=\int_{E}\varphi_{i}(y)\,F_{i}(dy).
\]
\begin{remark}\label{martcondZ}
If
\begin{equation}\label{alpha}
\int_E\varphi_i(y)^p\,F_i(dy)<+\infty, \ \ \mbox{a.s.}, \ \forall i\in\mathcal{I}
\end{equation}
for some $p>1,$ then $\Exp[Z_T^\varphi]=1$ and $\Qbf^\varphi$ defines a probability measure on $(\Omega,\calF_T),$ see e.g. Theorem T11 of Br\'{e}maud \cite[Chapter VIII]{bremaud}. For $m=2,$ the same holds if condition (\ref{alpha}) is satisfied with $p=1,$ see Remark \ref{remZ:m2} below.
\end{remark}
Let $\Theta$ denote the set of $m$-tuples $\varphi=(\varphi_i)_{i\in\calI}$ of non-negative valued $\Fil$-predictable maps for which $Z^\varphi$ is a $\Fil$-martingale and the following condition holds
  \begin{equation}\label{martcond}
  \mu_i-r_i+\lambda_i\int_{E} f_i(y)\varphi_i(y)\,F_i(dy)=0, \ \ \mbox{a.s. for all }  i\in\calI.
  \end{equation}
\begin{remark}
Under condition (\ref{martcond}), the discounted asset price $\{B_t^{-1}S_t\}_{t\in[0,T]}$ is a $\Qbf^\varphi$-local martingale. Indeed, let $\widetilde{\gamma}^{\,\varphi}(dy,dt):=\gamma(dy,dt)-F_{\eps(t-)}^\varphi(dy)\lambda_{\eps(t-)}^\varphi\,dt$ denote the compensated martingale measure associated under the equivalent probability measure $\Qbf^\varphi.$ Then, we have
\begin{align*}
  d&(B_t^{-1}S_t)=B_t^{-1}S_{t-}\Bigl\{\left(\mu_{\eps(t)}-r_{\eps(t)}\right)\,dt+\int_{E} f_{\eps(t-)}(y)\,\gamma(dy,dt)\Bigr\}\\
  &=B_t^{-1}S_{t-}\left\{\Bigl[\mu_{\eps(t-)}-r_{\eps(t-)}+\lambda_{\eps(t-)}^\varphi\int_{E} f_{\eps(t-)}(y)\,F_{\eps(t-)}^\varphi(dy)\Bigr]\,dt+\int_{E} f_{\eps(t-)}(y)\,\widetilde{\gamma}^{\,\varphi}(dy,dt)\right\}\\
  &=B_t^{-1}S_{t-}\int_{E} f_{\eps(t-)}(y)\,\widetilde{\gamma}^{\,\varphi}(dy,dt)
\end{align*}
and the claim follows. Moreover, since $f_i(y)\neq 0$ for $i\in\calI$ the market model is arbitrage-free (see e.g. Remark 1 of Ratanov and Melnikov \cite{ratmel} for the case of two-regimes and deterministic jumps). Then, by the first fundamental theorem of asset pricing, the set $\Theta$ is non-empty.
\end{remark}

For each $\varphi\in\Theta$ we define the \emph{state price density} process $H^\varphi=\{H_t^{\varphi}\}_{t\in[0,T]}$ by
\[
H_t^{\varphi}:=B_{t}^{-1}Z_t^\varphi, \ \ t\in [0,T].
\]
The solution of equation (\ref{eq:dZt}) is given by
\begin{align*}
Z_t^\varphi&=\exp\left(\int_0^t\int_{E}\bigl(1-\varphi_{\eps(s)}(y)\bigr)\lambda_{\eps(s)}F_{\eps(s)}(dy)ds+\int_0^t\int_{E}\ln \varphi_{\eps(s-)}(y)\gamma(dy,ds)\right)\\
&=\exp\left(\int_0^t\bigl(1-h_{\eps(s)}^{\varphi}\bigr)\lambda_{\eps(s)}\,ds+\int_0^t\int_{E}\ln \varphi_{\eps(s-)}(y)\gamma(dy,ds)\right).
\end{align*}
Then, the process $H^{\varphi}$ satisfies
\begin{equation*}
H_t^{\varphi}
=\exp\left(\int_0^t\bigl[\bigl(1-h_{\eps(s)}^{\varphi}\bigr)\lambda_{\eps(s)}-r_{\eps(s)}\bigr]ds+\int_0^t\int_{E}\ln\bigl(\varphi_{\eps(s-)}(y)\bigr)\gamma(dy,ds)\right), \ \ t\in [0,T].
\end{equation*}
The following is a well-known result for the state price density process $H^\varphi$ usually referred to as \emph{budget constraint.} We include the proof for the sake of completeness.

\begin{proposition}
For all $\varphi\in\Theta$ and $(\pi,c)\in\A(x),$ we have
\begin{equation}\label{budget}
\Exp_i\left[H_T^\varphi V_T^{x,\pi,c}+\int_0^TH_s^\varphi c_s\,ds\right]\le x, \ \ \forall i\in\calI.
\end{equation}
\end{proposition}
\begin{proof}
Using the product rule for jump processes     and (\ref{martcond}), we have
\begin{align*}
  d&(H^\varphi_t V^{x,\pi,c}_t)+H^\varphi_tc_t\,dt\\
  &=H^\varphi_{t-}dV^{x,\pi,c}_t+V^{x,\pi,c}_{t-}dH^\varphi_{t}+H^\varphi_{t-}V^{x,\pi,c}_{t-}\pi_t\int_Ef_{\eps(t-)}(y)(\varphi_{\eps(t-)}(y)-1)\,\gamma(dy,dt)+H^\varphi_tc_t\,dt\\
  &=H^\varphi_{t-}V^{x,\pi,c}_{t-}\left\{r_{\eps(t)}\,dt+\pi_t\Bigl[(\mu_{\eps(t)}-r_{\eps(t)})\,dt+\int_E f_{\eps(t-)}(y)\,\gamma(dy,dt)\Bigr]\right\}-H^\varphi_tc_t\,dt\\
  &\phantom{=}+H^\varphi_{t-}V^{x,\pi,c}_{t-}\left\{-r_{\eps(t)}\,dt+\int_E(\varphi_{\eps(t-)}(y)-1)\,\tilde{\gamma}(dy,dt)\right\}\\
  &\phantom{=}+H^\varphi_{t-}V^{x,\pi,c}_{t-}\pi_t\int_Ef_{\eps(t-)}(y)(\varphi_{\eps(t-)}(y)-1)\,\gamma(dy,dt)+H^\varphi_tc_t\,dt\\
  &=H^\varphi_{t-}V^{x,\pi,c}_{t-}\int_E(\pi_tf_{\eps(t-)}(y)\varphi_{\eps(t-)}(y)+\varphi_{\eps(t-)}(y)-1)\,\tilde{\gamma}(dy,dt)
\end{align*}
Integrating, we get
\begin{equation*}
  H_tV_t+\int_0^t H_s^\varphi c_s\,ds
  = x+ \int_0^t\int_E(\pi_sf_{\eps(s-)}(y)\varphi_{\eps(s-)}(y)+\varphi_{\eps(s-)}(y)-1)\,\tilde{\gamma}(dy,ds)
\end{equation*}
almost surely, for all $t\in [0,T].$ The stochastic integral in the right hand side is a $\Fil$-local martingale which is bounded below, hence a $\Fil-$super martingale, and (\ref{budget}) follows.
\end{proof}
We now introduce an auxiliary functional related to the convex dual of the utility functions. Let $U$ denote either $U_2(\cdot)$ or $U_1(t,\cdot)$ with $t\in[0,T]$ fixed. Let $I$  denote the inverse of $U',$  so that
\[
I(U'(x))=U'(I(x))=x, \ \ \forall x>0.
\]
Then, $I$ satisfies
\[
I(y)=\arg\max_{x>0}\set{U(x)-yx}, \ \ y>0.
\]
In particular,
\begin{equation}\label{ineqUI}
U(I(y))-yI(y)\geq U(x)-yx, \ \ \forall x,y>0.
\end{equation}
Notice that $U(I(y))-yI(y)=U^*(y),$ where $U^*(y):=\sup_{x>0}\set{U(x)-yx}$ is the Legendre-Fenchel transform of the map $(-\infty,0)\ni x\mapsto -U(-x)\in\R.$ The map $U^*$ is known as the convex dual of the utility function $U.$

For the rest of this section we fix the initial regime $\eps(0)=i\in\calI.$ For $\varphi\in\Theta,$ we define the map
\[
\calX_i^\varphi(y):=\Exp_i\left[\int_0^T H^\varphi_tI_1(t,yH_t^\varphi)\,dt+H^\varphi_TI_2(yH^\varphi_T)\right].
\]
Let $\widetilde{\Theta}=\set{\varphi\in\Theta:\calX_i^\varphi(y)<\infty, \ \forall y>0, \ \forall i\in\calI}.$ For each $\varphi\in\widetilde{\Theta}$ we denote $\Y_i^\varphi:=(\calX_i^\varphi)^{-1}$ and define the process $c^{x,\varphi}=(c_t^{x,\varphi})_{t\in [0,T]}$ and random variable $G^{x,\varphi}$ as follows
\begin{equation}\label{cY}
\begin{split}
  c_t^{x,\varphi} &:=I_1(t,\Y_i^\varphi(x)H_t^\varphi), \ \ t\in [0,T],\\
  G^{x,\varphi}&:=I_2(\Y_i^\varphi(x)H_T^\varphi).
\end{split}
\end{equation}
Finally, we define the auxiliary functional
\[
L_i(x;\varphi):=\Exp_i\left[\int_0^T U_1(t,c_t^{x,\varphi})\,dt+U_2(G^{x,\varphi})\right], \ \ x>0, \ \varphi\in\widetilde{\Theta}.
\]
\begin{lemma}\label{ineqJL}
  For all $x>0$ and $i\in\calI,$ the following holds
     \[
   J_i(x;\pi,c)\leq L_i(x;\varphi), \ \forall (\pi,c)\in\tilde{\calA}_i(x), \ \varphi\in\widetilde{\Theta}.
   \]
\end{lemma}

\begin{proof}
From (\ref{ineqUI}) and (\ref{cY}), we have
\[
U_1(t,c_t)\le U_1(t,c_t^{x,\varphi})+\Y^{\varphi}(x)H_t^{\varphi}(c_t-c_t^{x,\varphi})
\]
and
\[
U_2(V_T^{x,\pi,c})\le U_2(G^{x,\varphi})+\Y^{\varphi}(x)H_T^{\varphi}(V_T^{x,\pi,c}-G^{x,\varphi}).
\]
Then, by (\ref{budget}) and the definition of $\Y_i^{\varphi},$ we have
\begin{align*}
 J_i(x;\pi,c) &\le L_i(x;\varphi)
 +\Y_i^{\varphi}(x)\cdot\Exp_i\left[\int_0^TH_t^{\varphi}(c_t-c_t^{x,\varphi})\,dt+H_T^\varphi(V_T^{x,\pi,c}-G^{x,\varphi})\right]\\
 &\le L_i(x;\varphi)+\Y_i^{\varphi}(x)[x-\calX_i^{\varphi}(\Y_i^{\varphi}(x))]\\
 &= L_i(x;\varphi)
\end{align*}
and the desired result follows.
\end{proof}

By the previous Lemma, we have $\vartheta_i(x)\le \tilde{\vartheta}_i(x),$ where $\tilde{\vartheta}_i(\cdot)$ is the optimal value function of the minimization problem
\begin{equation}\label{dual}
\tilde{\vartheta}_i(x):=\inf_{\varphi\in\widetilde{\Theta}}L_i(x;\varphi).
\end{equation}
In Theorem \ref{main} below, we find sufficient conditions to ensure $\vartheta_i(x)=\tilde{\vartheta}_i(x)$ as well as the existence of an optimal portfolio-consumption process $(\hat{\pi},\hat{c}).$

For each $x>0$ and $\varphi\in \widetilde{\Theta},$ consider the processes defined as
\[
Y_t^{x,\varphi}:=\Exp\left[\Bigl.H_T^\varphi G^{x,\varphi}+\int_t^TH_s^\varphi c_s^{x,\varphi}\,ds\,\Bigr|\calF_t\right], \ \ t\in [0,T],
\]
and
\[
M_t^{x,\varphi}  := Y_t^{x,\varphi}+\int_0^tH_s^{\varphi}c_s^{x,\varphi}\,ds, \ \ t\in [0,T].
\]
Observe that  $Y_0^{x,\varphi} = \calX_i^\varphi(\Y_i^\varphi(x))= x$ and $Y_t^{x,\varphi} \geq 0 $ for all  $t \in \left[0,T\right].$ Moreover, $M_t^{x,\varphi}$ satisfies
\begin{equation}
M_t^{x,\varphi}=\Exp\left[ H_T^{\varphi} G^{x,\varphi}+\Bigl.\int_0^T H_s^{\varphi} c_s^{x,\varphi}\, ds\, \Bigr|  \calF_t \right], \ t \in [0,T],
\end{equation}
that is, the process $M^{x,\varphi}=\set{M_t^{x,\varphi}}_{t\in[0,T]}$ is an $\Fil$-martingale. Let $\beta^{x,\varphi}(t,y)$ denote the essentially unique martingale representation coefficient of $ M_t^{x,\varphi}$ with respect to the compensated measure $\tilde{\gamma}(dy,dt),$
\begin{equation}
M_t^{x,\varphi} = x+\int_0^t{\int_{E}} {\beta^{x,\varphi}(s,y)}\,{\tilde{\gamma}}(dy,ds), \ \ t\in [0,T],
\end{equation}
see e.g. Theorem T8 in Section VIII of Br\'{e}maud \cite{bremaud}. Then, the pair $(Y^{x,\varphi},\beta^{x,\varphi})$ satisfies the linear backward SDE
\begin{equation}\label{bsdeY}
Y_t^{x,\varphi}=H_T^\varphi G^{x,\varphi}+\int_t^T H_s^\varphi c_s^{x,\varphi}\,ds-\int_t^T\!\int_E\beta^{x,\varphi}(s,y)\,{\tilde{\gamma}}(dy,dt), \ \ t\in [0,T],
\end{equation}
with final condition $Y_T^{x,\varphi}=H_T^\varphi G^{x,\varphi}.$ The following is the main result of this paper

\begin{theorem}\label{main}
For $x>0$ and $i\in\calI$ fixed, suppose there exist $\hat{\varphi} \in \tilde{\Theta}$ and a $\Fil$-predictable portfolio process $\hat{\pi}$ satisfying
\begin{equation}\label{pif}
\hat{\pi}_tf_{\eps(t-)}(y)+1=\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}\left[\frac{\beta^{x,\hat{\varphi}}(t,y)}{Y_{t-}^{x,\hat{\varphi}}}+1\right], \ \ \rho\mbox{-a.e. }(t,y)\in [0,T]\times E.
\end{equation}
Assume also that the wealth equation (\ref{eqV}) has a solution for $ (\hat{\pi} , \hat{c}),$ where $\hat{c}=c^{x,\hat{\varphi}}$. Then the following assertions hold

\begin{itemize}
   \item[(a)] The pair $(\hat{\pi} , \hat{c})$ belongs to $\tilde{\calA}_i(x)$ and solves the optimal portfolio-consumption problem (\ref{utilitymax}),
   \item[(b)] the wealth process $V^{x,\hat{\pi},\hat{c}}$ is a modification of the process $X_t^{x,\hat{\varphi}}:=Y_t^{x,\hat{\varphi}}/H_t^{\hat{\varphi}}$,
   \item[(c)] the optimal value function for the utility maximization (\ref{utilitymax}) satisfies $\vartheta_i=\mathcal{K}_i^{\hat{\varphi}}\circ\mathcal{Y}_i^{\hat{\varphi}}$ where
\[
\mathcal{K}_i^{\varphi}(y):=\Exp_i\left[\int_0^TU_1(t,I_1(t,yH_t^{\varphi}))\,dt+U_2(I_2(yH_T^{\varphi}))\right], \ \ y>0.
\]
 \end{itemize}
\end{theorem}
\begin{proof}
We prove first part (b). Since $X_0^{x,\hat{\varphi}}=Y_0^{x,\hat{\varphi}}=x,$ it suffices to show that $X_t^{x,\hat{\varphi}}$ satisfies the wealth equation for the pair $(\hat{\pi},\hat{c}).$ Notice first that, by the definition of $Z_t^{\hat{\varphi}},$ the process $H_t^{\hat{\varphi}}$ satisfies the linear stochastic equation
\begin{align*}
  dH^{\hat{\varphi}}_t&=H^{\hat{\varphi}}_{t-}\Bigl\{-r_{\eps(t)}\,dt+\int_E(\hat{\varphi}_{\eps(t-)}(y)-1)\,\tilde{\gamma}(dy,dt)\Bigr\}\\
          &=H^{\hat{\varphi}}_{t-}\Bigl\{\Bigl[-r_{\eps(t)}-\lambda_{\eps(t-)}\int_E(\hat{\varphi}_{\eps(t-)}(y)-1)\,F_{\eps(t-)}(dy)\Bigr]\,dt
          +\int_E(\hat{\varphi}_{\eps(t-)}(y)-1)\,\gamma(dy,dt)\Bigr\}
\end{align*}
Using integration formula for marked point processes (see e.g. Jeanblanc et al \cite[Section 8.8]{jeanblanc}), the differential of $1/H^{\hat{\varphi}}_t$ is given by
\[
  d\Bigl(\frac{1}{H^{\hat{\varphi}}_t}\Bigr)
  =\frac{1}{H^{\hat{\varphi}}_{t-}}\Bigl\{\Bigl[r_{\eps(t)}+\lambda_{\eps(t-)}\int_E(\hat{\varphi}_{\eps(t-)}(y)-1)\,F_{\eps(t-)}(dy)\Bigr]\,dt
  +\int_E\Bigl(\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1\Bigr)\,\gamma(dy,dt)\Bigr\}.
\]
From (\ref{bsdeY}), the differential of $Y^{x,\hat{\varphi}}_t$ is given by
\[
dY^{x,\hat{\varphi}}_t=-H^{\hat{\varphi}}_tc^{x,\hat{\varphi}}_t\,dt+\int_E\beta^{x,\hat{\varphi}}(t,y)\,\tilde{\gamma}(dy,dt).
\]
Using the product rule, we have
\begin{align*}
  d\Bigl(\frac{Y^{x,\hat{\varphi}}_t}{H^{\hat{\varphi}}_t}\Bigr)
  &=Y_{t-}\,d\Bigl(\frac{1}{H^{\hat{\varphi}}_t}\Bigr)+\frac{1}{H^{\hat{\varphi}}_{t-}}\,dY^{x,\hat{\varphi}}_t
  +\frac{1}{H^{\hat{\varphi}}_{t-}}\int_E\beta^{x,\hat{\varphi}}(t,y)\Bigl(\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1\Bigr)\,\gamma(dy,dt)\\
  &=\frac{Y_{t-}}{H^{\hat{\varphi}}_{t-}}\Bigl\{\Bigl[r_{\eps(t)}+\lambda_{\eps(t-)}\int_E(\varphi_{\eps(t)}(y)-1)\,F_{\eps(t)}(dy)\Bigr]\,dt
  +\int_E\Bigl(\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1\Bigr)\,\gamma(dy,dt)\Bigr\}\\
  &\phantom{==}-c^{x,\hat{\varphi}}_t\,dt+\frac{1}{H^{\hat{\varphi}}_{t-}}\Bigl\{\int_E\beta^{x,\hat{\varphi}}(t,y)\,\tilde{\gamma}(dy,dt)
  +\int_E\beta^{x,\hat{\varphi}}(t,y)\Bigl(\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1\Bigr)\,\gamma(dy,dt)\Bigr\}.
\end{align*}
We multiply and divide the last bracket by $Y_{t-}^{x,\hat{\varphi}}$ and use $\tilde{\gamma}(dy,dt)=\gamma(dy,dt)-\lambda_{\eps(t-)}\,F_{\eps(t-)}(dy)\,dt$ to obtain
\begin{align*}
d\Bigl(\frac{Y^{x,\hat{\varphi}}_t}{H^{\hat{\varphi}}_t}\Bigr)
  &=\Bigl\{\frac{Y^{x,\hat{\varphi}}_t}{H^{\hat{\varphi}}_t}r_{\eps(t)}-c^{x,\hat{\varphi}}_t\Bigr\}\,dt
+\frac{Y_{t-}}{H^{\hat{\varphi}}_{t-}}\left\{\lambda_{\eps(t-)}\int_E\Bigl(\varphi_{\eps(t-)}(y)-1-\frac{\beta^{x,\hat{\varphi}}(t,y)}{Y_{t-}}\Bigr)\,F_{\eps(t-)}(dy)\,dt\right.\\
&\phantom{==}\left.+\int_E\Bigl(\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1+\frac{\beta^{x,\hat{\varphi}}(t,y)}{\hat{\varphi}_{\eps(t-)}(y)Y_{t-}}\Bigr)\,\gamma(dy,dt)\right\}
\end{align*}
From (\ref{pif}), for the integrand in the stochastic integral, we have
\[
\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1+\frac{\beta^{x,\hat{\varphi}}(t,y)}{\hat{\varphi}_{\eps(t-)}(y)Y_{t-}}
  =\pi_tf_{\eps(t-)}(y)
\]
and (\ref{pif}) in conjunction with (\ref{martcond}) yields
\begin{align*}
\lambda_{\eps(t-)}&\int_E\Bigl(\hat{\varphi}_{\eps(t-)}(y)-1-\frac{\beta^{x,\hat{\varphi}}(t,y)}{Y_{t-}}\Bigr)\,F_{\eps(t-)}(dy)\\
&=\lambda_{\eps(t-)}\int_E(\hat{\varphi}_{\eps(t-)}(y)-\hat{\varphi}_{\eps(t-)}(y)(\pi_tf_{\eps(t-)}(y)+1))\,F_{\eps(t-)}(dy)\\
&=\lambda_{\eps(t-)}\int_E-\pi_t\hat{\varphi}_{\eps(t-)}(y)f_{\eps(t-)}(y)\,F_{\eps(t-)}(dy)\\
&=\pi_t\left(\mu_{\eps(t-)}-r_{\eps(t-)}\right)
\end{align*}
and part (b) follows. In particular, we have $V_T^{x,\hat{\pi},\hat{c}}=Y_T^{x,\hat{\varphi}}/H_T^{\hat{\varphi}}=G^{x,\hat{\varphi}},$ a.s. This in turn implies
\begin{equation}
L_i(x;\hat{\varphi})=J_i(x;\hat{\pi},\hat{c})
\end{equation}
and part (a) follows from Lemma \ref{ineqJL}. Part (c) follows easily since $\vartheta_i(x)=\tilde{\vartheta}_i(x)=L_i(x;\hat{\varphi}).$
\end{proof}
\begin{remark}
Although optimality condition (\ref{pif}) looks rather restrictive,  as we will see in the last section, it simplifies significantly in the case of logarithmic utility functions.
\end{remark}
\section{Telegraph processes with Markov-modulated random jumps}

In this section we revisit briefly the telegraph model with Markov-modulated random jumps introduced recently by L\'opez and Ratanov \cite{lopezrat}. We assume that the Markov chain $\eps(\cdot)=\{\eps(t)\}_{t\in[0,T]}$ takes only two values $\set{0,1}$ with intensity matrix $\bigl(\begin{smallmatrix}-\lambda_0 & \lambda_0\\ \lambda_1 &-\lambda_1\end{smallmatrix}\bigr).$ Thus, $X$ is given by the \emph{jump-telegraph process
}
\begin{equation}\label{Tt}
X_t=\int_0^t \mu_{\eps(s)}ds+\sum_{n=1}^{N_t(E)}f_{\eps_n}(Y_{\eps_n,n}), \ \ t\in [0,T].
\end{equation}
We assume that the alternating tendencies $\mu_0$ and $\mu_1$ satisfy $\mu_0\neq \mu_1.$ By fixing the initial state $\eps(0)=i\in\{0,1\}$, we have the following equality in distribution
\begin{equation}\label{eq:edZ}
X_t\overset{d}{=}\mu_i t\mathbf{1}_{\{t<\tau_1\}}+\bigl[\mu_i\tau_1+f_i(Y_{i,1})+\widetilde{X}_{t-\tau_1}\bigr]\mathbf{1}_{\{t>\tau_1\}}, \ \ t\in[0,T],
\end{equation}
where the process $\widetilde{X}=\{\widetilde{X}_t\}_{t\in[0,T]}$ is a jump-telegraph process as in (\ref{Tt}) independent of $X$  starting from the opposite initial state $1-i$.

\begin{figure}[htb]
\centering
\includegraphics{Figure1.eps}
\caption{\small A sample path of $X$ with $\mu_1<0<\mu_0$, $f_0(y)=f_1(y)=y$ and initial state $\eps(0)=0$.}
\end{figure}

We denote $\Prob_i(\cdot)=\Prob(\cdot|\eps(0)=i),$ and define $p_i(t,x)$ as the density function of the random variable $X_t,$ given the initial $\eps(0)=i\in\set{0,1},$
\begin{equation}
p_i(t,x):=\frac{\Prob_i(X_t\in d x)}{d x}, \ \ t\in[0,T], \ x\in\R.
\end{equation}
That is, for any $\Delta\in\B(\R)$, we have
\[
\int_{\Delta}\! p_{i}(t,x)\,dx=\Prob_i\left(X_t\in \Delta\right).
\]
Recall that the holding or inter-arrival times $\{\tau_{n+1}-\tau_{n}\}_{n\geq0}$ of the Markov chain $\eps(\cdot)$ are exponentially distributed with
\begin{equation}\label{eq:T-n}
\Prob(\tau_{n+1}-\tau_n>t\mid \mathcal{F}_{\tau_n}\bigr)=\exp\bigl(-\lambda_{\eps(\tau_n)}t\bigr).
\end{equation}
Here we have set $\tau_0:=0.$ Using (\ref{eq:T-n}) and (\ref{eq:edZ}) together with the total probability theorem, it follows that the densities functions $p_i(t,x)$ satisfy the following system of integral equations on $[0,T]\times\R,$
\begin{equation*}
\begin{split}
p_0(t,x)&=e^{-\lambda_0t}\delta(x-\mu_0t)+\int_0^t\left(\int_{E} p_{1}(t-s,x-\mu_0s-f_0(y))F_0(d y)\right)\lambda_0e^{-\lambda_0s}ds \\
p_1(t,x)&=e^{-\lambda_1t}\delta(x-\mu_1t)+\int_0^t\left(\int_{E} p_{0}(t-s,x-\mu_1s-f_1(y))F_1(d y)\right)\lambda_1e^{-\lambda_1s}ds
\end{split}
\end{equation*}
where $\delta(\cdot)$ is Dirac's delta function. This system is equivalent to the following system of coupled partial integro-differential equations on $(0,T]\times\R,$
\begin{equation}\label{eq:dX}
\begin{split}
\frac{\partial p_0}{\partial t}(t,x)+\mu_0\frac{\partial p_0}{\partial x}(t,x)&=-\lambda_0p_0(t,x)+\lambda_0\int_{E}p_{1}(t,x-f_0(y))F_0(dy)\\
\frac{\partial p_1}{\partial t}(t,x)+\mu_1\frac{\partial p_1}{\partial x}(t,x)&=-\lambda_1p_1(t,x)+\lambda_1\int_{E}p_{0}(t,x-f_1(y))F_1(dy)
\end{split}
\end{equation}
with initial conditions $p_0(0,x)=p_1(0,x)=\delta(x)$.
\begin{theorem}\label{thm:meanZG}
Assume $\int_{E} f_i(y)F_i(dy)<+\infty$ for $i=0,1.$ Then the conditional expectations $m_i(t):=\Exp_i[X_t]$ of the random variables $X_t$ satisfy
\begin{equation}\label{meanZG}
\begin{split}
m_0(t)&=\frac{1}{2\lambda}\left[(\lambda_1d_0+\lambda_0d_1)t+\lambda_0(d_0-d_1)\left(\frac{1-e^{-2\lambda t}}{2\lambda}\right)\right],\\
m_1(t)&=\frac{1}{2\lambda}\left[(\lambda_1d_0+\lambda_0d_1)t-\lambda_1(d_0-d_1)\left(\frac{1-e^{-2\lambda t}}{2\lambda}\right)\right],
\end{split}
\end{equation}
where
\begin{equation*}
2\lambda:=\lambda_0+\lambda_1,\quad \eta_i:=\int_{E} f_i(y)F_i(dy),\quad d_i:=\mu_i+\lambda_i\eta_i, \ \ i=0,1.
\end{equation*}
\end{theorem}
\begin{proof}
By definition, we have
\begin{equation*}
m_i(t)=\int_{-\infty}^\infty xp_i(t,x)d x,\quad i=0,1.
\end{equation*}
Differentiating the above equation, using the system \eqref{eq:dX} and integrating by parts, we obtain the following system of ODEs
\begin{equation*}
\begin{split}
\frac{d m_0}{d t}(t)&=-\lambda_0m_0(t)+\lambda_0m_1(t)+\mu_0+\lambda_0\eta_0,\\
\frac{d m_{1}}{d t}(t)&=-\lambda_1m_1(t)+\lambda_1m_0(t)+\mu_1+\lambda_1\eta_1,
\end{split}
\end{equation*}
with initial conditions $m_0(0)=m_1(0)=0$. The unique solution of this Cauchy problem is given by \eqref{meanZG}.
\end{proof}
\begin{theorem}\label{thm:expZG}
Assume $\int_{E} e^{f_i(y)}F_i(dy)<+\infty$ for $i=0,1.$ Then the conditional exponential moments $\psi_i(t):=\Exp_i[e^{X_t}]$ of the random variables $X_t$ satisfy
\begin{equation}\label{expZG}
\begin{split}
\psi_0(t)&=e^{t(\nu-\lambda)}\left[\cosh\bigl(t\sqrt{D}\,\bigr)
+\bigl(\mu-\zeta+\lambda_0\phi_0\bigr)\frac{\sinh\bigl(t\sqrt{D}\,\bigr)}{\sqrt{D}}\right],\\
\psi_1(t)&=e^{t(\nu-\lambda)}\left[\cosh\bigl(t\sqrt{D}\,\bigr)
-\bigl(\mu-\zeta-\lambda_1\phi_1\bigr)\frac{\sinh\bigl(t\sqrt{D}\,\bigr)}{\sqrt{D}}\right],
\end{split}
\end{equation}
where
\begin{equation*}
\mu:=\frac{\mu_0-\mu_1}{2},\quad \nu:=\frac{\mu_0+\mu_1}{2}, \quad \zeta:=\frac{\lambda_0-\lambda_1}{2},\quad
\phi_i:=\int_{E} e^{f_i(y)}F_i(dy), \ \ i=0,1
\end{equation*}
and $D=(\mu-\zeta)^2+\lambda_0\lambda_1\phi_0\phi_1$.
\end{theorem}
\begin{proof}
By definition, we have
\begin{equation*}
\psi_i(t)=\int_{-\infty}^\infty e^{x}p_i(t,x)d x,\quad i=0,1.
\end{equation*}
Differentiating the above equation, using the system \eqref{eq:dX} and integrating by parts, we obtain the following system of ODEs
\begin{equation*}
\begin{split}
\frac{d \psi_0}{d t}(t)&=(\mu_0-\lambda_0)\psi_0(t)+\lambda_0\phi_0\psi_1(t),\\
\frac{d \psi_{1}}{d t}(t)&=(\mu_1-\lambda_1)\psi_1(t)+\lambda_1\phi_1\psi_0(t),
\end{split}
\end{equation*}
with initial conditions $\psi_0(0)=\psi_1(0)=1$. The unique solution of this Cauchy problem is given by \eqref{expZG}.
\end{proof}
\begin{theorem}\label{teor:expHQ}
Suppose that $\int_E f_i(y)F_i(dy)<+\infty$ for $i=0,1$. Then the processes
\begin{equation}\label{eq:Ztilde}
L_t:=\sum_{n=1}^{N_t(E)}f_{\eps_n}\bigl(Y_{\eps_n,n}\bigr)-\int_0^t\int_{E}f_{\eps(s)}(y)\lambda_{\eps(s)}F_{\eps(s)}(d y)d s, \ \ t\geq0
\end{equation}
and
\begin{equation}
\mathcal{E}_t(L)=\prod_{n=1}^{N_t(E)}\bigl(1+f_{\eps_n}\bigl(Y_{\eps_n,n}\bigr)\bigr)\exp\left(-\int_0^t\int_{E}f_{\eps(s)}(y)\lambda_{\eps(s)}F_{\eps(s)}(d y)d s\right), \ \ t\geq0
\end{equation}
are $\Fil$-martingales.
\end{theorem}
\begin{proof}
Observe that $L_t$ is a jump-telegraph process with $\mu_i=-\lambda_i\eta_i.$ Then, by Theorem \ref{thm:meanZG} we have
\begin{equation}\label{antZ}
\Exp_i[L_t]=\Exp_i\left[\sum_{n=1}^{N_t(E)}f_{\eps_n}(Y_{\eps_n,n})-\int_0^t\int_{E}f_{\eps(s)}(y)\lambda_{\eps(s)}F_{\eps(s)}(d y)d s\right]=0,\quad i=0,1.
\end{equation}
Let $0\le s < t$ be fixed. Let $i\in\{0,1\}$ be the value of $\eps(\cdot)$ at time $s$ and let $k\in\Na$ be the value of $N_s(E)$ at time $s.$ By the strong Markov property, we have the following conditional identities in distribution
\begin{equation}\label{eq:markovQ}
\begin{aligned}
\bigl.\eps(s+u)\,\bigr|_{\{\eps(s)=i\}}&\overset{d}{=}\bigl.\tilde{\eps}(u)\,\bigr|_{\{\tilde{\eps}(0)=i\}}, \\
\bigl.\tau_{n+k}\,\bigr|_{\{\eps(s)=i\}}&\overset{d}{=}\tilde{\tau}_{n}\,\bigr|_{\{\tilde{\eps}(0)=i\}},
\end{aligned}
\quad
\begin{aligned}
\bigl.N_{s+u}(E)\,\bigr|_{\{\eps(s)=i\}}&\overset{d}{=}N_s(E)+\bigl.\widetilde{N}_u(E)\,\bigr|_{\{\tilde{\eps}(0)=i\}}, \\
\bigl.Y_{\eps_{n+k},n+k}\,\bigr|_{\{\eps(s)=i\}}&\overset{d}{=}\bigl.Y_{\tilde{\eps}_n,n}\,\bigr|_{\{\tilde{\eps}(0)=i\}},
\end{aligned}
\quad
\begin{aligned}
&u\geq0,\\
&n\geq0,
\end{aligned}
\end{equation}
where $\tilde{\eps}$, $\widetilde{N}$, $\{\tilde{\tau}_k\}$ and $\{Y_{\tilde{\eps}_k,k}\}$
are copies of the processes $\eps$, $N$, $\{\tau_k\}$ and $\{Y_{\eps_k,k}\}$, respectively, independent of $\mathcal{F}_s.$
Then, using \eqref{antZ} and \eqref{eq:markovQ}, we obtain
\begin{equation*}
\Exp[L_t-L_s\mid\mathcal{F}_s]
=\Exp_i\left[\sum_{n=1}^{\widetilde{N}_{t-s}(E)}f_{\tilde{\eps}_n}(Y_{\tilde{\eps}_n,n})
-\int_0^{t-s}\int_{E}f_{\tilde{\eps}(u)}(y)\lambda_{\tilde{\eps}(u)}F_{\tilde{\eps}(u)}(d y)d u\right]
= 0,
\end{equation*}
and the first part follows. Now, if we define the jump-telegraph process
\begin{equation*}
\hat{L}_t:=\sum_{n=1}^{N_t(E)}\log\bigl(1+f_{\eps_n}(Y_{\eps_n,n})\bigr)-\int_0^t\int_{E}f_{\eps(s)}(y)\lambda_{\eps(s)}F_{\eps(s)}(dy)ds,
\end{equation*}
then we have $\mathcal{E}_t(L)=e^{\hat{L}_t}$ and by Theorem \ref{thm:expZG} we find that $\Exp_i[e^{\hat{L}_t}]=1$, $i=0,1$. Using this and \eqref{eq:markovQ}, we obtain
\begin{equation*}
\Exp\bigl[e^{\hat{L}_t-\hat{L}_s}\mid\mathcal{F}_s\bigr]
=\Exp_i\Biggl[\exp\Biggl(\,\sum_{n=1}^{\widetilde{N}_{t-s}(E)}\log\bigl(1+f_{\tilde{\eps}_n}(Y_{\tilde{\eps}_n,n})\bigr)
-\int_0^{t-s}\int_{E}f_{\tilde{\eps}(u)}(y)\lambda_{\tilde{\eps}(u)}F_{\tilde{\eps}(u)}(dy)du\Biggr)\Biggr]= 1,
\end{equation*}
and the desired result follows.
\end{proof}

\begin{remark}\label{remZ:m2}
Let $Z^\varphi$ denote the Radon-Nikodym densities defined in the previous section. Then $Z_t^\varphi=\mathcal{E}_t(J)$ with
\begin{equation*}
J_t:=\sum_{n=1}^{N_t(E)}\bigl(\varphi_{\eps_n}(Y_{\eps_n,n})-1\bigr)
-\int_0^t\int_E\bigl(\varphi_{\eps(s)}(y)-1\bigr)\lambda_{\eps(s)}F_{\eps(s)}(dy)ds, \ \ t\in [0,T].
\end{equation*}
By Theorem \ref{teor:expHQ}, if $m=2,$ it is enough to have $\int_E\varphi_i(y)F_i(dy)<+\infty, \ i=0,1,$ to guarantee that $Z^\varphi$ is a $\Fil$-martingale. In particular, $\Exp[Z_T^\varphi]=1$ and we have $\varphi\in\Theta.$
\end{remark}

\begin{corollary}\label{lemrhodis}
The compensator $\rho(dy,dt)$ of the $E$-marked point process $\gamma(dy,dt)$ satisfies $\rho(dy,dt)=F_{\eps(t-)}(dy)\lambda_{\eps(t-)}\,dt,$ a.s.
\end{corollary}

\begin{proof}
Using Theorem \ref{teor:expHQ} with $f_i=\mathbf{1}_A,$ for $A\in\B(E),$ it follows that the process $M_t(A)$ defined as
\begin{align*}
 M_t(A):&=N_t(A)-\int_0^tF_{\eps(s-)}(A)\lambda_{\eps(s-)}ds\\
  &=\sum_{n=1}^{N_t(E)}\mathbf{1}_{\set{Y_{\eps_n,n}\in A}}-\int_0^t\int_A F_{\eps(s)}(dy)\,\lambda_{\eps(s)}\,ds\\
  &=\sum_{n=1}^{N_t(E)}\mathbf{1}_A(Y_{\eps_n,n})-\int_0^t\int_E\mathbf{1}_A(y)F_{\eps(s)}(dy)\,\lambda_{\eps(s)}\,ds, \ \ t\geq 0,
\end{align*}
is a $\Fil$-martingale. Then, for all bounded non-negative  $\Fil$-predictable process $\set{\phi_t}_{t\geq 0},$ the stochastic integral
\[
\int_0^t\phi_s\,dM_s(A)=\int_0^t\phi_s\,dN_s(A)-\int_0^t\phi_sF_{\eps(s)}(A)\lambda_{\eps(s)}ds, \ \ t\geq 0,
\]
is also a $\Fil$-martingale. By the Monotone Convergence Theorem, we have
\[
\Exp\left[\int_0^\infty\phi_s\,dN_s(A)\right]=\Exp\left[\int_0^\infty\phi_sF_{\eps(s-)}(A)\lambda_{\eps(s-)}\,ds\right].
\]
Hence, the counting process $N_t(A)$ is an inhomogeneous Poisson process with (Markov modulated) stochastic intensity  $F_{\eps(t-)}(A)\lambda_{\eps(t-)}.$ The desired result follows from Corollary T4 (Integration Theorem) in Br\'{e}maud \cite[Chapter VIII]{bremaud}.
\end{proof}

\section{Examples}
\subsection{Logarithmic utility}
We illustrate the main result first by considering logarithmic utility functions.
\begin{lemma}\label{betalog}
Let $U_1(t,x)=U_2(x)=\ln x.$ Then, for all $\varphi\in\tilde{\Theta}$ and $x>0$ we have $\beta^{x,\varphi}(t,y)=0,$ a.s. for $\rho$-a.e. $(t,y)\in [0,T]\times E.$
\end{lemma}
\begin{proof}
In this case, we have $I_1(t,y)=I_2(y)=1/y$ and $\calX^\varphi(y)=(T+1)/y,$ for $y\in(0,\infty).$ Then, $\Y^\varphi(x)=(T+1)/x,$ for $x\in(0,\infty),$
\begin{align}
  c_t^{x,\varphi} &=\frac{x}{(T+1)H_t^\varphi}, \ \ t\in [0,T],\label{clog}\\
  G^{x,\varphi}&=\frac{x}{(T+1)H_T^\varphi}.\notag
\end{align}
Hence, $M_t^{x,\varphi}=x$ for all $t\in [0,T],$ and the desired result follows.
\end{proof}

\begin{theorem}\label{thmlog}
Let $x$ be fixed. Suppose  Assumption \ref{A1} holds true and that for each $i\in\calI,$ there exists $\bar{\pi}_i$ satisfying $1+\bar{\pi}_if_i(y)>0$ for all $y\in E$ and
\begin{equation}\label{pif2}
\mu_i-r_i+\lambda_i\int_E \frac{f_i(y)}{1+\bar\pi_i f_i(y)}\,F_i(dy)=0.
\end{equation}
Suppose further there exists $p>1$ such that
\[
\int_E \frac{1}{[1+\bar\pi_i f_i(y)]^{p}}\,F_i(dy)<+\infty, \ \ \forall i\in\calI.
\]
Let
\[
\hat{\pi}_t:=\bar\pi_{\eps(t-)} \ \mbox{ and } \ \ \hat{c}_t:=\frac{V_t^{x,\hat{\pi},0}}{T+1}, \ \ t\in [0,T].
\]
Then
\begin{itemize}
   \item[(a)] The portfolio-consumption pair $(\hat{\pi},\hat{c})$ is optimal for $U_1(t,x)=U_2(x)=\ln x,$

 \item[(b)] The optimal wealth process $V^{x,\hat{\pi},\hat{c}}$ satisfies
 \[
 V^{x,\hat{\pi},\hat{c}}_t=V_t^{x,\hat{\pi},0}-t\hat{c}_t=V_t^{x,\hat{\pi},0}\Bigl(1-\frac{t}{T+1}\Bigr), \ \ t\in [0,T],
 \]

 \item[(c)] The optimal value function satisfies
\[
\vartheta_i(x)=(T+1)\ln x-(T+1)\ln (T+1)-\Exp_i\left[\int_0^T\ln V_t^{1,\hat{\pi},0}\,dt+\ln V_T^{1,\hat{\pi},0}\right], \ \ x>0, \ \ i\in\calI.
\]
\end{itemize}
\end{theorem}
\begin{proof}
 Define $\hat\varphi_i(y):=1/[1+\bar{\pi}_if_i(y)].$ By (\ref{pif2}) and Remark \ref{martcondZ}, the process $\hat{\varphi}$ belongs to $\tilde{\Theta}.$ By Lemma \ref{betalog}, $\hat\varphi$ and $\hat\pi$ satisfy the assumptions of Theorem \ref{main}. Then the pair $(\hat\pi,c^{x,\hat{\varphi}})$ is optimal.

Using again (\ref{pif2}), we see that the differential of $(H_t^{\hat{\varphi}})^{-1}$ satisfies
\begin{align*}
  d\Bigl(\frac{1}{H^{\hat{\varphi}}_t}\Bigr)
  &=\frac{1}{H^{\hat{\varphi}}_{t-}}\Bigl\{\Bigl[r_{\eps(t)}
  +\lambda_{\eps(t-)}\int_E(\hat{\varphi}_{\eps(t-)}(y)-1)\,F_{\eps(t-)}(dy)\Bigr]\,dt+\int_E\Bigl(\frac{1}{\hat{\varphi}_{\eps(t-)}(y)}-1\Bigr)\,\gamma(dy,dt)\Bigr\}\\
  &=\frac{1}{H^{\hat{\varphi}}_{t-}}\left\{r_{\eps(t)}\,dt+\bar\pi_{\eps(t-)}\left[\bigl(\mu_{\eps(t)}-r_{\eps(t)}\bigr)\,dt+\int_{E} f_{\eps(t-)}(y)\,\gamma(dy,dt)\right]\right\}.
\end{align*}
Hence, the process $(H_t^{\hat{\varphi}})^{-1}$ is a modification of $V_t^{1,\hat{\pi},0}.$ In view of (\ref{clog}), we conclude  $\hat{c}=c^{x,\hat{\varphi}},$ and (a) follows. Assertion (b) follows from (\ref{xiV}) and (c) follows from Theorem \ref{main}, part (c).
\end{proof}
Finally, we consider the case of two regimes for the underlying Markov chain.
\begin{corollary}
Let now $m=2.$ Assume that for each $i=0,1$ there exists $\bar{\pi}_i$ satisfying $1+\bar{\pi}_if_i(y)>0$ for all $y\in E$ as well as condition (\ref{pif2}). Assume further
\[
\int_E \left[\frac{1}{1+\bar\pi_i f_i(y)}+\ln(1+\bar\pi_if_i(y))\right]\,F_i(dy)<+\infty, \ \ i=0,1.
\]
Then the optimal value functions $\vartheta_i(x),$ $i=0,1,$ satisfy
\begin{align*}
\vartheta_0(x)&=(T+1)\ln x-(T+1)\ln (T+1)\\
&\phantom{=}-\frac{1}{2\lambda}\left\{(\lambda_1\bar{d}_0+\lambda_0\bar{d}_1)\Bigl(T+\frac{T^2}{2}\Bigr)
+\frac{\lambda_0(\bar{d}_0-\bar{d}_1)}{2\lambda}\Bigl[T+\bigl(1-e^{-2\lambda T}\bigr)\Bigl(1+\frac{1}{2\lambda}\Bigr)\Bigr]\right\}
\end{align*}
and
\begin{align*}
\vartheta_1(x)&=(T+1)\ln x-(T+1)\ln (T+1)\\
&\phantom{=}-\frac{1}{2\lambda}\left\{(\lambda_1\bar{d}_0+\lambda_0\bar{d}_1)\Bigl(T+\frac{T^2}{2}\Bigr)
-\frac{\lambda_1(\bar{d}_0-\bar{d}_1)}{2\lambda}\Bigl[T+\bigl(1-e^{-2\lambda T}\bigr)\Bigl(1+\frac{1}{2\lambda}\Bigr)\Bigr]\right\}
\end{align*}
where
\begin{equation*}
2\lambda:=\lambda_0+\lambda_1,\quad \bar\eta_i:=\int_{E} \ln(1+\bar\pi_if_i(y))\,F_i(dy),\quad\bar{d}_i:=\bar{\pi}_i\mu_i+(1-\bar\pi_i)r_i+\lambda_i\bar{\eta}_i, \ \ i=0,1.
\end{equation*}
\end{corollary}

\begin{proof}
Observe that
\[
\ln V_t^{1,\hat{\pi},0}=\int_0^t\left[\bar{\pi}_{\eps(s)}\mu_{\eps(s)}+\left(1-\bar\pi_{\eps(s)}\right)r_{\eps(s)}\right]\,ds
+\sum_{n=1}^{N_t(E)}\ln(1+\bar{\pi}_{\eps_n}f_{\eps_n}(Y_{\eps_n,n})), \ \ t\in[0,T],
\]
is a jump-telegraph process with alternating tendencies $\bar{\pi}_i\mu_i+(1-\bar\pi_i)r_i,$ $i=0,1.$ The desired result follows noting that
\[
\Exp_i\left[\int_0^T\ln V_t^{1,\hat{\pi},0}\,dt\right]=\int_0^T\Exp_i\bigl[\ln V_t^{1,\hat{\pi},0}]\,dt
\]
and using Theorem \ref{thm:meanZG} and Theorem \ref{thmlog}, part (c).
\end{proof}

\begin{example}
To illustrate the above result, let us assume $\mu_1<0<\mu_0$, $f_0(y)=f_1(y)=y$, $r_0,r_1\geq0$ and $r_0<\mu_0$. For regime $i=0$ we fix a parameter $\eta_0>0$ and assume $Y_{0,n}$ is supported on the interval $(-1,0)$ with distribution
\[
F_0(dy)=\eta_0(1+y)^{\eta_0-1}\mathbf{1}_{(-1,0)}(y)\,dy.
\]
The expected value is given by $\Exp[Y_{0,n}]=-\frac{1}{1+\eta_0}<0$. Notice that  the random variable $-V_{0,n}:=-\ln(1+Y_{0,n})$ is exponentially distributed with density function $\eta_0e^{-\eta_0v}, \ v>0.$

For regime $i=1$ we fix another parameter $\eta_1>1$ and assume $Y_{1,n}$ is supported on the interval $(0,\infty)$ with distribution
\[
F_1(dy)=\eta_1(1+y)^{-(\eta_1+1)}\mathbf{1}_{(0,\infty)}(y)\,dy.
\]
The expected value is given by $\Exp[Y_{1,n}]=\frac{1}{\eta_1-1}>0.$ In this case $V_{1,n}:=\ln(1+Y_{1,n})$ is exponentially distributed with density function $\eta_1e^{-\eta_1v}, \ v>0.$

For each regime we consider the following portfolio constraints: for $i=0$ we restrict $\pi$ to the interval $(-\infty,1),$ that is, borrowing (or short-selling of the money account) is not allowed, and for $i=1$ we restrict $\pi$ to the interval $(0,\infty),$ that is, short-selling of the risky asset is not allowed.

In view of these constraints, we define
\begin{equation}
\begin{split}
g_0(\pi):&=\mu_0-r_0+\lambda_0\int_{E}\frac{y}{1+\pi y}F_0(dy) \\
&=\mu_0-r_0+\lambda_0\eta_0\int_{-1}^0\frac{y(1+y)^{\eta_0-1}}{1+\pi y}dy,\quad \pi\in (-\infty,1),
\end{split}
\end{equation}
and
\begin{equation}
\begin{split}
g_1(\pi):&=\mu_1-r_1+\lambda_1\int_{E}\frac{y}{1+\pi y}F_1(dy) \\
&=\mu_1-r_1+\lambda_1\eta_1\int_{0}^\infty\frac{y(1+y)^{-(\eta_1+1)}}{1+\pi y}dy,\quad \pi\in (0,\infty).
\end{split}
\end{equation}
Both maps $g_0$ and $g_1$ are strictly decreasing on their respective domains
\begin{align*}
g_0'(\pi)&=-\lambda_0\eta_0\int_{-1}^0\frac{y^2(1+y)^{\eta_0-1}}{(1+\pi y)^2}dy<0, \ \ \forall \pi\in (-\infty,1), \\
g_1'(\pi)&=-\lambda_1\eta_1\int_{0}^\infty\frac{y^2(1+y)^{-(\eta_1+1)}}{(1+\pi y)^2}dy<0, \ \ \forall \pi\in (0,\infty).
\end{align*}

\begin{figure}[hb]
\centering
\includegraphics[scale=0.75]{Figure22.eps}
\caption{\small Plots of $g_i(\pi)$ for  different values of $\mu_i$ and $\eta_i$.}
\end{figure}
Moreover,
\begin{equation*}
\lim_{\pi\to -\infty}g_0(\pi)=\mu_0-r_0>0, \quad \lim_{\pi\to +\infty}g_1(\pi)=\mu_1-r_1<0.
\end{equation*}
Hence, if there exists a pair $(\tilde\pi_0,\tilde\pi_1)$ satisfying $g_0(\tilde\pi_0)<0$ y $g_1(\tilde\pi_1)>0$, we can guarantee existence of solutions to equations $g_0(\pi)=0$ and $g_1(\pi)=0.$

We solved these equations numerically with $r_0=r_1=1\%,$ $\lambda_0=0.3$ and $\lambda_1=1.2.$ Figure 2 (above) shows plots of $g_i(\pi)$ for four different values of $\mu_i$ and $\eta_i,$ which have been chosen so that the optimal portfolio proportions are given by $\bar\pi_0=-1.0, -0.5, 0.0, 0.5$ and $\bar\pi_1=0.2, 0.5, 0.8, 1.0$ for each regime respectively. Figure 3 (below) plots the optimal portfolio proportion $\bar\pi_i$ as a function of $\mu_i,$ for different values of $\eta_i.$

\begin{figure}[hb]
\centering
\includegraphics[scale=0.75]{Figure23.eps}
\caption{\small Plots of optimal $\bar{\pi}_i$ as function of $\mu_i$, for different values of $\eta_i$.}
\end{figure}

\end{example}

\subsection{Fractional power utility}

Finally, we consider CRRA fractional power utility functions $U_1(t,x)=U_2(x)=\frac{x^\alpha}{\alpha}$ with $\alpha\in(0,1)$ fixed.

\begin{lemma}\label{betapower}
Let $\varphi\in\tilde{\Theta}$ be such that, for all $i\in \mathcal{I},$
\begin{equation}\label{varphilambda}
\int_E\left[\varphi_i(y)^{\frac{\alpha}{\alpha-1}}-\frac{\alpha}{\alpha-1}\varphi_i(y)\right]\,F_i(dy)=\frac{\alpha}{\alpha-1}\left(\frac{r_i-\lambda_i}{\lambda_i}\right).
\end{equation}
Then, for all $x>0,$ we have
\[
\beta^{x,\varphi}(t,y)= Y_{t-}^{x,\varphi}\bigl(\varphi_{\eps(t-)}(y)^{\frac{\alpha}{\alpha-1}}-1\bigr), \ \ \rho\mbox{-a.e.} \  (t,y)\in [0,T]\times E.
\]
\end{lemma}
\begin{proof}
Notice first that under condition (\ref{varphilambda}) the process $(H^\varphi)^{\frac{\alpha}{\alpha-1}}$ is a $\Fil$-martingale. Indeed, using integration formula for Marked point processes, we have
\begin{align*}
d\left[(H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\right]
&=(H_{t-}^\varphi)^{\frac{\alpha}{\alpha-1}}\left\{\frac{\alpha}{\alpha-1}\Bigl[-r_{\eps(t)}-\lambda_{\eps(t)}\int_E(\varphi_{\eps(t)}(y)-1)\,F_{\eps(t)}(dy)\Bigr]\,dt\right.\\
&\phantom{AAAAAAAAA}+\left.\int_E(\varphi_{\eps(t-)}(y)^{\frac{\alpha}{\alpha-1}}-1)\,\gamma(dy,dt)\right\}\\
&=(H_{t-}^\varphi)^{\frac{\alpha}{\alpha-1}} \int_E\bigl(\varphi_{\eps(t-)}(y)^{\frac{\alpha}{1-\alpha}}-1\bigr)\,\tilde\gamma(dy,dt).
\end{align*}
Then
\begin{equation*}
\calX_i^\varphi(y)=y^{\frac{1}{\alpha-1}}\Exp_i\left[\int_0^T (H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\,dt+(H_T^\varphi)^{\frac{\alpha}{\alpha-1}}\right]=y^{\frac{1}{\alpha-1}}(T+1).
\end{equation*}
It follows that
\[
\Y_i^{\varphi}(x)=\Bigl(\frac{x}{T+1}\Bigr)^{\alpha-1}, \quad x>0, \ \ i=0,1.
\]
and
\begin{align}
  c_t^{x,\varphi} &=\frac{x}{T+1}(H_t^\varphi)^{\frac{1}{\alpha-1}}, \ \ t\in [0,T],\label{cpower}\\
  G^{x,\varphi}&=\frac{x}{T+1}(H_T^\varphi)^{\frac{1}{\alpha-1}}.\notag
\end{align}
Hence
\[
Y_t^{x,\varphi}=\frac{x}{T+1}\Bigl[(H_t^\varphi)^{\frac{\alpha}{\alpha-1}}+\int_t^T(H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\,ds\Bigr]=x (H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\Bigl(1-\frac{t}{T+1}\Bigr)
\]
and
\[
M_t^{x,\varphi}=x (H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\Bigl(1-\frac{t}{T+1}\Bigr)+\int_0^t\frac{x}{T+1}(H_s^\varphi)^{\frac{\alpha}{\alpha-1}}\,ds.
\]
Therefore, the differential of $M^{x,\varphi}$ satisfies
\begin{align*}
dM_t^{x,\varphi}&=x\left[\frac{-1}{T+1}(H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\,dt+\Bigl(1-\frac{t}{T+1}\Bigr)\,d\left[(H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\right]
+\frac{1}{T+1}(H_t^\varphi)^{\frac{\alpha}{\alpha-1}}\,dt\right]\\
&=x\Bigl(1-\frac{t}{T+1}\Bigr)(H_{t-}^\varphi)^{\frac{\alpha}{\alpha-1}} \int_E\bigl(\varphi_{\eps(t-)}(y)^{\frac{\alpha}{1-\alpha}}-1\bigr)\,\tilde\gamma(dy,dt)\\
&=Y_{t-}^{x,\varphi} \int_E\bigl(\varphi_{\eps(t-)}(y)^{\frac{\alpha}{1-\alpha}}-1\bigr)\,\tilde\gamma(dy,dt)
\end{align*}
and the desired result follows.
\end{proof}

\begin{theorem}\label{thmpower}
Let $x$ be fixed. Suppose  Assumption \ref{A1} holds  and that for each $i\in\calI,$ there exists $\bar{\pi}_i$ satisfying $1+\bar{\pi}_if_i(y)>0$ for all $y\in E,$
\begin{equation}\label{pif3}
\mu_i-r_i+\lambda_i\int_E \frac{f_i(y)}{[1+\bar\pi_i f_i(y)]^{1-\alpha}}\,F_i(dy)=0
\end{equation}
and
\begin{equation}\label{pif4}
\int_E\Bigl([1+\bar\pi_i f_i(y)]^{\alpha}-\frac{\alpha}{\alpha-1}[1+\bar\pi_i f_i(y)]^{\alpha-1}\Bigr)\,F_i(dy)=\frac{\alpha}{\alpha-1}\left(\frac{r_i-\lambda_i}{\lambda_i}\right).
\end{equation}
Let $\hat{\pi}_t:=\bar\pi_{\eps(t-)}$ and
\[
\hat{c}_t:=\frac{x}{T+1}\exp\left(\frac{-1}{\alpha}\int_0^t\int_E\left[1+\bar\pi_{\eps(s)}f_{\eps(s)}(y)\right]^\alpha F_{\eps(s)}(dy)\,\lambda_{\eps(s)}ds\right)
\prod_{n=1}^{N_t(E)}\left(1+\bar\pi_{\eps_n}f_{\eps_n}(Y_{\eps_n,n})\right)
\]
for $t\in [0,T].$ Then the portfolio-consumption pair $(\hat{\pi},\hat{c})$ is optimal for $U_1(t,x)=U_2(x)=\frac{x^\alpha}{\alpha}.$
\end{theorem}
\begin{proof}
Define $\hat\varphi_i(y):=1/[1+\bar{\pi}_if_i(y)]^{1-\alpha}.$ By (\ref{pif3}) and Remark \ref{martcondZ}, the process $\hat{\varphi}$ belongs to $\tilde{\Theta}.$ By Lemma \ref{betapower}, $\hat\varphi$ and $\hat\pi$ satisfy the assumptions of Theorem \ref{main}. Then the pair $(\hat\pi,c^{x,\hat{\varphi}})$ is optimal. Using (\ref{cpower}) and (\ref{pif4}),  we conclude that $\hat{c}=c^{x,\hat{\varphi}}$ and the desired result follows.
\end{proof}

\begin{remark}
Notice that both conditions (\ref{pif3}) and (\ref{pif4}) turn into a very specific constraint on the mean rate of return $\mu_i.$ Indeed, if there exists $\bar\pi_i$ satisfying (\ref{pif4}), then $\mu_i$ must satify condition (\ref{pif3}) for this value of $\bar\pi_i.$

On the other hand, if condition (\ref{pif3}) holds, it can be plugged into (\ref{pif4}) to obtain
\begin{equation*}
\int_E \frac{1}{[1+\bar\pi_i f_i(y)]^{1-\alpha}}\,F_i(dy)=\frac{1}{\lambda_i}[\bar\pi_i(1-\alpha)(\mu_i-r_i)+\alpha(\lambda_i-r_i)], \ \ i=0,1.
\end{equation*}
\end{remark}

To conclude, we have the following result for the two-regime case, which follows easily from (\ref{Vpi0}), Theorem \ref{thm:expZG} and Theorem \ref{betapower}.
\begin{corollary}
Let $m=2.$ Assume that consumption is not allowed i.e. $c_t=0$ for all $t\in [0,T],$ and for each $i=0,1$ there exists $\bar{\pi}_i$ satisfying $1+\bar{\pi}_if_i(y)>0$ for all $y\in E$ as well as conditions (\ref{pif3}) and (\ref{pif4}).
Then the optimal value functions $\vartheta_i(x),$ $i=0,1,$ satisfy
\[
\vartheta_0(x)=\frac{x^\alpha}{\alpha}e^{T(\bar\nu-\bar\lambda)}\Bigl[\cosh\bigl(T\sqrt{D}\,\bigr)
+\frac{\bar\mu-\bar\zeta+\lambda_0\phi_0}{\sqrt{D}}\sinh\bigl(T\sqrt{D}\,\bigr)\Bigr]
\]
and
\[
\vartheta_1(x)=\frac{x^\alpha}{\alpha}e^{T(\bar\nu-\bar\lambda)}\Bigl[\cosh\bigl(T\sqrt{D}\,\bigr)
-\frac{\bar\mu-\bar\zeta-\lambda_1\phi_1}{\sqrt{D}}\sinh\bigl(T\sqrt{D}\,\bigr)\Bigr]
\]
where
\begin{align*}
\bar\nu &:=\frac{\alpha}{2}\left[\bar\pi_0\mu_0+(1-\bar\pi_0)r_0+\bar\pi_1\mu_1+(1-\bar\pi_1)r_1\right]\\
\bar\mu &:=\frac{\alpha}{2}\left[\bar\pi_0\mu_0+(1-\bar\pi_0)r_0-\bar\pi_1\mu_1-(1-\bar\pi_1)r_1\right]\\
\bar\lambda &:=\frac{\lambda_0+\lambda_1}{2}\\
\bar\zeta &:=\frac{\lambda_0-\lambda_1}{2}\\
\phi_i&=\int_E[1+\bar\pi_i f_i(y)]^\alpha\,F_i(dy), \ \ i=0,1,
\end{align*}
and $D=(\bar\mu-\bar\zeta)^2+\lambda_0\lambda_1\phi_0\phi_1$.

\end{corollary}

redpajama_set_name: RedPajamaArXiv


text:
Q: How to popBackStackImmediate() a fragment and pass data from the fragment to another fragment within same activity I want to remove a current fragment in a button click by using popBackstackImmediate() and pass data from the removing fragment to the previous fragment. How can i achieve this?

A: Fragments generally shouldn't perform fragment transactions on the parent activity's fragment manager. It creates an unnecessary tight coupling in code.
If you reorganize the code the following way, then this solution becomes a bit easier to recognize:
class MyFragmentB extends Fragment {
  private Callback mCallback;

  public interface Callback {
    void dataPassback(String somedata);
  }

  @Override
  public void onAttach(Activity activity) {
    super.onAttach(activity);

    try {
        mCallback = (Callback) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString()
                + " must implement MyFragmentB.Callback");
    }
  }
  ...
}

class MyActivity extends Activity implements MyFragmentB.Callback {
  @Override
  public void dataPassback(String somedata){
    // 1) pop backstack

    // 2) find fragment A
    MyFragmentA fragmentA;

    fragmentA.setData(someData);
  }
  ...
}

Good practices for fragment communication is defined in the documentation.

redpajama_set_name: RedPajamaStackExchange


The often severe behaviour of Zen masters to their students is part of a wider process of the discovery of the student's inner strength; which she believes she does not have but is in fact the 'treasure of the house' - already present but unrealised.
There is a Zen saying to the effect that a Zen master should have the "face of a lion and the legs of a cow".
When a monk* goes for interview, she enters into a confrontation with the master. The rough treatment we read about in the stories describing these encounters is fierce. Sometimes there is shouting; sometimes, hitting. The monk submits her answers, and – more often than not – the master snatches them away with great force.
On the face of it, such behaviour appears quite cruel. Yet the master is motivated by a deep compassion for his students. He knows he must play this role for them if they are to succeed in their endeavours.
Rather than deter the monk, the master's actions and rough treatment can trigger a fierce determination in her: this is precisely what the master is after. This determination is a source of great strength, and novices with more timid temperaments may come to realise that they really do have access to such strength – often for the first time in their lives. Thus the master's kindness toward his students is as the cow's toward her calf.
There is a story that tells of a man who possesses a wonderful jewel, and who is in the habit of taking it out frequently and polishing it, the better to then admire it. One day, he takes a walk by the sea, and looks at the jewel glinting in the sun. The glinting attracts a dragon who lives at the bottom of the sea, and who is also fond of lovely jewels. The dragon rises up and out of the water, snatches the jewel and descends back to its palace on the seabed.
Now, dragons live for a very long time, and this one could tell from the man's voice that he really meant what he said. The dragon could well picture its great palace standing in a dry and sandy desert one day; so it leaps once more into the sky, spits out the jewel and plunges back down to the depths.
The man picks up his jewel, polishes it dry and goes on his way.
This magical story conveys something of the great power of a heartfelt vow. But the shallow 'I' does not generally feel up to all this. Such a vow – like the one made by the possessor of the jewel, or that made by the ascetic Gautama before sitting under the Bodhi tree – must come from the bottom of the heart.
In daily life practice, I rarely feel such strength; instead, half-heartedness creeps in easily. When difficulties arise, I might abandon the practice, thinking: It's all too much at the moment. The practice becomes like a fair-weather friend, instead of a stalwart ally who stands by us through thick and thin.
The secret of training is to use these difficulties, and to make use of opportunities as well, to progress: to see for ourselves that, in such moments, rather than allowing despair to take hold, we can turn toward the Buddha with hands folded and bow, asking for help – and then face doing what needs to be done. Thus we can discover a strength that goes much deeper than 'I', which can be trusted if 'I' can just get out of the way sufficiently.
For it is already our inheritance.
* This article uses the term 'monk' for any person who is ordained.


One must wonder if further water park enhancements or slides are planned for the future.
To be honest, that article was the first mention of "Sunlite Adventure" I have heard. I have been down at Coney nearly two dozen times this year and have heard no mention of that, and the Coney website makes no mention of it either.
I love the potential for Coney. I honestly think, even despite Kings Island being a major competitor, that Coney could be more on the map. I love the location, first of all (although historically it's not the best) and I love the old-time feel to it. It's like a permanent state fair. Sunlite "Adventure" could definitely use some new water slides - or, maybe, more pools or a lazy river?
It's been Sunlight Pool for a long time. Even if they add a lot of slides, no one is going to think it's just a pool.
Word from under the Black Hat is that they hired a marketing/PR agency. This is the kind of garbage they feed you.
If any of you end up owning an amusement park... don't do that.
A bit late to this topic. The arcade/midway area has been re-arranged, with several games removed - Bowler Roller, Poster Dart, and Balloon Dart if memory serves - and others taking their place.
Notably, the number of Skee Ball machines has been halved, but they are now more visible (facing the restrooms/Scrambler in the middle of the midway). Presumably this was due to the poor reliability that the machines experienced last season. Many complaints were voiced about missing balls, undispensed tickets, and eaten tokens. But hopefully that is all better now.
Additionally, there's a large inflatable ride/game in the middle of the arcade game section (the covered area where picnic tables are/were). I'm not entirely sure how it works but it seems to involve jumping over an inflatable arm and not falling.
I'm not sure what the official name for it is, but the games trailer known by some as "The Pit" now features a second Duck Pond game, as I was told. The original one in the midway was a HUGE hit with younger kids, so I hope that this other location succeeds as well.


text:
Former Vikings defensive end Everson Griffen re-opened questions about the Vikings' 2018 offseason quarterback search over the weekend, tweeting – then deleting and apologizing – a negative opinion about Kirk Cousins and suggesting Vikings head coach Mike Zimmer never wanted Cousins on the Vikings in the first place.
"Ask ZIMMER if he wanted Kirk?????," Griffen said in the second of three tweets, adding in his final tweet: "He will tell you the truth??? Who wanted Kirk Cousins???? Take your guess???"
Though Griffen never answer his own question, the obvious insinuation/guess is that it was Vikings GM Rick Spielman who ultimately got his way when the Vikings pursued and signed Cousins to a three-year, fully guaranteed $84 million deal (one that has subsequently been extended through 2022).
In two later tweets, Griffen said: "I'm sorry for posting that about Kirk. It's not right for me to call people out. I apologize for hurting him. I'm very grateful and thankful. I'm sorry for saying anything negative. I love this organization. Vikings will always have a place in my heart. If you want it, go get it. All love for for real."
It's a little hard, though, to put that genie back in the bottle. (And you'll notice Griffen didn't take back what he said. He only felt bad for saying it.)
You'll recall that Griffen and the Vikings parted ways before the 2020 season after 10 seasons together. He signed with Dallas before being traded to Detroit in late October – with whom he played against the Vikings twice. The first time, he took exception to Zimmer calling him a "good" player in the week leading up to the game, which the Vikings won handily. The second time, Griffen's Lions allowed more than 400 yards passing to Cousins in a 37-35 Vikings victory.
But it was still a pretty jarring suggestion from Griffen, even if we are used to him creating a stir.
Then again, it's not really shocking to think that Griffen is correct about the Vikings' pursuit of Cousins if we recall how the 2018 offseason played out. Speaking at the scouting combine in Indianapolis in early March that year, Zimmer delivered this key quote:
"This year obviously the offense was much better, but part of the reason we've been winning games and staying in games is because we've been playing good on defense and we've been a smart team and all those things. I want to be really careful about taking away from our strength and saying, 'OK, we're not going to be able to do this and we're not going to be able to do that anymore because of financial reasons or something else.'"
Two weeks later, the Vikings gave Cousins the big money deal – eschewing lower-cost alternatives like trying to re-sign Case Keenum or Teddy Bridgewater, or even trying to draft a quarterback.
If we re-read Griffen's last two deleted tweets with that context, the conclusion of the full narrative is not necessarily that Zimmer didn't want or doesn't like Cousins specifically as a QB, but more so that he did not (and still does not) like the idea of a high-priced quarterback eating up cap space and other resources that could otherwise be spent maintaining strength on his side of the ball (a side that had led to 39 wins in his first four seasons as head coach). Maybe with a different choice in 2018, Griffen would still be with the Vikings?
The first deleted tweet, in which Griffen basically says he doesn't think Cousins is a good QB with one simple profane phrase, is another story – but we shouldn't necessarily mistake that as Zimmer's opinion of Cousins as well. (Pro Football Focus, by the way, would disagree with Griffen's assessment).
More so, this is a good reminder that however long Zimmer and Spielman remain in high positions of power with the Vikings, when it is all over the 2018 offseason will be recalled as their defining moment. Remember, that's also the offseason when – a little over a month before Cousins signed — John DeFilippo was hired as offensive coordinator. That has come to be viewed as a Spielman hire that Zimmer ultimately agreed to, and an experiment that lasted less than a full season.
Maybe we'll learn somewhere down the road that 2018 was the start of a power tussle between Zimmer and Spielman over the direction of the franchise.
For now, we know what the Vikings are: a team whose strength, at least in 2020, shifted from defense to offense. They are also a team that has used a lot of cap space and draft resources – six of their last nine picks in the top three rounds – on offense. And the result this season was a 7-9 record that can only in part be explained by defensive injuries. Whether the Vikings can become serious contenders again in 2021 will depend on both sides of the ball – and could determine the fates of Zimmer and Spielman.
At this point, it doesn't matter too much if Zimmer wanted Cousins. Barring some sort of unlikely trade, that's his QB now. But we should also remember something else he said back at the combine in 2018 about the quarterback search:
"It's important for myself and Rick and the organization that we pick the right guy that is going to help us to continue to move forward," Zimmer said. "If we don't do that, then I'll probably get fired."
Belichick turns down Presidential Medal of Freedom
Patriots coach Bill Belichick announced Monday night that he will not accept the nation's top civilian honor.
Marquee QBs ready to claim Super Bowl; Rams ready to blow them up
Pederson out as Eagles coach

redpajama_set_name: RedPajamaCommonCrawl


To enter Jomblang cave, we need to master single rope technique (SRT). Everyone who wish to do caving in this place should use special equipments based on the caving safety standard in a vertical cave and should also be accompanied by the experienced caving trainers. After wearing coverall, boot, helmet, and headlamp, a trainer set SRT set on our body while explaining the name of each tool and its function. The single rope technique equipments consisted of seat harness, chest harness, ascender / croll, auto descender, footloop, jammer, carabiner, long cowstail, and short cowstail.
An adventure to the deep part of the earth was soon started by leaving the basecamp to get to the edge of the cave as the track. There were some tracks in Jomblang cave with various heights, from 40 up to 80 meters. Since this was the very first time for us to do vertical caving, the shortest track, known as the VIP one, was chosen. The first 15 meter from the VIP terrace was a slope that was possibly stepped, and we continued to go down on a 20 meter rope to get to the bottom of the cave. The feeling of scared and nervous when we hung in the air was suddenly disappear when we stepped our feet on the ground.
Surprisingly, the view in front of us was awesome. When we were above, we could only see barren region with hardwood and when we were hanging on the rope to get to the bottom, we could only see karst, but in the bowl of Jomblang cave we could really see the green view of fertile and dense vegetation.
Various kinds of moss, fern, bush, and big trees densely grew. A forest with different vegetation from the land above it was usually called ancient forest. Since the geological process of the land happening in the past, those vegetations were continuously growing up to now.


text:
Where Do You Fly Into To Go To The Great Barrier Reef? (Nearest Airport To Fly)
By Russell BowyerPosted in Fun, Liveaboard, Scuba TravelTagged What country is home to the Great Barrier Reef, What is the closest city to the Great Barrier Reef, What ocean is home to the Great Barrier Reef, Where do you fly into to go to the Great Barrier ReefNo Comments on Where Do You Fly Into To Go To The Great Barrier Reef? (Nearest Airport To Fly)
This post contains affiliate links, which means I may receive a small commission, at no cost to you, if you make a purchase through a link.
1 Which is the best airport in Australia to fly into for diving the Great Barrier Reef
1.1 What country is home to the Great Barrier Reef?
1.1.1 More about the Great Barrier Reef
1.2 What is the closest city to the Great Barrier Reef?
1.2.1 Day boats from Cairns are not the only way to visit The Great Barrier Reef
2 Great Barrier Reef dive liveaboards table
2.1 How long does it take to get from Cairns to the Great Barrier Reef?
2.2 What ocean is home to the Great Barrier Reef?
2.3 What about getting to the Great Barrier Reef from other Australian cities?
2.3.1 How to get to Great Barrier Reef from Sydney
2.3.2 What about the time to drive between Sydney and Cairns?
2.3.3 How to get to Great Barrier Reef from Perth
2.3.4 Driving from Perth to Cairns
2.3.5 How to get to Great Barrier Reef from Melbourne
2.3.6 Driving between Melbourne and Cairns
2.4 What is the closest airport to Whitsundays?
Which is the best airport in Australia to fly into for diving the Great Barrier Reef
Most travellers have heard of the Great Barrier Reef. But not all travellers would know how to get there. This article is about 'where do you fly into to go to the Great Barrier Reef?'
The best airport to fly to for visiting the Great Barrier Reef is Cairns international airport. Cairns is in the northern part of the State of Queensland and is the closest coastal town to the Great Barrier Reef. You can either get a direct international flight into Cairns, or get a domestic flight from one of the other Australian cities, like Sydney, Perth or Melbourne.
The best way to dive the Great Barrier Reef, Australia is by a scuba diving liveaboard, especially the outer reefs. You can check the latest and best deals on Great Barrier Reef liveaboards using the following window:
What country is home to the Great Barrier Reef?
Just in case you've asked the question about what country is home to the Great Barrier Reef. Let's first cover-off on that question.
The Great Barrier Reef is located in the Coral Sea,. The Coral Sea is located off the coast of Queensland, Australia. Queensland is north of Sydney and is a flight of three hours and 10 minutes.
More about the Great Barrier Reef
The Great Barrier Reef is the largest coral reef system in the world. It is composed of nearly 3,000 individual reefs.
Over the distance of around 2,300 kilometres (1,400 miles) which the Great Barrier Reef stretches, there are around 900 islands too. Some of which you can visit from mainland Australia.
What is the closest city to the Great Barrier Reef?
If you are arranging your trip to visit the Great Barrier Reef, you need to know the closest city to fly to.
Cairns is in the tropical North Queensland area. Which is the easiest place to fly to for visiting the Great Barrier Reef. Plus it's the closest coastal city to this wonder of the world.
Base yourself in Cairns and you'll be able to use the day boats to visit the reef each day.
Cairns is often referred to as the 'Gateway to the Great Barrier Reef.'
Cairns airport is an international airport accepting flights from outside of Australia. You can get flights to Cairns from the UK and the United States and other places around the world.
But also, there are many internal domestic flights that fly from other Australian cities too. See below for more details on how to get to Cairns from other cities in Australia.
Day boats from Cairns are not the only way to visit The Great Barrier Reef
But of course, day boats are not the only way to get to and experience the wonders of The Great Barrier Reef.
In addition to day-visits, you can also join a live aboard boat trip too. The benefits of a liveaboard trip to the Great Barrier Reef includes seeing more of the reef. Plus you'll get to visit some of the reef area that's simply not possible to get to from a day boat.
If you would like to scuba dive the Great Barrier Reef from a liveaboard boat, you'll see much more and scuba dive more.
Great Barrier Reef dive liveaboards table
This list of Australia Great Barrier Reef liveaboards is in descending customer rating order, followed by Scuba Diving Luxury Rating (SDE Lux Rating, see below), so the liveaboards with the highest customer rating and the best SDE lux rating will be at the top of the list. If you want to change the list order, use the "Sort by" dropdown below.
Please select a column to search in.
Please type in something to search for.
Search: (select) Discover Liveaboard Customer Rating SDE Lux Rating % Flexible Booking Dive Courses Dietary Requirements Nitrox Gear Rental
Sort by: Discover Liveaboard Customer Rating Flexible Booking Nitrox SDE Lux Rating % Dive Courses Dietary Requirements Gear Rental
Total Records Found: 6, showing 7 per page
Discover Liveaboard
SDE Lux Rating %
Flexible Booking
Review: MY Spoilsport; Book: MY Spoilsport 9.4 73% YES YES YES YES YES
Review: MY Spirit of Freedom; Book: MY Spirit of Freedom 9.3 83% YES YES YES YES YES
Review: Coral Sea Dreaming; Book: Coral Sea Dreaming 9.2 62% YES YES YES NO YES
Review: MY Pro Dive Cairns; Book: MY Pro Dive Cairns 9.2 52% YES YES YES YES YES
Review: Rum Runner; Book: Rum Runner 9 44% YES YES YES NO YES
Review: MY Ocean Quest; Book: MY Ocean Quest 9 40% YES YES YES YES YES
The Scuba Diving Earth Luxury Rating (SDE Lux Rating) is explained on each liveaboard review when you click the "Discover Liveaboard" link, and is my own Liveaboard Luxury Rating I've assigned to all liveaboards. Choosing between liveaboards is helped by customer scores, and if you get stuck choosing between two or three liveaboards, where each one has a high customer score out of 10, you can use the SDE Luxury Rating to help narrow down your choice.
Think about it like using Booking.com when searching for the best hotel. Booking.com also use a customer score where each customer rates hotels out of 10. This is similar to the liveaboard customer rating, which is also rated out of 10. But let's say you only like to stay in hotels rated 8 and above on Booking.com, but you also want the hotel to have WIFI or parking, or to have a swimming pool etc. The features each hotel has is usually secondary to the score out of 10.
How long does it take to get from Cairns to the Great Barrier Reef?
If your decision is to dive the Great Barrier Reef from Cairns each day, you'll enjoy a boat ride that takes anywhere from 45 minutes to 90 minutes to your first dive site.
The time your dive trip takes will depend on which area of the reef you are visiting for the day. Most dive boats depart from the port of Cairns at around 8:30 in the morning. You usually do two scuba dives on each trip, which means you'll return to port by around 5:30pm.
In between scuba dives, you'll also be able to partake in snorkelling too. You want to make the most of this most beautiful coral reef system whilst you are there.
What ocean is home to the Great Barrier Reef?
The Great Barrier Reef can be described as the largest living structure on earth. It is located in the Coral Sea, which is on the western most edge of the Pacific Ocean.
One of the seven wonders of the world and can be seen from space. The Great Barrier Reef is on most people's bucket list.
It's one of those places that I feel fortunate to have visited. In fact it's where I did my very first scuba dive.
What about getting to the Great Barrier Reef from other Australian cities?
It's likely that you'll want to visit other Australian cities on your trip down under. For most, Australia is a long way away. If you live in the UK, and depending on the city you fly to, Australia can take nearly 23 hours to fly to.
If you live in the United States, it also depends on whether you live on the east coast or west coast of America. Plus then which city you fly to from the United States.
So for most, do to the long distance long-haul flight, they want to make the most of their once in a life-time trip. Let's take a look at how to get to the Great Barrier Reef from places like Sydney, Perth and Melbourne.
How to get to Great Barrier Reef from Sydney
If your first chosen port of call is Sydney in New South Wales, the flight from there to Cairns is about three hours 10 minutes.
There are regular flights from Sydney. Plus these include a number of different airlines, like Qantas, Virgin Australia and Jetstar.
What about the time to drive between Sydney and Cairns?
You may be traveling around Australia and looking to drive between Sydney and Cairns. This is a 27 hour journey along the Gregory Highway. The distance is 2,419 kilometres (1,512 miles).
I suggest your journey from Sydney to Cairns takes in Brisbane, which is in the State of Queensland too.
How to get to Great Barrier Reef from Perth
Perth is my favourite city, as I lived there for a while. I know this sounds biased, but I recommend you visit Perth. Perth is situated in the State of Western Australia. It's almost the furthest away from Cairns you can get across the other side of Australia.
Flying time from Perth to Cairns is just over four hours. The same airlines, including Qantas, Virgin Australia and Jetstar fly between these two Australian cities.
More Reading: How long should you wait to fly after diving? (What's safe?)
Driving from Perth to Cairns
If however you have decided to drive to Cairns from Perth, this is a mammoth road-trip. You would be recommended to go around the coast and to visit other places on-route.
The time it takes will depend on which way you circumnavigate Australia and where you stop on the way.
How to get to Great Barrier Reef from Melbourne
Melbourne is south of Sydney in the State of Victoria. The flying time from Melbourne to Cairns is about three hours 20 minutes.
The same airlines fly regularly between Melbourne and Cairns, as they do from Sydney and Perth.
Driving between Melbourne and Cairns
If you decide to drive to Cairns from Melbourne, you will probably want to stop on the way in cities like Sydney and Brisbane.
Straight driving time is around 32 hours along the Gregory Highway. The distance is some 2,966 kilometres (1,854 miles).
In addition to flying to Cairns, you can also fly to one of the islands situated near the Great Barrier Reef. For example, you can fly to Whitsundays.
What is the closest airport to Whitsundays?
One of the best ways to get to the Whitsundays is to fly from Brisbane. You could get a connecting flight to Brisbane from one of the other cities already mentioned in this article.
The Whitsunday Island has a coastal airport, which is located near Proserpine. There are three airlines that fly to the Whitsundays, which includes Virgin Australia, Tiger Airways and Jetstar.
I hope you enjoyed this article about where do you fly into to go to the Great Barrier Reef
If this article hasn't answered all of your questions. If you have more questions either about snorkeling or scuba diving (or specifically about where do you fly into to go to the Great Barrier Reef), please comment below with your questions.
Book 3 Day Liveaboard Great Barrier Reef (4 GBR Liveaboards… If you're looking to book a 3 day 2 night liveaboard to The Great Barrier Reef, there are 4 liveaboards to choose from. Two of these are dive liveaboards offering…
2 Day Liveaboard Great Barrier Reef (2 Day 1 Night Outer… 2 day liveaboard Great Barrier Reef is available from two very different Great Barrier Reef liveaboards. This are the Ocean Quest liveaboard (up to 48 guests) and the Coral Sea…
Charter Dive Liveaboard Great Barrier Reef (A 20 Metre Motor… Cheap charter dive liveaboard Great Barrier Reef that gives you space and freedom to dive more or less where you want, when you want and as much as you want!…
Australia Liveaboards For Single Divers (Great Barrier Reef… Australia liveaboards for single divers include twin cabins with single beds for solo divers who are happy to share with other single travellers, who are also looking to scuba dive…
Best Shore Dives In Bonaire (Easy unlimited shore diving Bonaire)
Are There Sharks In The Great Barrier Reef? (What Sharks Do You See?)


text:
World Cup 2022: Latest stories, photos and videos
Updated 10 DEC 2022
8 WAGS in their best glad rags: Jack Grealish, Harry Kane & more footballers' stylish partners
It's official. WAG style is here to stay. Since the days of Posh and Becks, WAG fashion has become a sensation in its own right. It makes sense…
World Cup 2022: Heartwarming moment 11-year-old Harry Kane meets England hero David Beckham
This is the heartwarming picture which shows current England captain, Harry Kane, meeting former England captain, David Beckham, before he became a…
England and Chelsea star Mason Mount shares details on relationship status
All eyes have been on Mason Mount every time he takes to the pitch during the World Cup, playing for England in their bid to become champions.Ahead…
Izabel Goulart's WAG outfits in Qatar to cheer on fiancée Kevin Trapp have been next level
Brazilian supermodel Izabel Goulart has been a tour de force where WAG style is concerned.The fiancée of Germany's Kevin Trapp has been leading the…
Meet US soccer player Antonee Robinson's glamorous fiancée
Antonee Robinson will be cheered on by his fiancée and daughter when the USA faces off against England in the 2022 World Cup on Friday.The…
FIFA World Cup: 6 fascinating facts about Raheem Sterling
England football player Raheem Sterling is one of the team's hottest players to appear in the FIFA World Cup.MORE: What you need to host the perfect…
US soccer player Gio Reyna has some very famous parents – meet them here
Gio Reyna will be hoping to show off his soccer skills in USA's World Cup match against England on Friday after he was left on the bench during his…
Who is USA player Walker Zimmerman's wife? All you need to know
Walker Zimmerman is preparing for a massive match on Friday as the United States will take on England in the 2022 World Cup.One person who is sure to…
12 times Harry Kane was the cutest dad to his adorable kids
He may be tough on the pitch, but Harry Kane is a total softie with his children at home. The England star and team captain shares three kids with…
Peter Crouch opens up about mental health, lad culture and why it's time to speak up
Peter Crouch knows all too well how easy it is to sidestep important conversations for banter or simply put on a brave face, especially for men. "I'm…
World Cup 2022: Meet the England team's wives and girlfriends who will be cheering from the sidelines
The 2022 FIFA World Cup will see Englanf take on France in Saturday night's quarter-finals match, but who are the wives and girlfriends who will be…
David Beckham supports England team at Qatar World Cup amid controversy
David Beckham was joined by his best friend Dave Gardner at England's first game at the Qatar World Cup on Monday.The pair were seen showing their…
England star Raheem Sterling's extremely emotional family sacrifice revealed
England fans are looking ahead to the team's first World Cup match against Iran on Monday. But before the game kicks off, football fans have heaped…
USA player Gio Reyna's tragic past revealed after death of brother
Gio Reyna will undoubtedly be supported by his family when he and his teammates face off against Wales in USA's first game of the World Cup on…
What you need to host the perfect World Cup viewing party!
It's back! The world's greatest sporting event has returned - this time in the fall rather than summer - to entertain billions around the world. The…
Phil Foden's devastating injury that forced him to miss crucial game
Ahead of the World Cup, Manchester City footballer Phil Foden reflected on the upsetting injury that ruled him out of playing in the historic Euros…
Women's World Cup: The players who scored a very glitzy fashion campaign
England footballers Leah Williamson and Fran Kirby are busy in France right now, no doubt training hard as the team booked their place in the…
Prince William posts personal tweet following Women's World Cup glory
The Duke of Cambridge surprised royal watchers once again when he took to Twitter to post a personal message. The British royal led the…
England Lionesses captain Steph Houghton celebrates first wedding anniversary with husband Stephen Darby
As captain of England's Lionesses in the World Cup, Steph Houghton had plenty to celebrate this weekend as she saw her team through to the…
England footballer Harry Maguire announces the birth of his first child - see sweet post
Congratulations to England footballer Harry Maguire and his fiancée Fern Hawkins, who have welcomed their first child together. The Leicester City…
HELLO! Exclusives


The Internet Society welcomes the opportunity to contribute to the report that will be prepared by the Special Rapporteur on the protection and promotion of the right to freedom of opinion and expression, David Kaye. The topic of the report, "the legal framework governing the relationship between freedom of expression and the use of encryption to secure transactions and communications, and other technologies to transact and communicate anonymously online", is of utmost importance. Our comments are intended to highlight the central role that anonymity and confidentiality (e.g. through encryption) play in facilitating the exercise of fundamental human rights such as privacy and freedom of expression. We also wish to emphasize that policy efforts should focus on how to achieve law enforcement and other societal objectives in a world where anonymity and encryption exists, rather than striving to prevent its use. This will be a challenging task, but a necessary one, if individuals around the world are to be able to fully exercise their rights online.
The ability to communicate privately is a key aspect of the enjoyment of the right to privacy. If communications are unmonitored and ephemeral like a conversation between two individuals standing in an otherwise empty park, there may be no need for whispers, code or other means of ensuring confidentiality. However, where communications are, or could be, monitored, collected, intercepted, recorded, stored, retrieved and analysed in real time or at a later date, the ability to communicate confidentially becomes of paramount importance if individuals are to be able to fully exercise their right to privacy.
Every aspect of our online life depends on communication passing through third party intermediaries (e.g. ISPs, email providers, search engines, cloud services, e-commerce platforms, etc.): there is no digital equivalent to the "empty park".
In 2014, the Internet Society invited Internet users to share their needs and expectations with respect to confidential online communications through a survey. The results of that survey are available. We recorded 1347 responses. We consider this sample to be too small to be representative and assume there was a self-selection bias towards individuals with an interest in confidentiality. Nonetheless, the responses confirmed our hypothesis that the need for confidential online communication spans national borders and cultures.
One of the principal methods for achieving confidentiality for online communications is encryption. Other methods might include obfuscation  and social stenography . In light of the 2013 revelations concerning online pervasive surveillance activities, some application service providers adopted new measures to protect the confidentiality of their customers' communications from unauthorised third parties (e.g. Google and Yahoo encrypted data in transit between their respective data centres ). However, such "measures ("point to point", rather than end-to-end encryption) do not prevent the application service provider from viewing the communications. And …. if the application service provider (an intermediary) has access to unencrypted customer content, so might an attacker.
Trusted end-to-end encryption solutions allow Internet users to protect the confidentiality of their communications, not just from outsiders, but also from prying intermediaries. They also serve to reinforce user confidence, which is fundamental for a successful digital economy.
concerns about conclusions that may be drawn about them based on what they see and communicate on the Internet, to name a few.
Conversely, some may wish to hide their involvement in illegal activity, but even if anonymity is banned, they will find another way – e.g. by impersonating, and thereby, implicating innocent third parties. Banning anonymous access, perversely, might generate a black market in valid, 'clean' credentials, encouraging unscrupulous activity by bad actors and putting legitimate users at risk.
Anonymity is also an important enabler for the exercise of the right of freedom of expression in communities where criticism is viewed unfavourably. While criticism may be challenging, it is a healthy input to good governance (whether political or corporate). It also allows vulnerable communities to communicate freely without fear of repression or worse. Privacy, as some have put it, is a foundational right without which many other rights become impossible to exercise.
In this regard, it is important not to allow the debate over confidential communications to be reduced to a simple question of whether or not reliable encryption should be allowed. Encrypting the contents of a conversation between two individuals provides, at best, only partial confidentiality: it is still obvious to a third party that the conversation has taken place, and between whom, and when and where. This metadata can also be linked with other observable online activities, creating a "social graph" of the communicating parties' other acquaintances, and contributing to a digital profile that, over time, reveals their behaviour, characteristics and even future intentions.
Pseudonymity – Are the parties to a private conversation immediately identifiable, anonymous, or identifiable only if certain additional conditions are met?
Linkability – Is it possible to associate different online actions with the same user, over time, whether or not they wish this to be done?
Observability – Does looking at the network provide enough data to tell whether or not a given individual is active on it or not?
These principles are clearly articulated and explained in a paper by Dr Andreas Pfitzmann and Marit Hansen .
Cryptography pre-dates the Internet, however, the vast majority of Internet traffic is unencrypted. But, the "default" is beginning to shift towards encryption. While, over time, there has been a gradual trend towards greater use of encryption for data security and privacy, the rate of change increased not insignificantly following the global revelations of pervasive surveillance of Internet traffic.
For example, according to Sandvine, encrypted traffic increased from 1.47% to 6.10% in Europe, 1.8% to 10.37% in Latin America, 2.29% to 3.8% in North America. The Internet Initiative Japan Inc. attributes the rapid growth in HTTPS traffic since June 2013 to major service providers such as Google, Akamai, Amazon, Facebook, Twitter, Microsoft making more regular use of HTTPS for their services.
"… Newly designed protocols should prefer encryption to cleartext operation. There may be exceptions to this default, but it is important to recognize that protocols do not operate in isolation. Information leaked by one protocol can be made part of a more substantial body of information by cross-correlation of traffic observation. There are protocols which may as a result require encryption on the Internet even when it would not be a requirement for that protocol operating in isolation.
We recommend that encryption be deployed throughout the protocol stack since there is not a single place within the stack where all kinds of communication can be protected.
At the same time, concerns have been raised by law enforcement and others regarding what impact pervasive use of encryption solutions for Internet traffic might have on their activities. There have even been suggestions to prohibit the use of encryption, to require backdoors for governments, to limit the level of permitted complexity, or otherwise weaken cryptographic standards.
as well as other key services such as online banking that rely on encrypted transactions?) A challenging, but better approach is to consider how to reasonably achieve public policy objectives such as law enforcement in a world where encrypted Internet traffic is the norm.
Another area that merits closer examination is how to ensure that encryption is an available solution for all users, not just those with all the resources and/or expertise. In this regard, the Internet Society survey referred to above highlighted that encrypted communication is not easy for Internet users.
incompatibility between tools and other interoperability hurdles.
Additionally, among other things, the Snowden disclosures made it clear that confidential communications can be compromised far more easily by attacking the implementation, deployment and use of encryption technology than by trying to crack the encryption itself. Ensuring that encryption is robustly deployed and securely used remains a huge task.
To that end, the Internet Society favours and supports the development of secure, usable cryptographic products based on open standards. The cryptographic products themselves must be complemented by good design, and tools that support secure management once they are deployed (reliable creation of webs of trust, key distribution and management, secure update of deployed products, secure management of the artefacts of encryption/digital signature, and so on).
The Internet Society actively participates and contributes on issues at the intersection of the Internet and rights at the Human Rights Council. We are grateful to have had this opportunity to contribute to this important report. We will continue bringing our technical expertise and user centric principles to these debates at the March session of the Council and beyond.