arXiv:2611.01046cs.LGOct 2026

Manuscript Offprint

arXiv:2611.01046

Entropy-Regularized Reinforcement Learning for the Regime-Switching Consumption-Investment Problem

Congde Hu, Danping Li, Xun Li, Yijie Zeng

CONGDE HU †^{\dagger}, DANPING LI ‡^{\ddagger}, XUN LI §^{\S}, AND YIJIE ZENG §^{\S}

Abstract. This paper establishes an entropy-regularized reinforcement learning (ERRL) framework for the continuous-time consumption-investment problem under a regime-switching market model with general utility functions. By incorporating randomized exploratory policies and Shannon entropy regularization into the stochastic optimal control formulation, we derive closed-form representations for the optimal exploratory consumption and investment strategies. Specifically, the optimal investment strategy follows a multivariate Gaussian distribution, whereas the optimal consumption strategy takes the form of a Gibbs measure, which reduces to a Gamma distribution under logarithmic utility. We also briefly illustrate the extension to power utility. Our analysis shows that the modes of the exploratory distributions recover the functional forms of the classical deterministic optimal controls, rather than generally coinciding with their means. Furthermore, under logarithmic utility, we establish the convergence of the exploratory value function to its classical unregularized counterpart as the temperature parameter vanishes. For algorithmic design, we develop a continuous-time q-learning framework grounded in a continuous-time q-function, prove the policy improvement theorem, and establish martingale characterizations for both on-policy and off-policy learning. We find that parameterizing the actor network based on theoretical distribution families can help accelerate convergence and enhance numerical stability. Furthermore, numerical experiments across regime-switching environments provide empirical support for our theoretical findings, demonstrating stable loss convergence as well as the monotonicity and concavity of the learned value functions.

Key words. Stochastic control, Reinforcement learning, Consumption-investment, Regime-switching, General utility, q-learning

MSC codes. 68Q25, 68R10, 68U05

  1. Introduction. The continuous-time consumption-investment problem pioneered by [10] provides a classical foundation for dynamic asset allocation under stochastic market environments. In Merton's canonical model, investors maximize the lifetime expected utility derived from intermediate consumption and terminal wealth by solving a Hamilton–Jacobi–Bellman (HJB) equation, which admits closed-form deterministic optimal consumption and portfolio rules under logarithmic or constant relative risk aversion (CRRA) utilities. Recent work can be found in [1], [8], [20] and so on. In the financial market, investors usually face two market regimes, One represents a bull market characterized by rising asset prices, whereas the other represents a bear market characterized by declining asset prices. Therefore, the portfolio selection problem with regime-switching is of great interest and importance in financial investment. Under regime-switching models, optimal strategies for utility maximization have been extensively studied under various preferences, such as [14], [18] and so on.

A practical limitation shared by classical stochastic optimal control approaches to consumption-investment problems is their full-information prerequisite: agents are assumed to perfectly observe and precisely estimate all market primitives, including Markov chain transition intensities, regime-dependent drifts and volatility matrices.

∗^{*}Submitted to the editors DATE.

Funding: This work was funded by XXXXXX.

1^{1}School of Statistics, East China Normal University, Shanghai, China (hcd.math@gmail.com, dpli@fem.ecnu.edu.cn).

1^{1}Corresponding author.

§^{§}Department of Applied Mathematics, The Hong Kong Polytechnic University, Kowloon, China (malixun@polyu.edu.hk, yi-jie.zeng@connect.polyu.hk).

C. HU, D. LI, X. LI, AND Y. ZENG

[11]. In empirical applications, these structural parameters are often latent or subject to non-negligible estimation errors, which may render deterministic strategies less reliable or difficult to implement for real-time investment decisions. This observation motivates the integration of reinforcement learning (RL) with continuous-time stochastic control, which enables model-free policy learning through repeated environment interactions without requiring prior full knowledge of market dynamics.

Early continuous-time RL theories rooted in stochastic control were developed by [16, 17], who introduced entropy-regularized exploratory policies for mean-variance portfolio selection and established a link between soft RL and HJB variational problems. Subsequent work provided martingale characterizations for temporal difference (TD) evaluation and continuous-time q-learning, offering a theoretical basis for actor-critic algorithms on state spaces [5, 6, 19]. Extensions to alternative entropy regularizers have further illustrated the potential of exploratory stochastic control for financial tasks [7, 15]. Despite these advances, the existing continuous-time RL literature has paid limited attention to the joint optimization of consumption and investment strategies within regime-switching markets, and to the statistical structure of optimal exploratory consumption and investment distributions under utility functions.

This paper develops an entropy-regularized reinforcement learning (ERRL) framework for the continuous-time consumption-investment optimization problem with general concave utility functions in a regime-switching diffusion market. We embed Shannon entropy regularization into the classical stochastic control objective to induce randomized exploratory policies, which relaxes the complete market information requirement of traditional Merton-type models. Our contributions are organized along theoretical, structural, and algorithmic-numerical dimensions.

First, we reformulate the regime-switching consumption-investment problem as an entropy-regularized stochastic optimal control problem with stochastic feedback policies, and derive the associated variational HJB equation for the regularized value function. Via calculus of variations over probability measures, the joint optimal exploratory action distribution can be separated into independent portfolio weight and consumption marginals: the optimal risky asset allocation follows a multivariate Gaussian law, while consumption obeys a Gibbs measure. An important contribution from our derivation reveals that the classical deterministic Merton optimal controls correspond to the mode of the corresponding probability density, rather than the mean, of these exploratory distributions—a distinction that is particularly relevant for skewed consumption distributions such as the Gamma law under logarithmic utility. Under logarithmic utility, we also establish uniform convergence of the entropy-regularized value function to its classical unregularized counterpart as the temperature parameter vanishes, thereby connecting the exploratory RL framework with standard utility maximization theory.

Second, we investigate the optimal exploratory consumption policy under logarithmic utility and show that it follows a Gamma distribution with explicit shape and rate parameters. We further establish the convergence of the exploratory value function to its classical counterpart as the temperature parameter vanishes. As an additional illustration, we briefly discuss the corresponding Gibbs density under power utility and identify its mode. These results provide theoretical guidance for selecting suitable policy distributions in reinforcement learning algorithms.

Third, we construct and numerically validate a model-free continuous-time q-learning actor-critic algorithm adapted to regime-switching markets. Algorithmically, we introduce a regime-adjusted continuous-time q-function, establish a policy im-provement result under entropy regularization, and derive martingale representations for both on-policy and off-policy learning pipelines. The proposed actor network employs a Gaussian distribution for investment and a Gamma-based parameterization for consumption, providing a tractable implementation of exploratory policies. To illustrate the applicability of our framework, we conduct numerical experiments on a two-state bull-bear simulator using logarithmic and power utilities. The results suggest stable training convergence and indicate that the learned value functions are generally consistent with economic properties, such as risk-averse concavity and a clear regime hierarchy (with bull-market values generally lying above bear-market values). Furthermore, the learned exploratory policies exhibit patterns consistent with the theoretical policy structures, reflecting intuitive consumption and investment shifts across alternating market conditions.

The structure of this paper is organized as follows. Section 2 constructs the theoretical framework for the exploratory consumption-investment problem under the regime-switching model and derives the optimal exploratory policy. Section 3 investigates the logarithmic utility case and briefly discusses its extension to power utility. Section 4 designs a q-learning algorithm and provides numerical examples to illustrate our results. Finally, Section 5 concludes the paper.

Notation: Throughout the paper, by convention, all vectors are column vectors unless otherwise specified. Let RN\mathbb{R}^N be the NN-dimensional Euclidean space and RN×N\mathbb{R}^{N \times N} be the space of real N×NN \times N matrices. For a matrix AA, A⊤A^\top is its transpose, A−1A^{-1} its inverse, det⁡(A)\det(A) its determinant, and ∥A∥F\|A\|_F its Frobenius norm. For a vector xx, ∥x∥2\|x\|_2 denotes its Euclidean norm. We use II to denote the identity matrix and 1\mathbf{1} to denote a vector of ones with appropriate dimensions. For a sufficiently smooth function v(t,x,i)v(t, x, i), vt,vxv_t, v_x, and vxxv_{xx} denote the first-order partial derivative with respect to time tt, and the first- and second-order partial derivatives with respect to the spatial variable xx, respectively. The symbol Et,x,i[⋅]\mathbb{E}_{t,x,i}[\cdot] denotes the conditional expectation given X(t)=xX(t) = x, α(t)=i\alpha(t) = i. The symbol δ\delta is used to denote the variational operator. Let A\mathcal{A} denote the action space, and P(A)\mathcal{P}(\mathcal{A}) denote the set of probability density functions defined on A\mathcal{A}. Finally, N(⋅∣μ,Σ)\mathcal{N}(\cdot \mid \mu, \Sigma) denotes a multivariate Gaussian distribution with mean vector μ\mu and covariance matrix Σ\Sigma, and Gamma(⋅∣α,β)\text{Gamma}(\cdot \mid \alpha, \beta) denotes a Gamma distribution with shape parameter α\alpha and rate parameter β\beta.

2. Model formulation. This section presents a mathematical formulation for the stochastic optimal control problem of exploratory consumption-investment decision. To provide a baseline for comparison, we first review the classical consumption-investment problem, following the setup in [4], and then introduce the exploratory consumption-investment problem by incorporating policy exploration into the decision process. Finally, we discuss the theoretical characterization of the proposed problem and derive the explicit form of the optimal policy.

2.1. Classical consumption-investment problem. Let (Ω,F,{Ft}t≥0,P)(\Omega, \mathcal{F}, \{\mathcal{F}_t\}_{t\geq 0}, \mathbb{P}) be a complete probability space. We consider a continuous-time Markov chain α(t)\alpha(t) taking values in a finite state space M={1,2,…,D}\mathcal{M} = \{1, 2, \dots, D\}. The generator matrix of α(t)\alpha(t) is given by Q=(qij)D×DQ = (q_{ij})_{D \times D}, such that for i≠ji \neq j, qij≥0q_{ij} \geq 0 represents the transition rate from state ii to state jj, and qii=−∑j≠iqijq_{ii} = -\sum_{j \neq i} q_{ij}. The market consists of one risk-free asset (bank account) and NN risky assets (stocks) traded continuously over a finite time horizon [0,T][0, T]. The market parameters depend on the current regime state i∈Mi \in \mathcal{M}. For state i∈Mi \in \mathcal{M}, let r(t,i)r(t, i) be the risk-free interest rate, b(t,i)≡(b1(t,i),…,bN(t,i))⊤∈RNb(t, i) \equiv (b_1(t, i), \dots, b_N(t, i))^\top \in \mathbb{R}^N be the vector of mean rates of return, and σ(t,i)≡(σnm(t,i))N×N∈RN×N\sigma(t, i) \equiv (\sigma_{nm}(t, i))_{N \times N} \in \mathbb{R}^{N \times N} be the volatility matrix. We assume the standard NN-dimensional Brownian motion

C. HU, D. LI, X. LI, AND Y. ZENG

W(t)=(W1(t),…,WN(t))⊤W(t) = (W_1(t), \ldots, W_N(t))^\top is independent of the Markov chain α(t)\alpha(t). Furthermore, we assume that the filtration {Ft}t≥0\{\mathcal{F}_t\}_{t\geq 0} is generated by the Brownian motion W(t)W(t) and the Markov chain α(t)\alpha(t), augmented by all P\mathbb{P}-null sets to satisfy the usual conditions.

The price process of the risk-free asset, denoted by S0(t)S_{0}(t), evolves according to the following ordinary differential equation (ODE),

(2.1)

dS0(t)=r(t,α(t))S0(t)dt,S0(0)=s0>0.d S_{0}(t)=r(t,\alpha(t))S_{0}(t)d t,\quad S_{0}(0)=s_{0}>0.

The price processes of the NN risky assets, denoted by Sn(t)S_{n}(t) for n=1,2,…,Nn=1,2,\ldots,N, are governed by the following stochastic differential equations (SDEs),

(2.2)

dSn(t)=Sn(t)[bn(t,α(t))dt+∑m=1Nσnm(t,α(t))dWm(t)],Sn(0)=sn>0.d S_{n}(t)=S_{n}(t)\Bigg[b_{n}(t,\alpha(t))d t+\sum_{m=1}^{N}\sigma_{n m}(t,\alpha(t))d W_{m}(t)\Bigg],\quad S_{n}(0)=s_{n}>0.

For technical regularity, we assume that all the functions r(t,i)r(t,i), bn(t,i)b_n(t,i), and σnm(t,i)\sigma_{nm}(t,i) are measurable and uniformly bounded in t. Furthermore, we assume that the following nondegeneracy condition is satisfied for some δ>0\delta > 0,

(2.3)

σ(t,i)σ⊤(t,i)≥δI,∀t∈[0,T],∀i∈M,\sigma(t,i)\sigma^{\top}(t,i)\geq\delta I,\quad\forall t\in[0,T],\quad\forall i\in\mathcal{M},

where II is the N×NN \times N identity matrix.

Let u(t)≡(u1(t),u2(t),…,uN(t))⊤∈RNu(t) \equiv (u_1(t), u_2(t), \ldots, u_N(t))^\top \in \mathbb{R}^N denote the portfolio weight vector (the fraction of wealth invested in the NN risky assets), where negative components indicate short selling and a sum exceeding 1 implies leveraging by borrowing at the risk-free rate. Let c(t)≥0c(t) \geq 0 denote the consumption rate process. The wealth process X(⋅)X(\cdot) under strategy (u,c)(u, c) evolves according to the following SDE for s∈[t,T]s \in [t, T],

(2.4)

{dX(s)={X(s)[r(s,α(s))+u⊤(s)(b(s,α(s))−r(s,α(s))1)]−c(s)}ds+X(s)u⊤(s)σ(s,α(s))dW(s),X(t)=x>0,α(t)=i.\left\{\begin{array}{r l}{d X(s)=}&{\Big\{X(s)\big[r(s,\alpha(s))+u^{\top}(s)(b(s,\alpha(s))-r(s,\alpha(s))\mathbf{1})\big]-c(s)\Big\}d s}\\ &{+X(s)u^{\top}(s)\sigma(s,\alpha(s))d W(s),}\\ {X(t)=}&{x>0,\quad\alpha(t)=i.}\end{array}\right.

where, 1 is an NN-dimensional vector of ones. For simplicity of notation, we introduce the market price of risk vector θ(t,i):=σ(t,i)−1(b(t,i)−r(t,i)1)\theta(t,i):=\sigma(t,i)^{-1}(b(t,i)-r(t,i)\mathbf{1}). The wealth equation can be rewritten as

(2.5)

{dX(s)={X(s)[r(s,α(s))+u⊤(s)σ(s,α(s))θ(s,α(s))]−c(s)}ds+X(s)u⊤(s)σ(s,α(s))dW(s),X(t)=x>0,α(t)=i.\left\{\begin{array}{r l}{d X(s)=}&{\Big\{X(s)\big[r(s,\alpha(s))+u^{\top}(s)\sigma(s,\alpha(s))\theta(s,\alpha(s))\big]-c(s)\Big\}d s}\\ &{+X(s)u^{\top}(s)\sigma(s,\alpha(s))d W(s),}\\ {X(t)=}&{x>0,\quad\alpha(t)=i.}\end{array}\right.

The classical performance functional is defined as

(2.6)

Jcl(t,x,i;u,c)=Et,x,i[∫tTU1(s,c(s))ds+U2(X(T))],J^{c l}(t,x,i;u,c)=\mathbb{E}_{t,x,i}\left[\int_{t}^{T}U_{1}(s,c(s))d s+U_{2}(X(T))\right],

where Et,x,i[⋅]:=E[⋅∣X(t)=x,α(t)=i]\mathbb{E}_{t,x,i}[\cdot] := \mathbb{E}[\cdot \mid X(t) = x, \alpha(t) = i]. We assume that the “consumption” and “investment” utility functions, U1:[0,T]×(0,∞)→RU_1 : [0, T] \times (0, \infty) \to \mathbb{R} and U2:(0,∞)→RU_2 : (0, \infty) \to \mathbb{R} respectively, satisfy the following standard conditions:

(i) For each t∈[0,T]t \in [0, T], the mappings x→U1(t,x)x \to U_1(t, x) and x→U2(x)x \to U_2(x) are strictly increasing, strictly concave, and of class C1C^1 on (0,∞)(0, \infty) (with xx-derivatives denoted by U1′(t,x)U_1'(t, x) and U2′(x)U_2'(x) for each (t,x)∈[0,T]×(0,∞)(t, x) \in [0, T] \times (0, \infty)) such that

lim⁡x↓0U1′(t,x)=+∞,lim⁡x→∞U1′(t,x)=0,\lim_{x\downarrow0}U_{1}^{^{\prime}}(t,x)=+\infty,\quad\lim_{x\to\infty}U_{1}^{^{\prime}}(t,x)=0, lim⁡x↓0U2′(x)=+∞,lim⁡x→∞U2′(x)=0;\lim_{x\downarrow0}U_{2}^{^{\prime}}(x)=+\infty,\quad\lim_{x\to\infty}U_{2}^{^{\prime}}(x)=0;

(ii) The mappings (t,x)→U1(t,x)(t,x) \to U_1(t,x) and (t,x)→U1′(t,x)(t,x) \to U_1'(t,x) are continuous on [0,T]×(0,∞)[0,T] \times (0,\infty).

Motivation for the exploratory framework. In the classical framework (2.5)-(2.6), the standard stochastic optimal control problem is to find an optimal admissible strategy (u∗,c∗)(u^{*}, c^{*}) that maximizes the performance functional. While the classical regime-switching model provides a useful representation of financial reality compared to traditional models with deterministic coefficients, it generally assumes a known environment ([11]). In this classical setting, the investor typically requires prior knowledge of the Markov chain's transition rates, as well as the drift, volatility, and interest rate parameters for each market regime. In practice, however, these parameters can be challenging to estimate precisely and may remain partially unknown.

This practical consideration motivates the transition to an entropy-regularized reinforcement learning (ERRL) framework. By replacing deterministic controls with stochastic policies and incorporating a Shannon entropy regularizer, the agent is naturally encouraged to explore the state-action space ([16], [6]). This exploration allows the investor to dynamically learn effective consumption and investment strategies through interactions with the environment, thereby reducing the reliance on complete a priori knowledge of the underlying market dynamics.

2.2. Exploratory consumption-investment problem. In RL, exploration is achieved by substituting deterministic actions with probability distributions. In our model, the control variables are the consumption rate c∈[0,∞)c \in [0, \infty) and the risky asset weight vector u∈RNu \in \mathbb{R}^N, yielding the joint action space A:=[0,∞)×RN\mathcal{A} := [0, \infty) \times \mathbb{R}^N.

To enable learning in an unknown environment, let π:(t,x,i)∈[0,T]×(0,∞)×M→π(⋅∣t,x,i)∈P(A)\boldsymbol{\pi}:(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M}\to\boldsymbol{\pi}(\cdot\mid t,x,i)\in\mathcal{P}(\mathcal{A}) be a given stochastic feedback control, where P(A)\mathcal{P}(\mathcal{A}) is the set of probability density functions defined on the action space A\mathcal{A}. The investor selects their consumption and investment strategy at time ss by sampling from the probability distribution π(c,u∣s,X(s),α(s))\boldsymbol{\pi}(c,u\mid s,X(s),\alpha(s)).

Following the theoretical framework for continuous-time exploratory diffusions proposed by [16] and further extended by [2], we reformulate the classical problem using stochastic strategies. The detailed derivation of this exploratory state dynamics is provided in Appendix A. Under this exploratory framework, the state dynamics are governed by the corresponding regime-switching exploratory SDE

(2.7)

{dX(s)=(∫A{X(s)[r(s,α(s))+u⊤σ(s,α(s))θ(s,α(s))]−c}×π(c,u∣s,X(s),α(s))dcdu)ds+{∫AX(s)2u⊤σ(s,α(s))σ⊤(s,α(s))u×π(c,u∣s,X(s),α(s))dcdu}1/2dW~(s),X(t)=x>0,α(t)=i.\left\{\begin{array}{r l}{d X(s)=}&{\left(\displaystyle\int_{\mathcal{A}}\left\{X(s)\big[r(s,\alpha(s))+u^{\top}\sigma(s,\alpha(s))\theta(s,\alpha(s))\big]-c\right\}\right.}\\ &{\quad\times\pi(c,u\mid s,X(s),\alpha(s))d c d u\Bigg)d s}\\ &{\left.+\left\{\displaystyle\int_{\mathcal{A}}X(s)^{2}u^{\top}\sigma(s,\alpha(s))\sigma^{\top}(s,\alpha(s))u\right.\right.}\\ &{\quad\times\left.\pi(c,u\mid s,X(s),\alpha(s))d c d u\right\}^{1/2}d\tilde{W}(s),}\\ {X(t)=}&{x>0,\quad\alpha(t)=i.}\end{array}\right.

where W~(s)\tilde{W}(s) is a standard one-dimensional Brownian motion.

To encourage exploration, we add an entropy regularizer to the objective. The

C. HU, D. LI, X. LI, AND Y. ZENG

exploratory performance functional is defined as

(2.8)

J(t,x,i;π)=Et,x,i[∫tT(∫AU1(s,c)π(c,u∣s,X(s),α(s))dcdu−λ∫Aπ(c,u∣s,X(s),α(s))ln⁡π(c,u∣s,X(s),α(s))dcdu)ds+U2(X(T))],\begin{align*}J(t,x,i;\boldsymbol{\pi})&=\mathbb{E}_{t,x,i}\bigg[\int_{t}^{T}\Big(\int_{\mathcal{A}}U_{1}(s,c)\boldsymbol{\pi}(c,u\mid s,X(s),\alpha(s))dc du\\&-\lambda\int_{\mathcal{A}}\boldsymbol{\pi}(c,u\mid s,X(s),\alpha(s))\ln\boldsymbol{\pi}(c,u\mid s,X(s),\alpha(s))dc du\Big)ds+U_{2}(X(T))\bigg],\end{align*}

where λ>0\lambda > 0 is the temperature parameter.

Remark 2.1. In ERRL, entropy encourages exploration by increasing policy randomness. Since the investor aims to maximize their expected performance in the proposed framework, the positive entropy term −λ∫Aπln⁡π dcdu-\lambda\int_{\mathcal{A}}\pi\ln\pi\,dcdu acts as an exploration reward. The constant λ>0\lambda>0 serves as the temperature parameter, influencing how quickly the investor updates their policy using new information and balancing the trade-off between exploitation (utility maximization) and the entropy incentive.

DEFINITION 2.2. (Admissible policy). The policy π=π(⋅∣t,x,i)\pi = \pi(\cdot \mid t, x, i) is called admissible, and we denote the set of admissible policies by Π\Pi, if:

(i) For all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M}, π(⋅∣t,x,i)∈P(A)\pi(\cdot\mid t,x,i)\in\mathcal{P}(\mathcal{A}). Moreover, for every Borel set B∈B(A)B\in\mathcal{B}(\mathcal{A}), the mapping (t,x,i)⟼∫Bπ(c,u∣t,x,i) dc du(t,x,i)\longmapsto\int_{B}\pi(c,u\mid t,x,i)\,dc\,du is jointly measurable with respect to B([0,T])⊗B((0,∞))⊗2M\mathcal{B}([0,T])\otimes\mathcal{B}((0,\infty))\otimes2^{\mathcal{M}}. Consequently, for any {Fs}\{\mathcal{F}_s\}-progressively measurable state process (X(s),α(s))(X(s),\alpha(s)), the integrated drift and diffusion coefficients are {Fs}\{\mathcal{F}_s\}-progressively measurable.

(ii) For any constants 0<ε<K<∞0 < \varepsilon < K < \infty, all t∈[0,T]t \in [0, T], and all i∈Mi \in \mathcal{M}, there exists a constant Cε,K>0C_{\varepsilon,K} > 0 such that for all x,y∈[ε,K]x, y \in [\varepsilon, K],

∫A(1+c+u⊤u)∣π(c,u∣t,x,i)−π(c,u∣t,y,i)∣dcdu≤Cε,K∣x−y∣.\int_{\mathcal{A}}\left(1+c+u^{\top}u\right)|\pi(c,u\mid t,x,i)-\pi(c,u\mid t,y,i)|d c d u\leq C_{\varepsilon,K}|x-y|.

(iii) For all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M} and some p≥2p\geq2, there exists a constant C>0C>0 such that

∫A∣ln⁡π(c,u∣t,x,i)∣π(c,u∣t,x,i)dcdu≤C(1+∣ln⁡x∣+∣x∣p).\int_{\mathcal{A}}\left|\ln\pi(c,u\mid t,x,i)\right|\pi(c,u\mid t,x,i)d c d u\leq C\left(1+\left|\ln x\right|+\left|x\right|^{p}\right).

(iv) There exist constants C>0C > 0 such that for all (t,x,i)∈[0,T]×(0,∞)×M(t, x, i) \in [0, T] \times (0, \infty) \times \mathcal{M},

∫Acπ(c,u∣t,x,i)dcdu≤Cx,∫Au⊤uπ(c,u∣t,x,i)dcdu≤C.\int_{\mathcal{A}}c\pi(c,u\mid t,x,i)d c d u\leq C x,\quad\int_{\mathcal{A}}u^{\top}u\pi(c,u\mid t,x,i)d c d u\leq C.

Furthermore, to ensure non-degeneracy of exploration, there exists a constant ϵ‾>0\underline{\epsilon} > 0 such that

∫Au⊤uπ(c,u∣t,x,i)dcdu≥ϵ‾,∀(t,x,i)∈[0,T]×(0,∞)×M.\int_{\mathcal{A}}u^{\top}u\pi(c,u\mid t,x,i)d c d u\geq\underline{\epsilon},\quad\forall(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M}.

PROPOSITION 2.3 (Well-posedness of the exploratory SDE). For any admissible policy π∈Π\pi \in \Pi, the exploratory SDE (2.7) admits a unique strong solution {X(s)}s∈[t,T]\{X(s)\}_{s \in [t,T]} given the initial condition X(t)=x>0X(t) = x > 0 and α(t)=i\alpha(t) = i. Furthermore, the solution remains strictly positive almost surely, i.e., P(X(s)>0,∀s∈[t,T])=1\mathbb{P}(X(s) > 0, \forall s \in [t,T]) = 1.

The proof can be found in Appendix B.

DEFINITION 2.4. (Value function). The exploratory value function is defined as

(2.9)

V(t,x,i)=sup⁡π∈ΠJ(t,x,i;π).V(t,x,i)=\sup_{\pi\in\Pi}J(t,x,i;\pi).

2.3. Optimal exploratory policy. In this subsection, we employ the Dynamic Programming Principle (DPP) to elucidate the optimal exploratory policy for the consumption-investment problem. First, we derive the HJB equation for the exploratory value function (see Lemma 2.5), and then present the optimal policy as a functional of the solution to the HJB equation (see Theorem 2.8). Finally, we state a verification theorem (see Theorem 2.10) to guarantee that the solution to the HJB equation coincides with the true exploratory value function and that the generated policy is indeed optimal.

LEMMA 2.5 (HJB equation). Suppose that for all i∈Mi \in \mathcal{M}, v(⋅,⋅,i)∈C1,2([0,T]×(0,∞))v(\cdot, \cdot, i) \in C^{1,2}([0, T] \times (0, \infty)). Then, the formal HJB equation associated with the exploratory consumption-investment problem is given by

(2.10)

−vt(t,x,i)=sup⁡π∈Π[∫AH(t,x,i,vx,vxx;c,u)π(c,u∣t,x,i)dcdu−λ∫Aπ(c,u∣t,x,i)ln⁡π(c,u∣t,x,i)dcdu]+∑j=1Dqijv(t,x,j),v(T,x,i)=U2(x),∀x∈(0,∞),∀i∈M,\begin{align*}-v_{t}(t,x,i)=&\sup_{\pi\in\Pi}\left[\int_{\mathcal{A}}H(t,x,i,v_{x},v_{xx};c,u)\pi(c,u\mid t,x,i)dc du\right.\\&\left.-\lambda\int_{\mathcal{A}}\pi(c,u\mid t,x,i)\ln\pi(c,u\mid t,x,i)dc du\right]+\sum_{j=1}^{D}q_{ij}v(t,x,j),\\v(T,x,i)=&U_{2}(x),\quad\forall x\in(0,\infty),\quad\forall i\in\mathcal{M},\end{align*}

where the classical Hamiltonian H is defined as

(2.11)

H(t,x,i,vx,vxx;c,u):=U1(t,c)+[x(r(t,i)+u⊤σ(t,i)θ(t,i))−c]vx+12x2u⊤σ(t,i)σ⊤(t,i)uvxx=(12x2u⊤σ(t,i)σ⊤(t,i)uvxx+xu⊤σ(t,i)θ(t,i)vx)+(U1(t,c)−cvx)+xr(t,i)vx.\begin{align*}H(t,x,i,v_{x},v_{xx};c,u):=&U_{1}(t,c)+\left[x\left(r(t,i)+u^{\top}\sigma(t,i)\theta(t,i)\right)-c\right]v_{x}\\&+\frac{1}{2}x^{2}u^{\top}\sigma(t,i)\sigma^{\top}(t,i)uv_{xx}\\=&\left(\frac{1}{2}x^{2}u^{\top}\sigma(t,i)\sigma^{\top}(t,i)uv_{xx}+xu^{\top}\sigma(t,i)\theta(t,i)v_{x}\right)\\&+(U_{1}(t,c)-cv_{x})+xr(t,i)v_{x}.\end{align*}

Proof. The proof follows the standard DPP for regime-switching diffusions [9], extended to the exploratory framework with entropy regularization [16].

LEMMA 2.6 (Monotonicity and concavity). For each i∈Mi \in \mathcal{M}, suppose v(⋅,⋅,i)∈C1,2([0,T)×(0,∞))v(\cdot, \cdot, i) \in C^{1,2}([0, T) \times (0, \infty)) is a finite-valued solution to the HJB equation (2.10). Then vx(t,x,i)>0v_x(t, x, i) > 0, vxx(t,x,i)<0v_{xx}(t, x, i) < 0, for all (t,x,i)∈[0,T)×(0,∞)×M(t, x, i) \in [0, T) \times (0, \infty) \times \mathcal{M}.

The proof can be found in Appendix C.

For completeness, we define the mode as follows [12].

DEFINITION 2.7 (Mode). The mode of a continuous random variable having density f is the value of x for which f(x)f(x) is a maximum.

To solve the supremum problem in the HJB equation (2.10), we employ the calculus of variations to maximize the objective functional with respect to the probability density π\pi, subject to the normalization constraint ∫Aπ dc du=1\int_{\mathcal{A}} \pi \, d c \, du = 1.

THEOREM 2.8 (Optimal exploratory policy). Suppose that the HJB equation (2.10) admits a finite-valued solution v(t,x,i)v(t, x, i). Then the optimal exploratory policy π∗(c,u∣t,x,i)\pi^*(c, u \mid t, x, i) separates into two independent distributions, πc∗(c∣t,x,i)\pi_c^*(c \mid t, x, i) and πu∗(u∣t,x,i)\pi_u^*(u \mid t, x, i). Specifically, the optimal investment policy is the multivariate Gaussian distribution

(2.12)

πu∗(u∣t,x,i)=N(u∣−σ(t,i)−⊤θ(t,i)vxxvxx,λ(σ(t,i)σ⊤(t,i))−1−x2vxx),\pi_{u}^{*}(u\mid t,x,i)=\mathcal{N}\left(u\Bigg|-\frac{\sigma(t,i)^{-\top}\theta(t,i)v_{x}}{x v_{x x}},\frac{\lambda(\sigma(t,i)\sigma^{\top}(t,i))^{-1}}{-x^{2}v_{x x}}\right),

C. HU, D. LI, X. LI, AND Y. ZENG

and the optimal consumption policy is the Gibbs distribution

(2.13)

πc∗(c∣t,x,i)=exp⁡(1λ[U1(t,c)−cvx])∫0∞exp⁡(1λ[U1(t,c)−cvx])dc.\pi_{c}^{*}(c\mid t,x,i)=\frac{\exp\left(\frac{1}{\lambda}[U_{1}(t,c)-c v_{x}]\right)}{\int_{0}^{\infty}\exp\left(\frac{1}{\lambda}[U_{1}(t,c)-c v_{x}]\right)d c}.

Proof. By Lemma 2.6, we have vx>0v_x > 0 and vxx<0v_{xx} < 0.

Starting from the HJB equation (2.10), the maximizer π∗(c,u∣t,x,i)\pi^{*}(c, u \mid t, x, i) solves

sup⁡π∈Π{∫AH(t,x,i,vx,vxx;c,u)πdcdu−λ∫Aπln⁡πdcdu},\sup_{\pi\in\Pi}\left\{\int_{\mathcal{A}}H(t,x,i,v_{x},v_{x x};c,u)\pi d c d u-\lambda\int_{\mathcal{A}}\pi\ln\pi d c d u\right\},

subject to ∫Aπ dc du=1\int_{\mathcal{A}}\pi\,dc\,du=1. By the method of Lagrange multipliers,

π∗(c,u∣t,x,i)=exp⁡(1λH(t,x,i,vx,vxx;c,u))∫Aexp⁡(1λH(t,x,i,vx,vxx;c,u))dcdu.\pi^{*}(c,u\mid t,x,i)=\frac{\exp\left(\frac{1}{\lambda}H(t,x,i,v_{x},v_{x x};c,u)\right)}{\int_{\mathcal{A}}\exp\left(\frac{1}{\lambda}H(t,x,i,v_{x},v_{x x};c,u)\right)d c d u}.

Using (2.11), the Hamiltonian can be decomposed as

H=xr(t,i)vx+(U1(t,c)−cvx)+12x2vxxu⊤σ(t,i)σ⊤(t,i)u+xvxu⊤σ(t,i)θ(t,i).H=x r(t,i)v_{x}+\left(U_{1}(t,c)-c v_{x}\right)+\frac{1}{2}x^{2}v_{x x}u^{\top}\sigma(t,i)\sigma^{\top}(t,i)u+x v_{x}u^{\top}\sigma(t,i)\theta(t,i).

Hence the joint density factorizes as

π∗(c,u∣t,x,i)=πc∗(c∣t,x,i)πu∗(u∣t,x,i).\pi^{*}(c,u\mid t,x,i)=\pi_{c}^{*}(c\mid t,x,i)\pi_{u}^{*}(u\mid t,x,i).

For the consumption policy,

πc∗(c∣t,x,i)=exp⁡(1λ[U1(t,c)−cvx])∫0∞exp⁡(1λ[U1(t,c)−cvx])dc.\pi_{c}^{*}(c\mid t,x,i)=\frac{\exp\left(\frac{1}{\lambda}[U_{1}(t,c)-c v_{x}]\right)}{\int_{0}^{\infty}\exp\left(\frac{1}{\lambda}[U_{1}(t,c)-c v_{x}]\right)d c}.

Since vx>0v_{x} > 0, the denominator is finite.

For the investment policy,

πu∗(u∣t,x,i)∝exp⁡(x2vxx2λu⊤σ(t,i)σ⊤(t,i)u+xvxλu⊤σ(t,i)θ(t,i)).\pi_{u}^{*}(u\mid t,x,i)\propto\exp\left(\frac{x^{2}v_{x x}}{2\lambda}u^{\top}\sigma(t,i)\sigma^{\top}(t,i)u+\frac{x v_{x}}{\lambda}u^{\top}\sigma(t,i)\theta(t,i)\right).

Since vxx<0v_{xx} < 0 and σ(t,i)σ⊤(t,i)\sigma(t,i)\sigma^{\top}(t,i) is positive definite, the quadratic term is strictly negative definite. Completing the square gives

πu∗(u∣t,x,i)=N(u∣−σ(t,i)−⊤θ(t,i)vxxvxx,λ(σ(t,i)σ⊤(t,i))−1−x2vxx).\pi_{u}^{*}(u\mid t,x,i)=\mathcal{N}\left(u\Bigg\vert-\frac{\sigma(t,i)^{-\top}\theta(t,i)v_{x}}{x v_{x x}},\frac{\lambda(\sigma(t,i)\sigma^{\top}(t,i))^{-1}}{-x^{2}v_{x x}}\right).

Remark 2.9. The modes of the probability density functions πu∗(u∣t,x,i)\pi_{u}^{*}(u \mid t, x, i) and πc∗(c∣t,x,i)\pi_{c}^{*}(c \mid t, x, i), as defined in Definition 2.7, coincide with the pointwise maximizers of the classical Hamiltonian H evaluated at the derivatives of the exploratory value function v. Specifically, these modes are given by

umode∗=−σ(t,i)−⊤θ(t,i)vxxvxx,cmode∗=(U1′(t,⋅))−1(vx).u_{\mathrm{m o d e}}^{*}=-\frac{\sigma(t,i)^{-\top}\theta(t,i)v_{x}}{x v_{x x}},\qquad c_{\mathrm{m o d e}}^{*}=\left(U_{1}^{\prime}(t,\cdot)\right)^{-1}(v_{x}).

These expressions are formally identical to the optimal deterministic controls in the classical framework.

While prior studies (see, e.g., [17]) have observed that the mean of the Gaussian exploratory distribution formally recovers the classical optimal control, our analysis highlights the role of the mode in characterizing the pointwise Hamiltonian maximizer. This distinction is particularly relevant for asymmetric distributions, where the mean and mode generally differ. To illustrate this observation, Section 3 considers a Gamma distribution for exploratory consumption, whose mode retains the functional form of the classical optimal consumption rule, whereas its mean differs from the mode.

Substituting the optimal exploratory policy π∗(c,u∣t,x,i)=πc∗(c∣t,x,i)πu∗(u∣t,x,i)\boldsymbol{\pi}^*(c, u \mid t, x, i) = \boldsymbol{\pi}_c^*(c \mid t, x, i) \boldsymbol{\pi}_u^*(u \mid t, x, i) from Theorem 2.8 into the HJB equation (2.10), we obtain

sup⁡π∈Π[∫AH(t,x,i,vx,vxx;c,u)πdcdu−λ∫Aπln⁡πdcdu]=λln⁡(∫Aexp⁡(H(t,x,i,vx,vxx;c,u)λ)dcdu)=xr(t,i)vx−θ(t,i)⊤θ(t,i)vx22vxx−λN2ln⁡(−x2vxx)−λ2ln⁡det⁡(σ(t,i)σ⊤(t,i))+λN2ln⁡(2πλ)+λln⁡(∫0∞exp⁡(U1(t,c)−cvxλ)dc).\begin{align*}&\sup_{\boldsymbol{\pi}\in\boldsymbol{\Pi}}\left[\int_{\mathcal{A}}H(t,x,i,v_{x},v_{xx};c,u)\boldsymbol{\pi}d c d u-\lambda\int_{\mathcal{A}}\boldsymbol{\pi}\ln\boldsymbol{\pi}d c d u\right]\\=&\lambda\ln\left(\int_{\mathcal{A}}\exp\left(\frac{H(t,x,i,v_{x},v_{xx};c,u)}{\lambda}\right)d c d u\right)\\=&x r(t,i)v_{x}-\frac{\theta(t,i)^{\top}\theta(t,i)v_{x}^{2}}{2v_{xx}}-\frac{\lambda N}{2}\ln(-x^{2}v_{xx})-\frac{\lambda}{2}\ln\det(\sigma(t,i)\sigma^{\top}(t,i))\\&+\frac{\lambda N}{2}\ln(2\pi\lambda)+\lambda\ln\left(\int_{0}^{\infty}\exp\left(\frac{U_{1}(t,c)-c v_{x}}{\lambda}\right)d c\right).\end{align*}

Therefore, v(t,x,i)v(t,x,i) satisfies the following partial differential equation (PDE),

(2.14)

−vt(t,x,i)=xr(t,i)vx−θ(t,i)⊤θ(t,i)vx22vxx−λN2ln⁡(−x2vxx)−λ2ln⁡det⁡(σ(t,i)σ⊤(t,i))+λN2ln⁡(2πλ)+λln⁡(∫0∞exp⁡(U1(t,c)−cvxλ)dc)+∑j=1Dqijv(t,x,j),\begin{align*}-v_{t}(t,x,i)=&x r(t,i)v_{x}-\frac{\theta(t,i)^{\top}\theta(t,i)v_{x}^{2}}{2v_{xx}}-\frac{\lambda N}{2}\ln(-x^{2}v_{xx})\\&-\frac{\lambda}{2}\ln\det(\sigma(t,i)\sigma^{\top}(t,i))+\frac{\lambda N}{2}\ln(2\pi\lambda)\\&+\lambda\ln\left(\int_{0}^{\infty}\exp\left(\frac{U_{1}(t,c)-c v_{x}}{\lambda}\right)d c\right)+\sum_{j=1}^{D}q_{ij}v(t,x,j),\end{align*} v(T,x,i)=U2(x),∀i∈(0,∞),∀i∈M.v(T,x,i)=U_{2}(x),\quad\forall i\in(0,\infty),\quad\forall i\in\mathcal{M}.

THEOREM 2.10 (Verification theorem). Suppose that, for each i∈Mi \in \mathcal{M}, there exists a finite-valued function v(t,x,i)∈C1,2([0,T]×(0,∞))v(t, x, i) \in C^{1,2}([0, T] \times (0, \infty)) satisfying the following conditions:

(i) v solves the HJB equation (2.10) with terminal condition v(T,x,i)=U2(x)v(T, x, i) = U_2(x);

(ii) there exist constants C>0C>0 and p>0p>0 such that ∣v(t,x,i)∣≤C(1+xp+x−p)|v(t,x,i)|\leq C(1+x^{p}+x^{-p}) for all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M};

(iii) for any admissible policy π∈Π\boldsymbol{\pi} \in \Pi, the local martingale term arising from the generalized Itô formula applied to v(s,X(s),α(s))v(s, X(s), \alpha(s)) is a supermartingale. Furthermore, the optimal exploratory policy π∗\boldsymbol{\pi}^* defined in (2.12) and (2.13) is admissible, and the corresponding local martingale term is a true martingale.

Then

v(t,x,i)=V(t,x,i)=sup⁡π∈ΠJ(t,x,i;π),v(t,x,i)=V(t,x,i)=\sup_{\pi\in\Pi}J(t,x,i;\pi),

and π∗\pi^{*} is an optimal exploratory policy.

Proof. By Lemma 2.6, vx>0v_x > 0 and vxx<0v_{xx} < 0. The result then follows from the standard verification argument for regime-switching stochastic control; see [14, 9]. □\square

  1. Analysis under logarithmic utility. In this section, we specialize the general optimal exploratory consumption policy in Theorem 2.8 to logarithmic utility.

C. HU, D. LI, X. LI, AND Y. ZENG

We derive the resulting Gamma distribution and analyze the convergence of the exploratory value function as the temperature parameter tends to zero. We also briefly discuss the extension to power utility.

Beyond their theoretical interest, the derived probability density functions offer useful insights for practical algorithm design. In particular, they provide a theoretical reference for selecting parametric policy distributions in actor networks, such as those used in soft actor-critic algorithms [3]. Choosing a distributional family that reflects the underlying economic structure may facilitate more stable and economically informed exploration in complex continuous action spaces.

COROLLARY 3.1 (Logarithmic utility). Suppose the investor has a logarithmic preference with a subjective discount rate ρ>0\rho > 0, i.e., U1(t,c)=e−ρtln⁡(c)U_1(t, c) = e^{-\rho t} \ln(c), and the HJB equation (2.10) admits a finite-valued solution v(t,x,i)v(t, x, i). Then the optimal exploratory consumption policy is given by

(3.1)

πc∗(c∣t,x,i)=Gamma(c∣e−ρtλ+1,vx(t,x,i)λ).\pi_{c}^{*}(c\mid t,x,i)=\mathrm{Gamma}\left(c\left|\frac{e^{-\rho t}}{\lambda}+1,\frac{v_{x}(t,x,i)}{\lambda}\right.\right).

We now establish the connection between the classical consumption-investment problem and the exploratory consumption-investment problem under logarithmic utility, by examining the asymptotic behavior of the model as the temperature parameter λ→0+\lambda \to 0^{+}.

PROPOSITION 3.2 (Convergence of the value function under logarithmic utility). Suppose the investor has a logarithmic preference for consumption, i.e., U1(t,c)=e−ρtln⁡(c)U_1(t,c) = e^{-\rho t} \ln(c). Let V(t,x,i)V(t,x,i) denote the exploratory value function under temperature λ>0\lambda > 0, and Vcl(t,x,i)V^{cl}(t,x,i) denote the classical unregularized value function. As the exploration temperature λ→0+\lambda \to 0^+, V(t,x,i)V(t,x,i) converges uniformly to Vcl(t,x,i)V^{cl}(t,x,i) on any compact subset of the state space. Specifically, the approximation error is bounded by O(λ∣ln⁡λ∣)\mathcal{O}(\lambda|\ln\lambda|).

The proof can be found in Appendix D.

Building on the convergence of the value function established in Proposition 3.2, we can now examine the connection between the derived exploratory policy π∗(c,u∣t,x,i)\pi^*(c,u \mid t,x,i) and the classical deterministic strategies. To do so, we analyze the asymptotic behavior of the exploratory policy distributions as the exploration temperature parameter λ→0+\lambda \to 0^+. It is worth noting that these consistency results rely on the uniform convergence of the exploratory value function V(t,x,i)V(t,x,i) to its classical counterpart Vcl(t,x,i)V^{cl}(t,x,i) as λ→0+\lambda \to 0^+. Across both policies, the modes of the respective probability density functions formally coincide with the classical optimal strategies, though their distributional properties exhibit distinct behaviors.

  • Investment policy ( πu∗\pi_u^*): The optimal portfolio distribution follows a multivariate Gaussian, where the mode and the mean naturally coincide. As λ→0+\lambda \to 0^+, the covariance matrix given by −λ(σ(t,i)σ⊤(t,i))−1x2Vxx-\frac{\lambda(\sigma(t,i)\sigma^\top(t,i))^{-1}}{x^2V_{xx}} continuously shrinks toward the zero matrix. Consequently, the distribution collapses via a Dirac delta measure onto its mean vector, which precisely recovers the classical optimal portfolio proportion
u∗=−σ(t,i)−⊤θ(t,i)VxxVxx.u^{*}=-\frac{\sigma(t,i)^{-\top}\theta(t,i)V_{x}}{x V_{x x}}.
  • Consumption policy (πc∗)(\pi_{c}^{*}): Under logarithmic utility, the exploratory consumption policy follows a Gamma distribution with shape parameter α=\alpha =

e−ρtλ+1\frac{e^{-\rho t}}{\lambda} + 1 and rate parameter β=Vxλ\beta = \frac{V_x}{\lambda}. For any λ>0\lambda > 0, the skewness introduced by entropy regularization causes the mode and the mean to differ. Specifically, while the expected value is E[c]=αβ=e−ρt+λVx\mathbb{E}[c] = \frac{\alpha}{\beta} = \frac{e^{-\rho t} + \lambda}{V_x}, the mode of the distribution precisely recovers the classical optimal consumption rate

c∗=α−1β=e−ρtVx.c^{*}=\frac{\alpha-1}{\beta}=\frac{e^{-\rho t}}{V_{x}}.

As λ→0+\lambda \to 0^{+}, the variance

Var[c]=λe−ρt+λ2Vx2Var[c]=\frac{\lambda e^{-\rho t}+\lambda^{2}}{V_{x}^{2}}

vanishes. Consequently, the mean converges to the mode, and the distribution collapses via a Dirac delta measure centered at this classical deterministic consumption rate.

Together, these asymptotic properties demonstrate how the entropy-regularized exploratory framework smoothly transitions back to the classical framework as the exploration incentive fades away.

Remark 3.3 (Power utility). The optimal exploratory consumption policy can also be characterized under power utility. Suppose that

U1(t,c)=e−ρtc1−γ1−γ,γ>0,γ≠1,U_{1}(t,c)=e^{-\rho t}\frac{c^{1-\gamma}}{1-\gamma},\qquad\gamma>0,\quad\gamma\neq1,

and that the HJB equation (2.10) admits a finite-valued solution v(t,x,i)v(t, x, i). By Theorem 2.8, the optimal consumption density is

(3.2)

πc∗(c∣t,x,i)=exp⁡(e−ρtc1−γλ(1−γ)−vx(t,x,i)λc)∫0∞exp⁡(e−ρtz1−γλ(1−γ)−vx(t,x,i)λz)dz,c>0.\pi_{c}^{*}(c\mid t,x,i)=\frac{\exp\left(\frac{e^{-\rho t}c^{1-\gamma}}{\lambda(1-\gamma)}-\frac{v_{x}(t,x,i)}{\lambda}c\right)}{\int_{0}^{\infty}\exp\left(\frac{e^{-\rho t}z^{1-\gamma}}{\lambda(1-\gamma)}-\frac{v_{x}(t,x,i)}{\lambda}z\right)d z},\qquad c>0.

Unlike the logarithmic utility case, this density does not generally belong to a standard distribution family. Nevertheless, its mode is given explicitly by

cmode∗(t,x,i)=(eρtvx(t,x,i))−1/γ,c_{\mathrm{m o d e}}^{*}(t,x,i)=\left(e^{\rho t}v_{x}(t,x,i)\right)^{-1/\gamma},

which has the same functional form as the classical optimal consumption rule, with the exploratory value function replacing its unregularized counterpart.

  1. q-Learning RL algorithm. While the optimal exploratory policy π∗(c,u∣t,x,i)\pi^*(c, u \mid t, x, i) in Theorem 2.8 characterizes the exact solution to the exploratory optimal control problem, it relies on the market primitives r(t,i)r(t, i), b(t,i)b(t, i), σ(t,i)\sigma(t, i), and the transition rate matrix Q. In financial applications, these regime-switching dynamics are often difficult to estimate precisely or remain partially unknown a priori. To develop a model-free RL framework, we first define the associated action-value function (q-function) for the controller and establish its martingale characterization following continuous-time RL methodologies (cf. [5], [6], [19]).

4.1. q-Function and policy improvement. Based on the structure of the exploratory HJB equation (2.10), we introduce the q-function, which evaluates the action-value of a deterministic action (c,u)∈A(c, u) \in \mathcal{A} before the agent acts according to its stochastic policy.

C. HU, D. LI, X. LI, AND Y. ZENG

DEFINITION 4.1. (q-Function). For a given π(⋅∣t,x,i)∈Π\pi(\cdot \mid t, x, i) \in \Pi, let J(t,x,i;π)J(t, x, i; \pi) be the corresponding exploratory payoff function. The q-function is defined as

(4.1)

q(t,x,i;c,u;π):=Jt(t,x,i;π)+H(t,x,i,Jx,Jxx;c,u)+∑j=1DqijJ(t,x,j;π),q(t,x,i;c,u;\pi):=J_{t}(t,x,i;\pi)+H(t,x,i,J_{x},J_{x x};c,u)+\sum_{j=1}^{D}q_{i j}J(t,x,j;\pi),

where H is the classical Hamiltonian defined in (2.11).

It immediately follows from the exploratory HJB equation that the q-function satisfies the following consistency condition

(4.2)

∫A(q(t,x,i;c,u;π)−λln⁡π(c,u∣t,x,i))π(c,u∣t,x,i)dcdu=0,∀(t,x,i).\int_{\mathcal{A}}(q(t,x,i;c,u;\pi)-\lambda\ln\pi(c,u\mid t,x,i))\pi(c,u\mid t,x,i)d c d u=0,\quad\forall(t,x,i).

LEMMA 4.2. (Policy improvement). Let π(c,u∣t,x,i)∈Π\pi(c, u \mid t, x, i) \in \Pi be an arbitrarily given admissible policy. Suppose that the corresponding exploratory performance function J(⋅,⋅,i;π)∈C1,2([0,T)×(0,∞))∩C0([0,T]×(0,∞))J(\cdot, \cdot, i; \pi) \in C^{1,2}([0, T) \times (0, \infty)) \cap C^0([0, T] \times (0, \infty)) for each i∈Mi \in \mathcal{M}, and satisfies Jx>0J_x > 0 and Jxx<0J_{xx} < 0 (i.e., JJ is strictly increasing and concave with respect to xx). For any (t,x,i)∈[0,T)×(0,∞)×M(t, x, i) \in [0, T) \times (0, \infty) \times \mathcal{M}, if the updated policy π~(c,u∣t,x,i)\tilde{\pi}(c, u \mid t, x, i) defined as

(4.3)

π~(c,u∣t,x,i)=exp⁡(1λH(t,x,i,Jx,Jxx;c,u))∫Aexp⁡(1λH(t,x,i,Jx,Jxx;c′,u′))dc′du′\tilde{\pi}(c,u\mid t,x,i)=\frac{\exp\left(\frac{1}{\lambda}H(t,x,i,J_{x},J_{x x};c,u)\right)}{\int_{\mathcal{A}}\exp\left(\frac{1}{\lambda}H(t,x,i,J_{x},J_{x x};c^{\prime},u^{\prime})\right)d c^{\prime}d u^{\prime}}

is admissible. Then, the exploratory performance functions under the specific policies π~(c,u∣t,x,i)\tilde{\pi}(c,u\mid t,x,i) and π(c,u∣t,x,i)\pi(c,u\mid t,x,i) satisfy

(4.4)

J(t,x,i;π~)≥J(t,x,i;π),∀(t,x,i)∈[0,T]×(0,∞)×M.J(t,x,i;\tilde{\pi})\geq J(t,x,i;\pi),\quad\forall(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M}.

Proof. Fix (t,x,i)∈[0,T]×(0,∞)×M(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M}. Let Xsπ~X_{s}^{\tilde{\pi}} denote the wealth process driven by the updated policy π~(c,u∣t,x,i)\tilde{\pi}(c,u\mid t,x,i). For notational simplicity, define the exploratory drift and diffusion coefficients under policy π~\tilde{\pi} as

bπ~(t,x,i)=xr(t,i)+x∫Au⊤σ(t,i)θ(t,i)π~(c,u∣t,x,i)dcdu−∫Acπ~(c,u∣t,x,i)dcdu,\begin{align*}b^{\tilde{\pi}}(t,x,i)=&x r(t,i)+x\int_{\mathcal{A}}u^{\top}\sigma(t,i)\theta(t,i)\tilde{\pi}(c,u\mid t,x,i)d c d u\\&-\int_{\mathcal{A}}c\tilde{\pi}(c,u\mid t,x,i)d c d u,\end{align*} σπ~(t,x,i)={x2∫Au⊤σ(t,i)σ⊤(t,i)uπ~(c,u∣t,x,i)dcdu}1/2.\sigma^{\tilde{\pi}}(t,x,i)=\left\{x^{2}\int_{\mathcal{A}}u^{\top}\sigma(t,i)\sigma^{\top}(t,i)u\tilde{\pi}(c,u\mid t,x,i)d c d u\right\}^{1/2}.

Applying Itô’s formula with regime switching to J(s,Xsπ~,α(s);π)J(s, X_{s}^{\tilde{\pi}}, \alpha(s); \pi) along the path of Xsπ~X_{s}^{\tilde{\pi}}, we have

J(s,Xsπ~,α(s);π)−J(t,x,i;π)=∫ts[Jt(h,Xh−π~,α(h−);π)+bπ~(h,Xh−π~,α(h−))Jx(h,Xh−π~,α(h−);π)+12(σπ~(h,Xh−π~,α(h−)))2Jxx(h,Xh−π~,α(h−);π)+∑j=1Dqα(h−),jJ(h,Xh−π~,j;π)]dh+∫tsJx(h,Xh−π~,α(h−);π)σπ~(h,Xh−π~,α(h−))dW~(h)+∫tsdMhα,\begin{align*}&J(s,X_{s}^{\tilde{\pi}},\alpha(s);\pi)-J(t,x,i;\pi)\\=&\int_{t}^{s}\Bigg[J_{t}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\pi)+b^{\tilde{\pi}}(h,X_{h-}^{\tilde{\pi}},\alpha(h-))J_{x}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\pi)\\&+\frac{1}{2}(\sigma^{\tilde{\pi}}(h,X_{h-}^{\tilde{\pi}},\alpha(h-)))^{2}J_{xx}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\pi)+\sum_{j=1}^{D}q_{\alpha(h-),j}J(h,X_{h-}^{\tilde{\pi}},j;\pi)\Bigg]dh\\&+\int_{t}^{s}J_{x}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\pi)\sigma^{\tilde{\pi}}(h,X_{h-}^{\tilde{\pi}},\alpha(h-))d\tilde{W}(h)+\int_{t}^{s}dM_{h}^{\alpha},\end{align*}

where W~\tilde{W} is the effective 1-dimensional Brownian motion, and MhαM_{h}^{\alpha} is the zero-mean local martingale associated with jumps of the continuous-time Markov chain α\alpha.

Define the localizing stopping times, for n≥1n \geq 1,

τn:=inf⁡{s≥t:∫ts∣Jx(h,Xh−π~,α(h−);π)⋅σπ~(h,Xh−π~,α(h−))∣2dh≥n}.\tau_{n}:=\inf\left\{s\geq t:\int_{t}^{s}\left|J_{x}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\boldsymbol{\pi})\cdot\sigma^{\tilde{\pi}}(h,X_{h-}^{\tilde{\pi}},\alpha(h-))\right|^{2}d h\geq n\right\}.

Taking the conditional expectation of both sides, the martingale terms vanish, and we obtain

(4.5)

Et,x,i[J(s∧τn,Xs∧τnπ~,α(s∧τn);π)]−J(t,x,i;π)=Et,x,i[∫ts∧τn(Jt(h,Xh−π~,α(h−);π)+bπ~(h,Xh−π~,α(h−))Jx(h,Xh−π~,α(h−);π)+12(σπ~(h,Xh−π~,α(h−)))2Jxx(h,Xh−π~,α(h−);π)+∑j=1Dqα(h−),jJ(h,Xh−π~,j;π))dh].\begin{align*}&\mathbb{E}_{t,x,i}\left[J(s\land\tau_{n},X_{s\land\tau_{n}}^{\tilde{\pi}},\alpha(s\land\tau_{n});\boldsymbol{\pi})\right]-J(t,x,i;\boldsymbol{\pi})\\=&\mathbb{E}_{t,x,i}\left[\int_{t}^{s\land\tau_{n}}\left(J_{t}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\boldsymbol{\pi})+b^{\tilde{\pi}}(h,X_{h-}^{\tilde{\pi}},\alpha(h-))J_{x}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\boldsymbol{\pi})\right.\right.\\&\left.+\frac{1}{2}(\sigma^{\tilde{\pi}}(h,X_{h-}^{\tilde{\pi}},\alpha(h-)))^{2}J_{xx}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\boldsymbol{\pi})+\sum_{j=1}^{D}q_{\alpha(h-),j}J(h,X_{h-}^{\tilde{\pi}},j;\boldsymbol{\pi})\right)dh\Bigg].\end{align*}

On the other hand, by the Feynman-Kac equation for the performance function under fixed policy π\pi, we have the equality for all (t,x,i)∈[0,T)×(0,∞)×M(t,x,i) \in [0,T) \times (0,\infty) \times \mathcal{M}, (4.6)

−Jt(t,x,i;π)=∫AH(t,x,i,Jx,Jxx;c,u)π(c,u∣t,x,i)dcdu−λ∫Aπ(c,u∣t,x,i)ln⁡π(c,u∣t,x,i)dcdu+∑j=1DqijJ(t,x,j;π).\begin{align*}-J_{t}(t,x,i;\boldsymbol{\pi})=&\int_{\mathcal{A}}H(t,x,i,J_{x},J_{xx};c,u)\boldsymbol{\pi}(c,u\mid t,x,i)dc du\\&-\lambda\int_{\mathcal{A}}\boldsymbol{\pi}(c,u\mid t,x,i)\ln\boldsymbol{\pi}(c,u\mid t,x,i)dc du+\sum_{j=1}^{D}q_{ij}J(t,x,j;\boldsymbol{\pi}).\end{align*}

By definition, π~\tilde{\pi} is the maximizer of the functional ∫AHπ dc du−λ∫Aπln⁡π dc du\int_{\mathcal{A}} H\pi\,dc\,du - \lambda\int_{\mathcal{A}}\pi\ln\pi\,dc\,du over all admissible policies. Thus for any policy π\pi,

∫AHπdcdu−λ∫Aπln⁡πdcdu≤∫AHπ~dcdu−λ∫Aπ~ln⁡π~dcdu.\int_{\mathcal{A}}H\pi d c d u-\lambda\int_{\mathcal{A}}\pi\ln\pi d c d u\leq\int_{\mathcal{A}}H\tilde{\pi}d c d u-\lambda\int_{\mathcal{A}}\tilde{\pi}\ln\tilde{\pi}d c d u.

Substituting this into (4.6) evaluated along (h,Xh−π~,α(h−))(h, X_{h-}^{\tilde{\pi}}, \alpha(h-)) yields

(4.7)

−Jt(h,Xh−π~,α(h−);π)≤∫AH(h,Xh−π~,α(h−),Jx,Jxx;c,u)π~(c,u∣h,Xh−π~,α(h−))dcdu−λ∫Aπ~(c,u∣h,Xh−π~,α(h−))ln⁡π~(c,u∣h,Xh−π~,α(h−))dcdu+∑j=1Dqα(h−),jJ(h,Xh−π~,j;π).\begin{align*}&-J_{t}(h,X_{h-}^{\tilde{\pi}},\alpha(h-);\boldsymbol{\pi})\\\leq&\int_{\mathcal{A}}H(h,X_{h-}^{\tilde{\pi}},\alpha(h-),J_{x},J_{xx};c,u)\tilde{\pi}(c,u\mid h,X_{h-}^{\tilde{\pi}},\alpha(h-))dc du\\&-\lambda\int_{\mathcal{A}}\tilde{\pi}(c,u\mid h,X_{h-}^{\tilde{\pi}},\alpha(h-))\ln\tilde{\pi}(c,u\mid h,X_{h-}^{\tilde{\pi}},\alpha(h-))dc du\\&+\sum_{j=1}^{D}q_{\alpha(h-),j}J(h,X_{h-}^{\tilde{\pi}},j;\boldsymbol{\pi}).\end{align*}

Recall the classical Hamiltonian definition (2.11):

∫AHπ~dcdu=∫AU1(h,c)π~dcdu+bπ~Jx+12(σπ~)2Jxx.\int_{\mathcal{A}}H\tilde{\pi}d c d u=\int_{\mathcal{A}}U_{1}(h,c)\tilde{\pi}d c d u+b^{\tilde{\pi}}J_{x}+\frac{1}{2}(\sigma^{\tilde{\pi}})^{2}J_{x x}.

Substituting it into (4.7) and re-arranging terms lead to

Jt+bπ~Jx+12(σπ~)2Jxx+∑j=1Dqα(h−),jJ≥−∫AU1π~dcdu+λ∫Aπ~ln⁡π~dcdu.J_{t}+b^{\tilde{\pi}}J_{x}+\frac{1}{2}(\sigma^{\tilde{\pi}})^{2}J_{x x}+\sum_{j=1}^{D}q_{\alpha(h-),j}J\geq-\int_{\mathcal{A}}U_{1}\tilde{\pi}d c d u+\lambda\int_{\mathcal{A}}\tilde{\pi}\ln\tilde{\pi}d c d u.

C. HU, D. LI, X. LI, AND Y. ZENG

Plugging the above inequality into (4.5), we get

J(t,x,i;π)≤Et,x,i[∫ts∧τn(∫AU1(h,c)π~(c,u∣h,Xh−π~,α(h−))dcdu−λ∫Aπ~(c,u∣h,Xh−π~,α(h−))ln⁡π~(c,u∣h,Xh−π~,α(h−))dcdu)dh+J(s∧τn,Xs∧τnπ~,α(s∧τn);π)].\begin{align*}J(t,x,i;\boldsymbol{\pi})\leq&\mathbb{E}_{t,x,i}\bigg[\int_{t}^{s\wedge\tau_{n}}\Bigg(\int_{\mathcal{A}}U_{1}(h,c)\tilde{\boldsymbol{\pi}}(c,u\mid h,X_{h-}^{\tilde{\boldsymbol{\pi}}},\alpha(h-))dc du\\&-\lambda\int_{\mathcal{A}}\tilde{\boldsymbol{\pi}}(c,u\mid h,X_{h-}^{\tilde{\boldsymbol{\pi}}},\alpha(h-))\ln\tilde{\boldsymbol{\pi}}(c,u\mid h,X_{h-}^{\tilde{\boldsymbol{\pi}}},\alpha(h-))dc du\Bigg)dh\\&+J(s\wedge\tau_{n},X_{s\wedge\tau_{n}}^{\tilde{\boldsymbol{\pi}}},\alpha(s\wedge\tau_{n});\boldsymbol{\pi})\bigg].\end{align*}

Set s=Ts = T and let n→∞n \to \infty. By the dominated convergence theorem and the terminal condition J(T,XTπ~,α(T);π)=U2(XTπ~)J(T, X_T^{\tilde{\pi}}, \alpha(T); \pi) = U_2(X_T^{\tilde{\pi}}), we derive that for all (t,x,i)∈[0,T]×(0,∞)×M(t, x, i) \in [0, T] \times (0, \infty) \times \mathcal{M},

J(t,x,i;π)≤Et,x,i[∫tT(∫AU1(h,c)π~(c,u∣h,Xh−π~,α(h−))dcdu−λ∫Aπ~(c,u∣h,Xh−π~,α(h−))ln⁡π~(c,u∣h,Xh−π~,α(h−))dcdu)dh+U2(XTπ~)]=J(t,x,i;π~).\begin{align*}J(t,x,i;\boldsymbol{\pi})\leq&\mathbb{E}_{t,x,i}\bigg[\int_{t}^{T}\bigg(\int_{\mathcal{A}}U_{1}(h,c)\tilde{\boldsymbol{\pi}}(c,u\mid h,X_{h-}^{\tilde{\boldsymbol{\pi}}},\alpha(h-))dc du\\&-\lambda\int_{\mathcal{A}}\tilde{\boldsymbol{\pi}}(c,u\mid h,X_{h-}^{\tilde{\boldsymbol{\pi}}},\alpha(h-))\ln\tilde{\boldsymbol{\pi}}(c,u\mid h,X_{h-}^{\tilde{\boldsymbol{\pi}}},\alpha(h-))dc du\bigg)dh+U_{2}(X_{T}^{\tilde{\boldsymbol{\pi}}})\bigg]\\&=J(t,x,i;\tilde{\boldsymbol{\pi}}).\end{align*}

THEOREM 4.3. (Policy improvement via q-function). Let π(c,u∣t,x,i)∈Π\pi(c, u \mid t, x, i) \in \Pi be an arbitrarily given admissible policy. Suppose that the corresponding exploratory performance function J(⋅,⋅,i;π)∈C1,2([0,T)×(0,∞))∩C0([0,T]×(0,∞))J(\cdot, \cdot, i; \pi) \in C^{1,2}([0, T) \times (0, \infty)) \cap C^0([0, T] \times (0, \infty)) for each i∈Mi \in \mathcal{M}, and satisfies Jx>0J_x > 0 and Jxx<0J_{xx} < 0 (i.e., JJ is strictly increasing and concave with respect to xx). For any (t,x,i)∈[0,T)×(0,∞)×M(t, x, i) \in [0, T) \times (0, \infty) \times \mathcal{M}, if the updated policy π~(c,u∣t,x,i)\tilde{\pi}(c, u \mid t, x, i) defined as

(4.8)

π~(c,u∣t,x,i)=exp⁡(1λq(t,x,i;c,u;π))∫Aexp⁡(1λq(t,x,i;c′,u′;π))dc′du′\tilde{\pi}(c,u\mid t,x,i)=\frac{\exp\left(\frac{1}{\lambda}q(t,x,i;c,u;\pi)\right)}{\int_{\mathcal{A}}\exp\left(\frac{1}{\lambda}q(t,x,i;c^{\prime},u^{\prime};\pi)\right)d c^{\prime}d u^{\prime}}

is admissible, then the exploratory performance function under the new policy satisfies

(4.9)

J(t,x,i;π~)≥J(t,x,i;π).J(t,x,i;\tilde{\pi})\geq J(t,x,i;\pi).

Proof. The proof follows directly from Definition 4.1 and Lemma 4.2.

4.2. Martingale characterization of the q-function. Following the ideas in [6, 19], this subsection specializes the martingale characterization for the continuous-time exploratory state process within a regime-switching setting.

LEMMA 4.4 (Characterization of the exploratory q-function). Let an admissible policy π∈Π\pi \in \Pi be given, and suppose its value function J(⋅,⋅,i;π)∈C1,2([0,T]×(0,∞))∩C([0,T]×(0,∞))J(\cdot, \cdot, i; \pi) \in C^{1,2}([0, T] \times (0, \infty)) \cap C([0, T] \times (0, \infty)) for all i∈Mi \in \mathcal{M}. Let a continuous function q^:[0,T]×(0,∞)×M×A→R\hat{q} : [0, T] \times (0, \infty) \times \mathcal{M} \times \mathcal{A} \to \mathbb{R} be given. Then, we have

(i) q^(t,x,i,c,u)=q(t,x,i,c,u;π)\hat{q}(t,x,i,c,u)=q(t,x,i,c,u;\pi) for all (t,x,i,c,u)∈[0,T]×(0,∞)×M×A(t,x,i,c,u)\in[0,T]\times(0,\infty)\times\mathcal{M}\times\mathcal{A} if and only if for all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i)\in[0,T]\times(0,\infty)\times\mathcal{M}, the following process

(4.10)

J(s,Xπ(s),α(s);π)+∫ts[U1(v,cπ(v))−q^(v,Xπ(v),α(v),cπ(v),uπ(v))]dv,\begin{aligned}&J(s,X^{\pi}(s),\alpha(s);\pi)\\ &+\int_{t}^{s}\left[U_{1}(v,c^{\pi}(v))-\hat{q}(v,X^{\pi}(v),\alpha(v),c^{\pi}(v),u^{\pi}(v))\right]d v,\\ \end{aligned}

is an {Fs}s≥t,P\{\mathcal{F}_s\}_{s\geq t}, \mathbb{P}-martingale, where {Xπ(s),t≤s≤T}\{X^\pi(s), t \leq s \leq T\} is the solution to the exploratory SDE under π\pi with initial conditions Xπ(t)=x,α(t)=iX^\pi(t) = x, \alpha(t) = i, and (cπ(v),uπ(v))(c^\pi(v), u^\pi(v)) is the action process sampled from π(⋅∣v,Xπ(v),α(v))\pi(\cdot \mid v, X^\pi(v), \alpha(v)).

(ii) If q^(t,x,i,c,u)=q(t,x,i,c,u;π)\hat{q}(t,x,i,c,u) = q(t,x,i,c,u;\pi) for all (t,x,i,c,u)∈[0,T]×(0,∞)×M×A(t,x,i,c,u) \in [0,T] \times (0,\infty) \times \mathcal{M} \times \mathcal{A}, then given any other admissible policy π′∈Π\pi' \in \Pi, for all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i) \in [0,T] \times (0,\infty) \times \mathcal{M}, the following process

(4.11)

J(s,Xπ′(s),α(s);π)+∫ts[U1(v,cπ′(v))−q^(v,Xπ′(v),α(v),cπ′(v),uπ′(v))]dv,\begin{aligned}&J(s,X^{\pi^{\prime}}(s),\alpha(s);\pi)\\&+\int_{t}^{s}\left[U_{1}(v,c^{\pi^{\prime}}(v))-\hat{q}(v,X^{\pi^{\prime}}(v),\alpha(v),c^{\pi^{\prime}}(v),u^{\pi^{\prime}}(v))\right]d v,\\ \end{aligned}

is an {Fs}s≥t,P\{\mathcal{F}_s\}_{s\geq t}, \mathbb{P}-martingale. Here, {Xπ′(s),t≤s≤T}\{X^{\pi'}(s), t \leq s \leq T\} is the solution to the exploratory SDE under π′\pi' with Xπ′(t)=xX^{\pi'}(t) = x, α(t)=i\alpha(t) = i, and (cπ′(v),uπ′(v))(c^{\pi'}(v), u^{\pi'}(v)) is the action process sampled from π′(⋅∣v,Xπ′(v),α(v))\pi'(\cdot \mid v, X^{\pi'}(v), \alpha(v)).

(iii) If there exists an admissible policy π′∈Π\pi' \in \Pi such that for all (t,x,i)∈[0,T]×(0,∞)×M(t, x, i) \in [0, T] \times (0, \infty) \times \mathcal{M}, the process defined in (4.11) is an {Fs}s≥t,P\{\mathcal{F}_s\}_{s \geq t}, \mathbb{P}-martingale with initial condition Xπ′(t)=x,α(t)=iX^{\pi'}(t) = x, \alpha(t) = i, then q^(t,x,i,c,u)=q(t,x,i,c,u;π)\hat{q}(t, x, i, c, u) = q(t, x, i, c, u; \pi) for all (t,x,i,c,u)∈[0,T]×(0,∞)×M×A(t, x, i, c, u) \in [0, T] \times (0, \infty) \times \mathcal{M} \times \mathcal{A}.

Moreover, in any of the three cases above, the q-function satisfies

(4.12)

∫A[q(t,x,i,c,u;π)−λln⁡π(c,u∣t,x,i)]π(c,u∣t,x,i)dcdu=0.\int_{\mathcal{A}}[q(t,x,i,c,u;\pi)-\lambda\ln\pi(c,u\mid t,x,i)]\pi(c,u\mid t,x,i)d c d u=0.

The proof follows the same argument as that of Proposition 3.4 in [19] and is therefore omitted.

As in Theorem 3.5 of [19], we can strengthen Lemma 4.4 to jointly characterize the q-function and the value function associated with a given policy π\pi.

LEMMA 4.5 (Martingale characterization). Let an admissible policy π∈Π\pi \in \Pi, a function J^(⋅,⋅,i)∈C1,2([0,T]×(0,∞))∩C([0,T]×(0,∞))\hat{J}(\cdot, \cdot, i) \in C^{1,2}([0, T] \times (0, \infty)) \cap C([0, T] \times (0, \infty)) for all i∈Mi \in \mathcal{M}, and a continuous function q^:[0,T]×(0,∞)×M×A→R\hat{q} : [0, T] \times (0, \infty) \times \mathcal{M} \times \mathcal{A} \to \mathbb{R} be given such that, for all (t,x,i,c,u)∈[0,T]×(0,∞)×M×A(t, x, i, c, u) \in [0, T] \times (0, \infty) \times \mathcal{M} \times \mathcal{A},

(4.13)

{J^(T,x,i)=U2(x),∫A[q^(t,x,i,c,u)−λln⁡π(c,u∣t,x,i)]π(c,u∣t,x,i)dcdu=0.\left\{\begin{array}{l}\hat{J}(T,x,i)=U_{2}(x),\\ \int_{\mathcal{A}}[\hat{q}(t,x,i,c,u)-\lambda\ln\pi(c,u\mid t,x,i)]\pi(c,u\mid t,x,i)d c d u=0.\end{array}\right.

Then,

(i) J^(t,x,i)\hat{J}(t,x,i) and q^(t,x,i,c,u)\hat{q}(t,x,i,c,u) are respectively the value function and the q function associated with π\pi if and only if for all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i) \in [0,T] \times (0,\infty) \times \mathcal{M}, the following process

(4.14)

J^(s,Xπ(s),α(s))+∫ts[U1(v,cπ(v))−q^(v,Xπ(v),α(v),cπ(v),uπ(v))]dv,\hat{J}(s,X^{\pi}(s),\alpha(s))+\int_{t}^{s}\left[U_{1}(v,c^{\pi}(v))-\hat{q}(v,X^{\pi}(v),\alpha(v),c^{\pi}(v),u^{\pi}(v))\right]d v,

is an {Fs}s≥t,P\{\mathcal{F}_s\}_{s\geq t}, \mathbb{P}-martingale, where {Xπ(s),t≤s≤T}\{X^\pi(s), t \leq s \leq T\} is the solution to the exploratory SDE under π\pi with initial conditions Xπ(t)=x,α(t)=iX^\pi(t) = x, \alpha(t) = i, and (cπ(v),uπ(v))(c^\pi(v), u^\pi(v)) is the action process sampled from π(⋅∣v,Xπ(v),α(v))\pi(\cdot \mid v, X^\pi(v), \alpha(v)).

(ii) If J^(t,x,i)\hat{J}(t,x,i) and q^(t,x,i,c,u)\hat{q}(t,x,i,c,u) are respectively the value function and the q-function associated with π\pi, then for any admissible policy π′∈Π\pi' \in \Pi and all (t,x,i)∈[0,T]×(0,∞)×M(t,x,i) \in [0,T] \times (0,\infty) \times \mathcal{M}, the following process

(4.15)

J^(s,Xπ′(s),α(s))+∫ts[U1(v,cπ′(v))−q^(v,Xπ′(v),α(v),cπ′(v),uπ′(v))]dv,\hat{J}(s,X^{\pi^{\prime}}(s),\alpha(s))+\int_{t}^{s}\left[U_{1}(v,c^{\pi^{\prime}}(v))-\hat{q}(v,X^{\pi^{\prime}}(v),\alpha(v),c^{\pi^{\prime}}(v),u^{\pi^{\prime}}(v))\right]d v,

C. HU, D. LI, X. LI, AND Y. ZENG

is an ({Fs}s≥t,P)\left(\{\mathcal{F}_s\}_{s\geq t},\mathbb{P}\right)-martingale, where {Xπ′(s),t≤s≤T}\{X^{\pi'}(s),t\leq s\leq T\} is the solution to the exploratory SDE under π′\pi' with Xπ′(t)=x,α(t)=iX^{\pi'}(t)=x,\alpha(t)=i, and (cπ′(v),uπ(v))(c^{\pi'}(v),u^{\pi}(v)) is the action process sampled from π′(⋅∣v,Xπ′(v),α(v))\pi'(\cdot\mid v,X^{\pi'}(v),\alpha(v)).

(iii) If there exists π′∈Π\pi' \in \Pi such that for all (t,x,i)∈[0,T]×(0,∞)×M(t, x, i) \in [0, T] \times (0, \infty) \times \mathcal{M}, the process (4.15) is an {Fs}s≥t,P\{\mathcal{F}_s\}_{s \geq t}, \mathbb{P}-martingale with initial condition Xπ′(t)=x,α(t)=iX^{\pi'}(t) = x, \alpha(t) = i, then J^(t,x,i)\hat{J}(t, x, i) and q^(t,x,i,c,u)\hat{q}(t, x, i, c, u) are respectively the value function and the q-function associated with π\pi.

Moreover, in any of the three cases above, if it holds further that π\pi takes the form of the Gibbs measure

(4.16)

π(c,u∣t,x,i)=exp⁡(1λq^(t,x,i,c,u))∫Aexp⁡(1λq^(t,x,i,c′,u′))dc′du′,\pi(c,u\mid t,x,i)=\frac{\exp\left(\frac{1}{\lambda}\hat{q}(t,x,i,c,u)\right)}{\int_{\mathcal{A}}\exp\left(\frac{1}{\lambda}\hat{q}(t,x,i,c^{\prime},u^{\prime})\right)d c^{\prime}d u^{\prime}},

assuming the normalizing constant is finite for all (t,x,i)(t,x,i), then π\pi is the optimal policy and J^\hat{J} is the corresponding optimal value function.

Remark 4.6. Lemma 4.5-(i) facilitates on-policy learning, where learning the q-function of a given target policy π\pi is based on the data

{(s,Xsπ,αs,csπ,usπ),t≤s≤T}\{(s,X_{s}^{\pi},\alpha_{s},c_{s}^{\pi},u_{s}^{\pi}),t\leq s\leq T\}

generated by π\pi itself. On the other hand, Lemma 4.5-(ii) and -(iii) provide the theoretical foundation for off-policy learning, where learning the q-function of π\pi is based on data generated by a different policy π′\pi', known as the behavior policy.

The continuous-time difference (CTD) error differential dδtd\delta_{t} for the q-function is given by the increment of the martingale

(4.17)

dδt=dJ^(t,Xt,αt)+(U1(t,ct)−q^(t,Xt,αt;ct,ut))dt.d\delta_{t}=d\hat{J}(t,X_{t},\alpha_{t})+(U_{1}(t,c_{t})-\hat{q}(t,X_{t},\alpha_{t};c_{t},u_{t}))d t.

By the martingale property, the expectation of the stochastic integral of this differential with respect to any predictable test process must be zero. This continuous-time orthogonality condition serves as the foundation for driving the parameter updates in our actor-critic architecture.

4.3. Algorithm design. We adopt a parameterized actor-critic framework that avoids direct integration over continuous action spaces. A key challenge in our regime-switching setting is that the optimal Gibbs policy derived from the entropy-regularized control problem involves a normalizing constant that, in general, cannot be computed in closed form, especially when the action space is jointly continuous over consumption c and investment u. Following the approach of [5, 19], we therefore parameterize both the value function and the policy within tractable families of distributions (e.g., Gaussian) and update the network parameters by minimizing the Kullback–Leibler (KL) divergence to the target Gibbs measure, rather than by evaluating the normalizing constant directly.

Let ϕ\phi and ω\omega denote the parameters of the value function Vϕ(t,x,i)V_{\phi}(t,x,i) and the stochastic policy πω(c,u∣t,x,i)\pi_{\omega}(c,u\mid t,x,i), respectively. By Itô's lemma applied to VϕV_{\phi} along the grid-sampled trajectory, the qq-function satisfies

(4.18)

q(tk,Xtk,αtk;ctk,utk)Δt=V(tk+1,Xtk+1,αtk+1)−V(tk,Xtk,αtk)+U1(tk,ctk)Δt+M(tk,tk+1),\begin{align*}q(t_{k},X_{t_{k}},\alpha_{t_{k}};c_{t_{k}},u_{t_{k}})\Delta t=&V(t_{k+1},X_{t_{k+1}},\alpha_{t_{k+1}})-V(t_{k},X_{t_{k}},\alpha_{t_{k}})\\&+U_{1}(t_{k},c_{t_{k}})\Delta t+M(t_{k},t_{k+1}),\end{align*}

where M(tk,tk+1)M(t_k, t_{k+1}) is a martingale difference. Dropping it and replacing V by VϕV_\phi, the combination (q−λln⁡πω)Δt(q - \lambda \ln \pi_\omega) \Delta t arising in the policy gradient is approximated by the empirical CTD error

(4.19)

δ^tk=Vϕ(tk+1,Xtk+1,αtk+1)−Vϕ(tk,Xtk,αtk)+(U1(tk,ctk)−λln⁡πω(ctk,utk∣tk,Xtk,αtk))Δt,\begin{aligned}\hat{\delta}_{t_{k}}=&V_{\phi}(t_{k+1},X_{t_{k+1}},\alpha_{t_{k+1}})-V_{\phi}(t_{k},X_{t_{k}},\alpha_{t_{k}})\\&+\Big(U_{1}(t_{k},c_{t_{k}})-\lambda\ln\pi_{\omega}(c_{t_{k}},u_{t_{k}}\mid t_{k},X_{t_{k}},\alpha_{t_{k}})\Big)\Delta t,\end{aligned}

where, at the terminal time tK=Tt_{K}=T, the value network is naturally anchored by the terminal wealth utility, satisfying Vϕ(T,XT,αT)=U2(XT)V_{\phi}(T,X_{T},\alpha_{T})=U_{2}(X_{T}).

4.3.1. Critic update. The critic parameters ϕ\phi are updated to minimize the squared CTD error using a semi-gradient approach. Choosing the test function as ξtk=∂ϕVϕ(tk,Xtk,αtk)\xi_{t_k} = \partial_\phi V_\phi(t_k, X_{t_k}, \alpha_{t_k}), the update rule is

(4.20)

ϕ←ϕ+αϕ∂ϕVϕ(tk,Xtk,αtk)δ^tk,\phi\leftarrow\phi+\alpha_{\phi}\partial_{\phi}V_{\phi}(t_{k},X_{t_{k}},\alpha_{t_{k}})\hat{\delta}_{t_{k}},

where αϕ>0\alpha_{\phi} > 0 denotes the learning rate for the critic network.

4.3.2. Actor update. To update the actor parameters ω\omega, we minimize the Kullback-Leibler (KL) divergence between the parameterized policy πω\pi_{\omega} and the theoretically optimal Gibbs measure. Using the score function ζtk=∂ωln⁡πω(ctk,utk∣tk,Xtk,αtk)\zeta_{t_k} = \partial_{\omega} \ln \pi_{\omega}(c_{t_k}, u_{t_k} \mid t_k, X_{t_k}, \alpha_{t_k}), the model-free update rule driven by the empirical CTD error is

(4.21)

ω←ω+αω∂ωln⁡πω(ctk,utk∣tk,Xtk,αtk)δ^tk,\omega\leftarrow\omega+\alpha_{\omega}\partial_{\omega}\ln\pi_{\omega}(c_{t_{k}},u_{t_{k}}\mid t_{k},X_{t_{k}},\alpha_{t_{k}})\hat{\delta}_{t_{k}},

where αω>0\alpha_{\omega} > 0 represents the learning rate for the actor network.

Below, we summarize the implementation logic in two frameworks: an online incremental algorithm (Algorithm 4.1) and an offline episodic algorithm (Algorithm 4.2). We execute the stochastic policies on a uniform time grid with step size Δt\Delta t such that S={0=t0<t1<⋯<tK=T}\mathbb{S} = \{0 = t_0 < t_1 < \cdots < t_K = T\}.

Remark 4.7. In practical implementations of the actor update, if the theoretical functional form of the optimal policy distribution is known a priori, it is advantageous to parameterize πω\pi_{\omega} accordingly. For instance, in our continuous-time consumption-investment optimization problem, the theoretical optimal investment strategy u typically follows a Gaussian distribution, while the optimal consumption c follows a distribution defined on the positive half-line, such as a Gamma distribution. By designing the actor network to directly output the specific statistical parameters of these exact distributions (e.g., the mean and variance for the Gaussian distribution, and the shape and rate parameters for the Gamma distribution), we inject structural theoretical priors into the model. This explicit parameterization significantly reduces the hypothesis space compared to using a generic, black-box density estimator. Consequently, this structure not only accelerates the convergence of the actor-critic algorithm but also enhances training stability.

4.4. Numerical examples. In this subsection, we present numerical experiments to demonstrate the effectiveness of the proposed actor-critic q-learning algorithm for the exploratory regime-switching consumption-investment problem. To clarify the experimental setup, we explicitly distinguish between the parameters used to construct the Environment simulator (which governs the underlying dynamics but remains unknown to the learning agent) and the parameters required as known inputs for the learning algorithm.

Environment simulator parameters. The simulator is built upon a financial market with D = 2 regimes, representing a “bull” market (Regime 0) and a “bear” market (Regime 1). The hidden market parameters for the two regimes are set as follows.

C. HU, D. LI, X. LI, AND Y. ZENG

Algorithm 4.1 Online Incremental q-Learning Algorithm

1: Input: Initial state x0>0x_0 > 0, initial regime i0i_0, horizon TT, time step Δt\Delta t, number of episodes NN, number of mesh grids KK, learning rates αϕ,αω\alpha_\phi, \alpha_\omega, schedule l(j)l(j), and temperature parameter λ\lambda.

2: Initialize: Critic parameters ϕ\phi and actor parameters ω\omega.

3: for episode j=1,2,…,Nj = 1, 2, \ldots, N do

4: Initialize k=0k = 0. Observe initial state Xt0←x0X_{t_0} \leftarrow x_0 and regime αt0←i0\alpha_{t_0} \leftarrow i_0.

5: while k<Kk < K do

6: Sample action (ctk,utk)∼πω(⋅∣tk,Xtk,αtk)(c_{t_k}, u_{t_k}) \sim \pi_\omega(\cdot \mid t_k, X_{t_k}, \alpha_{t_k}).

7: Apply action (ctk,utk)(c_{t_k}, u_{t_k}) to the Environment Simulator; observe new wealth Xtk+1X_{t_{k+1}}, regime αtk+1\alpha_{t_{k+1}}, and utility r(tk)=U1(tk,ctk)r(t_k) = U_1(t_k, c_{t_k}).

8: Define the next-state evaluation:

9: vnext=U2(Xtk+1)v_{\text{next}} = U_2(X_{t_{k+1}}) if k=K−1k = K - 1; otherwise, Vϕ(tk+1,Xtk+1,αtk+1)V_\phi(t_{k+1}, X_{t_{k+1}}, \alpha_{t_{k+1}}).

10: Compute the empirical CTD error:

11: δ^tk=vnext−Vϕ(tk,Xtk,αtk)+(r(tk)−λln⁡πω(ctk,utk∣tk,Xtk,αtk))Δt\hat{\delta}_{t_k} = v_{\text{next}} - V_\phi(t_k, X_{t_k}, \alpha_{t_k}) + (r(t_k) - \lambda \ln \pi_\omega(c_{t_k}, u_{t_k} \mid t_k, X_{t_k}, \alpha_{t_k})) \Delta t

12: Update Critic:

13: ϕ←ϕ+l(j)αϕ∂ϕVϕ(tk,Xtk,αtk)δ^tk\phi \leftarrow \phi + l(j) \alpha_\phi \partial_\phi V_\phi(t_k, X_{t_k}, \alpha_{t_k}) \hat{\delta}_{t_k}

14: Update Actor:

15: ω←ω+l(j)αω∂ωln⁡πω(ctk,utk∣tk,Xtk,αtk)δ^tk\omega \leftarrow \omega + l(j) \alpha_\omega \partial_\omega \ln \pi_\omega(c_{t_k}, u_{t_k} \mid t_k, X_{t_k}, \alpha_{t_k}) \hat{\delta}_{t_k}

16: Update k←k+1k \leftarrow k + 1.

17: end while

18: end for

• Regime 0 (Bull market): The risk-free rate r(0)=0.03r(0) = 0.03, expected return μ(0)=0.08\mu(0) = 0.08, and volatility σ(0)=0.15\sigma(0) = 0.15.

• Regime 1 (Bear market): The risk-free rate r(1)=0.01r(1) = 0.01, expected return μ(1)=0.04\mu(1) = 0.04, and volatility σ(1)=0.25\sigma(1) = 0.25.

The generator matrix of the continuous-time Markov chain is given by

(4.22)

Q=(−0.50.51.0−1.0),Q=\begin{pmatrix}-0.5&0.5\\ 1.0&-1.0\end{pmatrix},

which implies that the market tends to recover from the bear state to the bull state faster than it transitions from the bull state to the bear state.

Learning algorithm inputs and settings. The agent requires several known inputs to execute the learning process. The finite time horizon is set to T=1.0T = 1.0, which is divided into K=50K = 50 mesh grids, yielding a time step of Δt=0.02\Delta t = 0.02. The temperature parameter is inputted as λ=0.1\lambda = 0.1. To evaluate the agent's performance, the objective incorporates both an instantaneous consumption utility function and a terminal utility function. The specific mathematical forms of these utility functions will be explicitly defined in the subsequent subsections for different experimental scenarios.

To approximate the value function, the critic network employs a structured design using a LogSumExp formulation to guarantee monotonicity and concavity with respect to the wealth variable xx. The neural networks for the actor and critic parameters (ω\omega and ϕ\phi) are trained using the Adam optimizer with initial learning rates αϕ=αω=10−3\alpha_{\phi} = \alpha_{\omega} = 10^{-3} over N=820N = 820 episodes.

4.4.1. Numerical analysis for logarithmic utility function. We consider the case where both the instantaneous consumption utility and the terminal utility are logarithmic. Specifically, the consumption utility is given by U1(t,c)=e−ρtln⁡(c)U_{1}(t,c) = e^{-\rho t} \ln(c)

Algorithm 4.2 Offline Episodic q-Learning Algorithm

1: Input: Initial state x0>0x_0 > 0, initial regime i0i_0, horizon TT, time step Δt\Delta t, number of episodes NN, number of mesh grids KK, initial learning rates αϕ\alpha_\phi and αω\alpha_\omega, schedule l(j)l(j), and temperature parameter λ\lambda.

2: Initialize: Critic parameters ϕ\phi and actor parameters ω\omega.

3: for episode j=1,2,…,Nj = 1, 2, \ldots, N do

4: Initialize k=0k = 0. Observe initial state Xt0←x0X_{t_0} \leftarrow x_0 and regime αt0←i0\alpha_{t_0} \leftarrow i_0.

5: while k<Kk < K do

6: Sample action (ctk,utk)∼πω(⋅∣tk,Xtk,αtk)(c_{t_k}, u_{t_k}) \sim \pi_\omega(\cdot \mid t_k, X_{t_k}, \alpha_{t_k}).

7: Apply action (ctk,utk)(c_{t_k}, u_{t_k}) to the Environment Simulator.

8: Observe new wealth state Xtk+1X_{t_{k+1}}, new regime αtk+1\alpha_{t_{k+1}}, and instantaneous utility r(tk)=U1(tk,ctk)r(t_k) = U_1(t_k, c_{t_k}).

9: Store transition tuple (tk,Xtk,αtk,ctk,utk,r(tk),Xtk+1,αtk+1)(t_k, X_{t_k}, \alpha_{t_k}, c_{t_k}, u_{t_k}, r(t_k), X_{t_{k+1}}, \alpha_{t_{k+1}}) in the episode buffer.

10: Update k←k+1k \leftarrow k + 1.

11: end while

12: for step k=0,1,…,K−1k = 0, 1, \ldots, K - 1 do

13: Define the next-state evaluation:

14: vnext=U2(Xtk+1)v_{\text{next}} = U_2(X_{t_{k+1}}) if k=K−1k = K - 1; otherwise, Vϕ(tk+1,Xtk+1,αtk+1)V_\phi(t_{k+1}, X_{t_{k+1}}, \alpha_{t_{k+1}}).

15: Compute the empirical CTD error:

16: δ^tk=vnext−Vϕ(tk,Xtk,αtk)+(r(tk)−λln⁡πω(ctk,utk∣tk,Xtk,αtk))Δt\hat{\delta}_{t_k} = v_{\text{next}} - V_\phi(t_k, X_{t_k}, \alpha_{t_k}) + (r(t_k) - \lambda \ln \pi_\omega(c_{t_k}, u_{t_k} \mid t_k, X_{t_k}, \alpha_{t_k})) \Delta t

17: end for

18: Compute the cumulative parameter updates:

19: Δϕ=∑k=0K−1∂ϕVϕ(tk,Xtk,αtk)δ^tk\Delta \phi = \sum_{k=0}^{K-1} \partial_\phi V_\phi(t_k, X_{t_k}, \alpha_{t_k}) \hat{\delta}_{t_k}

20: Δω=∑k=0K−1∂ωln⁡πω(ctk,utk∣tk,Xtk,αtk)δ^tk\Delta \omega = \sum_{k=0}^{K-1} \partial_\omega \ln \pi_\omega(c_{t_k}, u_{t_k} \mid t_k, X_{t_k}, \alpha_{t_k}) \hat{\delta}_{t_k}

21: Apply parameter updates:

22: ϕ←ϕ+l(j)αϕΔϕ\phi \leftarrow \phi + l(j) \alpha_\phi \Delta \phi; ω←ω+l(j)αωΔω\omega \leftarrow \omega + l(j) \alpha_\omega \Delta \omega

23: end for

with a subjective discount rate ρ=0.5\rho = 0.5, and the terminal utility is defined as U2(x)=ln⁡(x)U_2(x) = \ln(x). To sample exploratory actions under this setting, the actor network models the investment strategy uu using a Gaussian distribution and the consumption strategy cc using a Gamma distribution.

Convergence of Losses. As depicted in Fig. 1, the squared CTD error of the Critic network decreases rapidly and stabilizes around zero. Concurrently, the Actor policy loss converges smoothly under the continuous-time policy entropy regularization. This dual stability indicates that the Critic effectively approximates the underlying HJB equation while the Actor maintains a well-balanced trade-off between exploration and exploitation.

Value Function Properties. Fig. 2 illustrates the learned value functions V(0,x,i)V(0, x, i) for Regime 0 (Bull market) and Regime 1 (Bear market). Two economic features emerge as follows.

  • Monotonicity and concavity: For both market regimes, V(0,x,i)V(0, x, i) is strictly increasing and strictly concave with respect to wealth xx, reflecting the investor's risk aversion.

  • Regime superiority: The value function in Regime 0 consistently dominates that in Regime 1 across the entire wealth spectrum (V(0,x,0)>V(0,x,1)V(0, x, 0) > V(0, x, 1)), confirming that the policy captures higher expected returns in favorable eco-

C. HU, D. LI, X. LI, AND Y. ZENG

Figure

FIG. 1. Convergence of Actor and Critic Losses. The figure illustrates a stable loss convergence under logarithmic consumption utility and logarithmic terminal utility.

Figure

FIG. 2. Value Function V(0,x,i)V(0,x,i). The numerical performance demonstrates monotonic and concave value functions under logarithmic consumption utility and logarithmic terminal utility.

nomic regimes.

Optimal Exploratory Strategy Distributions. Fig. 3 illustrates the optimal exploratory policies. To handle continuous action spaces, the Actor network parameterizes and learns the probability distributions of the actions. Notably, the classical deterministic optimal strategy corresponds to the mode (the peak) of these distributions rather than the mean.

  • Investment strategy uu (Gaussian): Modeled as u∼N(μu,σu2)u \sim \mathcal{N}(\mu_u, \sigma_u^2). Because the Gaussian distribution is symmetric, its mode coincides with its mean μu\mu_u. The peak for Regime 0 (Bull market, red line) is noticeably shifted to the right compared to Regime 1 (Bear market, black dashed line), indicating higher optimal capital allocation and risk exposure during economic prosperity.

  • Consumption strategy cc (Gamma): Modeled as c∼Gamma(αc,βc)c \sim \text{Gamma}(\alpha_c, \beta_c) to enforce c>0c > 0. Due to skewness, the mode distinctly differs from the expected value. Based on the distribution plot, the density peak for Regime 1 (Bear market, black dashed line) is higher and shifted to the left (c≈0.85c \approx 0.85) relative to Regime 0 (Bull market, red line, c≈0.90c \approx 0.90). This indicates a more

Figure

FIG. 3. Exploratory Strategy Distributions of u and c. The policy parameterization uses a Gaussian distribution for the investment strategy u and a Gamma distribution for the consumption strategy c.

concentrated and conservative strategy during the bear regime, restricting immediate consumption, whereas the high-return bull regime permits a slightly higher, more dispersed consumption profile.

4.4.2. Numerical examples for power utility function. To examine the applicability of the proposed algorithm beyond logarithmic utility, we consider power utility for both consumption and terminal wealth. Specifically, we set U1(t,c)=e−ρtc1−γ/(1−γ)U_1(t, c) = e^{-\rho t} c^{1-\gamma}/(1-\gamma) and U2(x)=x1−γ/(1−γ)U_2(x) = x^{1-\gamma}/(1-\gamma), where ρ=0.5\rho = 0.5 and the coefficient of relative risk aversion is γ=0.5\gamma = 0.5. This is the parameterization discussed in Remark 3.3.

Convergence of Losses

Figure

FIG. 4. Convergence of Actor and Critic Losses. The figure illustrates stable convergence of the losses under power consumption utility and power terminal utility ( γ=0.5\gamma = 0.5).

Convergence of Losses. As illustrated in Fig. 4, both the Actor and Critic losses demonstrate overall convergence stability across the training episodes. Although a temporary disturbance in the Critic loss occurs around episode 130, the neural network rapidly self-corrects and stabilizes near zero. This rapid recovery highlights the numerical resilience and algorithmic stability of our continuous-time q-Learning framework in handling non-linear power utility specifications.

Value Function Properties. Fig. 5 depicts the learned value functions V(0,x,i)V(0, x, i) at t = 0 under power utility ( γ=0.5\gamma = 0.5). The learned values satisfy key economic properties.

• Monotonicity and concavity: Across both market regimes, V(0,x,i)V(0, x, i) remains

C. HU, D. LI, X. LI, AND Y. ZENG

Value Function V(0,x,i)

Figure

FIG. 5. Value Function V(0,x,i)V(0,x,i). The numerical performance demonstrates monotonic and concave value functions under power consumption utility and power terminal utility ( γ=0.5\gamma = 0.5).

strictly increasing and concave with respect to wealth x, consistent with the investor's persistent risk-averse behavior.

  • Regime dominance: The value function in Regime 0 (Bull market, blue solid curve) dominates that in Regime 1 (Bear market, orange dashed curve) over the entire wealth grid (V(0,x,0)>V(0,x,1))(V(0,x,0) > V(0,x,1)), corroborating the higher expected reward potential in economic expansions.

Figure

FIG. 6. Exploratory Strategy Distributions of u and c. The policy parameterization uses a Gaussian distribution for the investment strategy u, while the empirical distribution of the consumption strategy c shares some structural similarities with a Gamma distribution under power utility ( γ=0.5\gamma = 0.5).

Optimal Exploratory Strategy Distributions. As shown in Fig. 6, the action probability distributions learned by the Actor network capture state-dependent investment and consumption behaviors.

  • Investment strategy uu (Gaussian): Parameterized as u∼N(μu,σu2)u \sim \mathcal{N}(\mu_u, \sigma_u^2), the mode for Regime 0 (Bull market, red solid curve) is shifted rightward relative to Regime 1 (Bear market, black dashed curve). This demonstrates that the agent dynamically shifts its investment mode to allocate more capital toward the risky asset when market conditions are favorable.

  • Consumption strategy cc: The learned distribution of cc satisfies positivity (c>0)(c > 0) and exhibits an asymmetric profile that is somewhat reminiscent of a Gamma distribution. The density peak for Regime 0 shifts rightward (mode ≈1.0\approx 1.0) compared to Regime 1 (mode ≈0.8\approx 0.8). Unlike the logarithmic utility case, under power utility ( γ=0.5\gamma = 0.5), the wealth effect induced by favorable regime

dynamics dominates, leading the investor to scale up immediate consumption in prosperous market states.

  1. Conclusion. In this paper, we establish an entropy-regularized reinforcement learning (ERRL) framework for the continuous-time consumption-investment problem under a regime-switching diffusion model with general utility functions. By incorporating stochastic exploratory policies and Shannon entropy regularization into the stochastic optimal control formulation, we derive the explicit representations for the optimal exploratory portfolio and consumption strategies. Specifically, we show that the optimal investment strategy follows a multivariate Gaussian distribution, while the optimal consumption policy takes the form of a Gibbs measure, which reduces to a Gamma distribution under logarithmic utility. We also briefly illustrate the corresponding policy structure under power utility. Our analysis reveals that the modes of the optimal exploratory distributions retain the functional forms of the classical deterministic optimal controls, although their values need not coincide at a positive exploration temperature. Furthermore, under logarithmic utility, we establish the convergence of the exploratory value function to its classical unregularized counterpart as the exploration temperature parameter vanishes (λ→0+\lambda \to 0^+).

To operate in model-free and unknown market environments, we develop a continuous-time qq-learning actor-critic algorithm. We apply and specialize the existing theoretical results, proved the policy improvement theorem, and provide a martingale characterization for both on-policy and off-policy learning. Leveraging these theoretical results, we implement an actor-critic parameterization driven by continuous-time temporal difference (CTD) errors. Parameterizing the actor network based on the theoretical distribution families substantially accelerated the algorithm's convergence and enhanced numerical stability. Numerical experiments across regime-switching market environments validated our theoretical findings, demonstrating stable loss convergence, strict monotonicity and concavity of the learned value functions, and consistent regime superiority.

Several promising avenues remain open for future research. First, the proposed framework can be extended to incorporate market frictions such as transaction costs and short-selling constraints, or partially observable regime states. Second, generalizing the current framework to game-theoretic settings (such as stochastic differential games or mean-field games) presents a fascinating direction to study optimal strategies under competition or cooperation. Finally, exploring offline RL and model-based RL methodologies in continuous-time financial control is of great importance for improving sample efficiency and safe exploration in practical financial applications.

Acknowledgments. The authors would like to thank the handling editor and the anonymous reviewers for their insightful comments and constructive suggestions. The authors are also grateful to Xin Zhang of Southeast University for valuable advice.

References.

[1] L. BO, Y. HUANG, AND X. YU, An extended Merton problem with relaxed benchmark tracking, Mathematical Finance, 36 (2026), pp. 422-448.

[2] X. GAO, L. LI, AND X.Y. ZHOU, Reinforcement learning for jump-diffusions, with financial applications, Mathematical Finance, (2026), https://doi.org/10.1111/mafi.70027.

[3] T. HAARNOJA, A. ZHOU, P. ABBEEL, AND S. LEVINE, Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor, in International Conference on Machine Learning, PMLR, 80 (2018), pp. 1861-1870.

C. HU, D. LI, X. LI, AND Y. ZENG

[4] A.J. HEUNIS, Utility maximization in a regime switching model with convex portfolio constraints and margin requirements: optimality relations and explicit solutions, SIAM Journal on Control and Optimization, 53 (2015), pp. 2608-2656.

[5] Y. JIA AND X.Y. ZHOU, Policy evaluation and temporal-difference learning in continuous time and space: A martingale approach, Journal of Machine Learning Research, 23 (2022), pp. 1-55.

[6] Y. JIA AND X.Y. ZHOU, q-Learning in continuous time, Journal of Machine Learning Research, 24 (2023), pp. 1-61.

[7] X. LI, Y. WANG, AND X.Y. ZHOU, Dynamic mean-variance portfolio selection with no-shorting constraints and unknown investment opportunity sets, (2026), https://arxiv.org/abs/2607.16625.

[8] G. MA AND S. ZHU, Revisiting the Merton problem: from HARA to CARA utility, Computational Economics, 59 (2022), pp. 651-688.

[9] X. MAO AND C. YUAN, Stochastic Differential Equations with Markovian Switching, Imperial College Press, London, 2006.

[10] R. C. MERTON, Optimum consumption and portfolio rules in a continuous-time model, in Journal of Economic Theory, 3 (1975), pp. 373-413.

[11] R. C. MERTON, On estimating the expected return on the market: An exploratory investigation, Journal of Financial Economics, 8 (1980), pp. 323-361.

[12] S. M. ROSS, A First Course in Probability, 8th ed., Pearson, London, 2014.

[13] S. E. SHREVE AND I. KARATZAS, Brownian Motion and Stochastic Calculus, Graduate Texts in Mathematics, vol. 113, Springer, New York, 1991.

[14] L. R. SOTOMAYOR AND A. CADENILLAS, Explicit solutions of consumption-investment problems in financial markets with regime switching, Mathematical Finance, 19 (2009), pp. 251-279.

[15] W. TANG, Y. P. ZHANG, AND X. Y. ZHOU, Exploratory HJB equations and their convergence, SIAM Journal on Control and Optimization, 60 (2022), pp. 3191-3216.

[16] H. WANG, T. ZARIPHOPOULOU, AND X.Y. ZHOU, Reinforcement learning in continuous time and space: A stochastic control approach, Journal of Machine Learning Research, 21 (2020), pp. 1-34.

[17] H. WANG AND X.Y. ZHOU, Continuous-time mean-variance portfolio selection: A reinforcement learning framework, Mathematical Finance, 30 (2020), pp. 1273-1308.

[18] Y. WANG, J. LIU, K.F.C. YIU, AND T.K. SIU, Consumption-portfolio optimization with regime-switching-modulated habit formation and jump diffusion, Mathematics of Operations Research, (2026), https://doi.org/10.1287/moor.2024.0771.

[19] M. ZHANG, X. LI, J. XIONG, AND X. ZHANG, Continuous-time q-learning for Markov regime switching system under Tsallis entropy, (2026), https://arxiv.org/pdf/2601.19299v2.

[20] M. ZHOU, H. ZHOU, AND H. MENG, Optimal consumption and investment in an incomplete market with hedgeable stochastic income, European Journal of Operational Research, 330 (2026), pp. 311-325.