Manuscript Offprint
arXiv:2610.34995Reinforcement learning for constrained stochastic linear--quadratic control in continuous time
Abstract
We study continuous-time stochastic linear–quadratic control with a scalar state and nonnegative control constraints. With quadratic running costs, randomized exploration can change the optimal mean feedback. We introduce an auxiliary problem without entropy in which the conditional policy mean is nonnegative and the covariance is prescribed in proportion to the squared state. Moment reduction and state separation yield two regional Riccati equations and characterize the finite-horizon value function and optimal conditional mean. We give a sufficient control–cost compatibility condition under which this mean coincides with the optimal feedback of the original constrained problem. For time-invariant coefficients, we characterize the undiscounted infinite-horizon optimum and establish mean-square asymptotic stability under the stated assumptions. For unknown dynamics, we develop model-free actor–critic schemes for finite and infinite horizons. Numerical experiments compare the learned policies with their analytical targets and examine the effect of exploration on the optimal mean.
Keywords: Linear quadratic regulators, Optimal control, Stochastic control, Continuous time systems, Constraints, Reinforcement learning
1. Introduction
For classical unconstrained stochastic linear–quadratic (LQ) problems, Riccati equations provide a means of constructing optimal controls in linear state-feedback form; see Yong and Zhou (1999, Chapter 6). Its connection with mean–variance portfolio selection was established by Zhou and Li
(2000), using the indefinite stochastic LQ theory of Chen et al. (1998). Control constraints introduce difficulties even when the model coefficients are known. In the no-shorting problem, Li et al. (2002) showed that the usual completion-of-squares argument does not apply directly and that the associated Hamilton–Jacobi–Bellman (HJB) equation need not have a smooth solution. They characterized the solution through two Riccati equations and viscosity analysis. Hu and Zhou (2005) developed cone-constrained stochastic LQ control with random coefficients through two extended stochastic Riccati equations, while Li and Xu (2016) studied wealth and portfolio constraints by a martingale approach. For scalar-state systems with linear control constraints, Wu et al. (2020) established state separation and derived regional Riccati equations, including an infinite-horizon characterization under additional conditions.
These model-based approaches rely on specified system dynamics (Wu et al., 2020; Wang and Zhou, 2020). Their use in mean-variance portfolio selection faces two distinct difficulties. First, financial model specification must balance applicability and tractability, and models that retain more realistic market features can become difficult to solve with classical stochastic control tools (Hambly et al., 2023). Second, implementing model-based portfolio policies requires coefficient estimates. Accurate estimation is difficult, and portfolio allocations are sensitive to estimation errors (Wang and Zhou, 2020, Section 2.2). Model-free reinforcement learning (RL) can bypass explicit coefficient estimation and learn controls from observed interactions (Hambly et al., 2023; Wang and Zhou, 2020). However, the squared mean in a variance objective makes it nonlinear in expectation. The usual learning rules for expected cumulative rewards therefore cannot be applied directly to mean-variance criteria (Wang and Zhou, 2020, Introduction).
Exploratory stochastic control treats exploration explicitly in continuous time by replacing actions with probability distributions (Wang et al., 2020). The LQ structure provides analytical optimal exploratory policies in the settings of Wang et al. (2020); Wang and Zhou (2020). Auxiliary formulations without entropy have also recovered original optimal controls through policy means for specific investment criteria (Dai et al., 2026; Li et al., 2026). We study this auxiliary approach for scalar-state stochastic LQ control with nonnegative control constraints and quadratic running costs. We characterize its finite-horizon value and optimal conditional mean. Quadratic running costs can make exploration change the optimal mean, so its relationship with the original constrained feedback requires a separate analysis (Theorems 1 and 2). We also study the corresponding undiscounted infinite-horizon problem and construct learning methods for unknown dynamics (Sections 3.6 and 4).
The main contributions of this paper are as follows.
-
Auxiliary formulation and finite-horizon solution. We formulate an auxiliary problem without entropy for scalar-state stochastic LQ control with nonnegative controls, using general randomized feedback policies with nonnegative means and prescribed state-dependent covariance. Moment reduction and state separation characterize its finite-horizon value function and optimal conditional mean (Section 2.3 and Theorem 1).
-
Consistency with the original constrained problem. We give a sufficient control–cost compatibility condition under which the optimal conditional mean of the auxiliary problem coincides with the original optimal constrained feedback (Theorem 2).
-
Undiscounted infinite-horizon control. We characterize the infinite-horizon optimal value and conditional mean, and establish mean-square asymptotic stability under the stated assumptions (Theorem 3).
-
Learning with unknown dynamics. Using the martingale methods of Jia and Zhou (2022a,b), we develop finite- and infinite-horizon model-free actor-critic schemes. Numerical experiments compare the learned policies with their analytical targets (Sections 4 and 5).
The paper is organized as follows. Section 1.1 reviews the related literature. Section 2 defines the original and auxiliary problems. Section 3 establishes the exploratory-control results. Section 4 presents the learning methods, and Section 5 reports the numerical studies. Section 6 concludes the paper. The appendices provide the proofs and learning derivations.
To model the exploration-exploitation trade-off explicitly in continuous time, Wang et al. (2020) introduced an exploratory stochastic control formulation. In this formulation, the drift, diffusion variance, and instantaneous reward are averaged with respect to action distributions. Entropy regularization balances exploration and exploitation. In the unconstrained LQ setting of Wang et al. (2020), the optimal policy is Gaussian. Its mean represents exploitation, and its variance represents exploration. The policy and value function converge to their classical counterparts as the exploration weight vanishes. For finite-horizon mean-variance portfolio selection, Wang and Zhou (2020) used the LQ structure to derive a globally optimal exploratory policy. They also proved a policy improvement theorem. Under exact policy evaluation and their stated Gaussian initialization, policy iteration converges to that optimum. These results give a global characterization for this specific LQ problem beyond the local optimization results discussed above. Martingale methods subsequently provided continuous-time policy evaluation, policy-gradient representations, and q-learning (Jia and Zhou, 2022a,b, 2023). Related analyses address exploratory HJB equations (Tang et al., 2022), entropy annealing (Sethi et al., 2025), LQ policy convergence (Giegrich et al., 2024; Guo et al., 2026), and the accuracy of discretely sampled stochastic policies (Jia et al., 2026).
Control constraints also complicate exploration. Constraining the support of randomized policies can exclude ordinary Gaussian policies and make theoretical analysis more difficult (Li et al., 2026). The interval constraints studied by Chau et al. (2026) lead to truncated Gaussian policies with additional normalization and boundary terms. An alternative is to formulate an auxiliary problem without entropy. Dai et al. (2026) proved that the mean of an optimal randomized policy solves their original unconstrained Merton problem. For no-shorting mean-variance portfolio selection, Li et al. (2026) imposed the constraint on the policy mean and proved that, with a suitable prescribed covariance, the optimal mean recovers the original optimal portfolio. These investment results do not establish the mean-policy relationship with quadratic running costs or characterize the undiscounted infinite-horizon auxiliary problem with prescribed state-dependent covariance for constrained stochastic LQ control.
2. Problem Formulation
We first formulate the original stochastic LQ problem with nonnegative controls and then define its randomized auxiliary problem. In the auxiliary problem, the conditional action mean satisfies the constraint and a prescribed covariance governs exploration.
2.1. Notation
Frequently used notation in this paper includes:
• : the transpose of a matrix or vector ;
• for a matrix or vector ;
• , and : the sets of real numbers, real -vectors, and real matrices, respectively;
• and ;
- , with and denoting its positive semidefinite and positive definite subsets;
• and : is positive semidefinite and positive definite, respectively;
• : a componentwise inequality when is a vector;
• : the Gaussian probability distribution with mean and covariance matrix ;
• : the indicator of an event E;
• : the trace of a square matrix ;
• : the identity matrix;
Let be a finite horizon. Consider a complete filtered probability space satisfying the usual conditions and carrying an -dimensional standard Brownian motion , where . Here is the augmented -algebra generated by the Brownian history up to time and represents the information available at time . The symbol denotes expectation.
Given a Hilbert space with norm , define the Banach space
equipped with the norm
For , the space is defined analogously. The nonnegative control constraint is incorporated through the subset
2.2. Original stochastic LQ problem with nonnegative controls
We first state the finite-horizon problem from the initial time 0. For a given initial state , consider
where , , , , and is the control.
Let , , , and . The running cost is
The superscript 0 denotes the original problem without randomized exploration. The performance criterion from time 0 is
The original finite-horizon constrained stochastic LQ problem is therefore
Assumption 1. The coefficient functions , , , , , , and are deterministic, measurable, and bounded on .
Assumption 2. For every ,
Assumption 3. The control-weight matrix is pointwise positive definite on , meaning that every nonzero control direction has a strictly positive quadratic weight:
Assumption 4. There exists such that
The boundedness in Assumption 1 provides the uniform coefficient control needed for the usual square-integrability estimates of the state process.
For dynamic programming, we next introduce the continuation problem at an arbitrary state-time pair . For , let solve
For a controlled state initialized by , denotes expectation conditional on this initialization. The corresponding cost-to-go and value function are
Thus is the value of the original problem. This model with non-negative controls belongs to the scalar-state constrained stochastic LQ class of Wu et al. (2020). Under Assumptions 1–4, its optimal feedback is characterized by two regional quadratic programs and Riccati equations. We use this feedback below to assess the effect of exploration.
We next introduce a randomized auxiliary problem whose conditional action mean satisfies the same nonnegative control constraint.
2.3. General randomized feedback policies
The conditional mean of a randomized policy carries the control constraint, while its covariance specifies the exploration level.
Following Villani (2009, Definition 6.4), let denote the Borel -algebra of , and define
Thus is the set of Borel probability measures on with finite second moment. The randomized action law need not admit a density, while its finite second moment makes the mean, covariance matrix, and quadratic terms well defined. A randomized feedback policy is a measurable map
For a policy , define its conditional mean and covariance matrix by
Hence,
The nonnegative control constraint is imposed on the conditional mean,
The relationship between this auxiliary mean constraint and the original nonnegative control constraint will be established below. In particular, under the control-cost compatibility condition, Theorem 2 shows that the optimal conditional mean of the auxiliary problem coincides with the optimal feedback control of the original problem.
The original control must be componentwise nonnegative. In the auxiliary problem, this constraint applies to rather than to each sampled action. Samples may therefore have negative components during exploration, whereas the extracted mean control belongs to .
We prescribe the exploration covariance as
where is deterministic, measurable, and bounded on , i.e., . This boundedness keeps the prescribed exploratory second moments finite and preserves the quadratic-growth structure of the exploratory diffusion and running cost.
To construct the state dynamics under a randomized policy, we average the drift and the quadratic variation generated by the coefficients below. For , let be the jth component of and the jth column of . Define
Under a randomized policy , define the coefficients of the exploratory dynamics by
Proposition 1. Let be a randomized policy satisfying (15), and write . Then
and
Proof. See Appendix A.1.
The exploratory dynamics under are
Here is the nonnegative square root specified in (19).
The running cost under is
The auxiliary exploratory problem is
Here denotes the set of measurable randomized feedback policies defined above that satisfy (14)–(15), generate a mean process , and make (22) well posed and the criterion (24) finite.
The admissible policies are not restricted to a parametric family. The next section shows that the LQ structure and prescribed covariance reduce their optimization to an optimization over the conditional mean.
3. Main Results
We first reduce the auxiliary problem to conditional-mean optimization and characterize its finite-horizon value by state separation. We then identify a condition for equality between the exploratory optimal mean and the original optimal feedback. Finally, for constant coefficients, we derive the infinite-horizon optimal feedback with constant regional gains. These results provide the targets for the learning methods in Section 4.
3.1. From distributional optimization to mean optimization
For , define its mean vector and covariance matrix by
At a fixed state-time pair , the measure represents a candidate conditional action law. Define
For a candidate value function , let , , and denote its time, first-state, and second-state derivatives. The formal distribution-valued HJB equation is
Proposition 2 (Distribution-to-mean reduction). Let and let . Then
Together with Proposition 1, these identities imply that (29) is reduced to the
The superscript 0 denotes the original constrained value, whereas v is a candidate for the auxiliary value . The two are identified only after verification; see Wu et al. (2020); Li et al. (2026).
mean-valued HJB equation
The proof in Appendix A also shows that every feasible mean is attained by a probability measure with the prescribed covariance.
With covariance fixed, the HJB integrand depends on the policy only through its conditional mean. Gaussianity is used later for computation, not for this reduction.
3.2. State separation and regional minimization
Following the regional quadratic representation in Wu et al. (2020), seek a candidate for the auxiliary value of the form
This is a candidate form; Theorem 1 verifies it under the stated assumptions. At a fixed time and in either open state region, write . Then and . Substituting these derivatives into (32) gives the control-dependent terms
For a generic , collect these coefficients into the following matrices.
For , define the regional minimum values and feedback gains by
Here the subscripts + and - refer to the positive and negative state regions. By Assumption 3, for every ,
Hence both regional objectives are strictly convex on , and the minimizers are uniquely defined. Since is a cone, scaling for and for gives
The corresponding unique minimizer is
For , the linear term disappears and , so the minimum is attained uniquely at . The prescribed covariance is also zero. By (30), the optimal randomized action therefore equals zero with probability one. We denote this probability law by . The calculations for all three cases are recorded in Appendix A.
The constrained minimization thus separates into two finite-dimensional quadratic programs, one for each open state region. Their optimal values determine the regional Riccati equations.
3.3. Regional Riccati equations
Use the regional quadratic candidate introduced in Section 3.2. An over-dot denotes differentiation with respect to time. Substitution into (32) and the regional minimization give
Define the regional gains on by
Assumption 3 ensures that these gains are uniquely defined for every , including when . The derivation of (38) and the uniqueness of the regional minimizers are given in Appendix A.
The two trace terms in (38) account for the prescribed covariance. They can change and, because depends on p, can also change the optimal conditional mean. The next theorem verifies the value candidate and identifies that mean.
3.4. Main theorem: value function and optimal conditional mean
The regional equations and state separation give the following characterization.
Theorem 1 (Value function and optimal conditional mean). Suppose Assumptions 1–4 hold and is deterministic, measurable, bounded on , and positive semidefinite. Assume further that (38) admits nonnegative solutions . Under the standard dynamic-programming and comparison conditions for (32),
is the value function of the exploratory problem and the unique viscosity solution of (32). The optimal conditional mean is
Proof. The regional verification and the boundary viscosity argument are given in Appendix A.
The theorem concerns the auxiliary problem; equality with the original optimal control requires a further condition. Under the optimal feedback, both the mean and covariance vanish at x = 0. The action equals zero with probability one, so the state remains at zero. Away from this boundary, covariance can change the regional gains. We next determine when it does not.
3.5. Control-cost compatibility and mean-policy invariance
To compare the two optimal feedbacks, set . The original regional coefficients and then satisfy
Let denote the optimal feedback control of the original problem. Then
In general, the exploration terms in (38) change , and because may depend on p, the exploratory mean need not coincide with .
The compatibility condition below is motivated by the second-moment expansion of the state equation. Here x denotes the scalar state without a particular financial interpretation.
Over a short interval of length , a direct expansion gives
The first term is independent of the control. The control-dependent contribution is therefore
The short-time conditional second-moment expansion shows that its control-dependent part is determined by the quadratic coefficient and the state-control cross coefficient . We therefore require the running control cost to use these same two coefficients with a common positive weight . This requirement leads to the following compatibility condition.
Assumption 5 (Control-cost compatibility). There exists a deterministic measurable function such that
Assumption 5 therefore identifies a structurally compatible subclass of the general LQ formulation: the control-dependent running cost uses the same quadratic and cross coefficients as the control-dependent part of the second-moment expansion. The state-only penalty does not participate in this coefficient matching, but remains subject to the cost convexity in Assumption 2. The assumption is used only to establish mean-policy invariance and is not required for the general exploratory characterization obtained above.
Theorem 2 (Exact mean-policy consistency under control-cost compatibility). Suppose the assumptions of Theorem 1 hold, the original regional equations (42) admit nonnegative solutions, and Assumption 5 holds. Then, for every and ,
Consequently, for and
Proof. Assumption 5 gives
Because for every , this positive common factor may be divided out without changing the unique minimizer. This proves (45) and hence (46).
Assumption 5 is motivated by the preceding short-time expansion of the state second moment. The expansion identifies and as the coefficients of the control-dependent quadratic and cross terms. The assumption uses these coefficients in the running control cost, weighted by . The regional value coefficient weights the current state squared in the optimal remaining cost, including subsequent running costs and the terminal cost. In (32), p weights the same control-dependent terms. Their weights add to the positive factor in (47), which leaves the minimizing gain unchanged. Gain independence is therefore a consequence of this coefficient matching.
3.6. Infinite-horizon limit and mean-square stability
We now consider constant coefficients , and on an infinite horizon. The randomized policy remains a general measurable feedback policy with the moments specified in Section 2.3. We obtain the infinite-horizon problem through zero-terminal-cost finite-horizon values.
Extend the filtered probability space and Brownian motion in Section 2.1 to . Define to consist of measurable randomized feedback policies satisfying
and generating a state process on such that, for every , the restriction belongs to the finite-horizon admissible set defined immediately after (25). Thus admissibility is required on every finite horizon, but it does not require the infinite-horizon cost to be finite.
With the time argument retained for a possibly time-dependent policy, set
(48)
Here is the running cost under defined in (23) with constant cost coefficients. The nonnegative integral is defined as the increasing limit of the integrals over and may equal . Finite-interval admissibility does not by itself ensure ; we establish finite cost for the optimal candidate below.
Assumption 6 (Infinite-horizon cost and diffusion conditions). In addition to the constant-coefficient setting above,
These conditions strengthen the finite-horizon cost assumption, agree with the diffusion condition in Assumption 4, and leave the nonnegative gain set nonempty.
For T > 0, consider the auxiliary finite-horizon problem
(50) subject to (22), the mean constraint, and the prescribed covariance. This problem has no terminal cost: , so its continuation value at time T is zero for every terminal state. Consequently, both regional value coefficients satisfy
The zero terminal value does not impose .
For every , the finite-horizon hypotheses of Theorem 1 are additionally assumed; they do not follow from (49).
Write for the regional coefficients associated with this auxiliary problem. Theorem 1 and (38), applied with , give
To write the coefficient equations explicitly, suppress the time argument in the already defined regional programs (34)–(35). For , write
(52)
Then (38) becomes
The prescribed covariance produces the two trace terms through Propositions 1 and 2. The regional minimizer is unique because .
Lemma 1 (Time translation of the auxiliary coefficients). For T > 0 and , suppose the finite-horizon value characterization in Theorem 1 applies to the auxiliary problems with horizons T and . Then
Proof. Write for the value of the zero-terminal-cost auxiliary problem on . For a policy on , define its time shift on by
The mean constraint and the covariance are unchanged, the Brownian increment processes have the same law, and both problems have zero terminal cost. Hence the corresponding costs, and therefore the value functions, are equal:
Applying Theorem 1 at x = 1 and x = -1 gives (54).
Theorem 3 (Infinite-horizon exploratory control). Suppose Assumptions 1–4, Assumption 6, and the finite-horizon verification conditions stated above hold in the constant-coefficient setting, and (53) has nonnegative solutions for every finite horizon. Assume there is M > 0 such that
Then the finite limits
exist. Moreover, if and are uniformly continuous with respect to T, then and they satisfy
(57)
With the uniquely defined gains
set
There exists an admissible randomized feedback policy with this conditional mean and covariance , and every admissible randomized feedback policy with these moments is optimal for (48). The value is
Under each such policy, the closed-loop system is mean-square asymptotically stable:
Proof. For , restriction of a policy in to remains admissible. Since , the running cost under is nonnegative, and therefore . Evaluating (51) at and shows that and are nondecreasing in . The bound (55) then gives the limits in (56).
For the remaining conclusions, assume the stated uniform continuity and set for and . Here is the optimization horizon length. Lemma 1 gives ; substituting this identity into (53) gives
The prescribed covariance enters this forward system through the two trace terms. Since , has a finite limit. The parametric convex-program continuity argument in Wu et al. (2020, footnote 12) applies to (52), which has the same strongly convex quadratic structure; as in that footnote, it supplies the uniform continuity of and the continuity of the optimized term. Barbalat's lemma, cited there from Khalil (1992), gives , and passage to the limit in (62) yields (57).
It remains to record the changes caused by prescribed covariance and to verify the randomized-policy conclusion. For a constant regional gain , Propositions 1 and 2 give the second-moment growth rate and the coefficient of in the running cost under as
(63)
The first trace term in (63) reflects exploratory diffusion; the second reflects exploratory running cost. At , (57) gives
Indeed, and imply
If , (57) would instead give . Hence , and (64) yields
These quantities depend only on the first two conditional moments and therefore apply to every admissible randomized feedback policy with mean (59) and covariance . For , set when and when . The scalar homogeneous closed loop preserves the initial half-line. Itô's formula then gives
Solving this scalar differential equation yields
For , the state remains zero. The negative rates in (65) therefore prove (61); the exponential form follows from the displayed constant-coefficient second-moment equation and does not use Gaussianity.
The uniform bound (55) is an additional assumption; neither monotonicity nor (49) implies it.
The finite-horizon compatibility condition also yields an infinite-horizon mean-policy identity.
Proposition 3 (Infinite-horizon mean-policy consistency). Suppose the assumptions of Theorem 3 hold both for the exploratory problem with covariance and for its original-control specialization . If the time-invariant
For example, let , , , , and . Then , and the regional minimization reduces, for either sign, to , whose unique minimizer is . Equation (62) becomes with , so . Thus the uniform bound fails, and the associated algebraic equation has no nonnegative solution.
compatibility condition
holds, then
Consequently, the optimal conditional mean of the exploratory problem coincides with the optimal feedback of the original infinite-horizon problem with nonnegative controls.
Proof. Equation (68) gives the time-invariant version of (47). For every , the objective in (52) is the positive factor times the objective displayed in (69). Its unique minimizer is therefore independent of both p and , by the same argument as in Theorem 2. Applying this identity at and proves the result.
4. Solving the Constrained Stochastic LQ Problem with Unknown Dynamics
Unknown dynamics prevent direct computation of the feedback gains and . We therefore learn the exploratory mean from sampled trajectories. Under Assumption 5, its optimal target is also the original constrained feedback by Theorem 2; otherwise the target is the exploratory optimum in Theorem 1.
4.1. Policy parameterization and evaluation
Fix and set
The fixed matrix sets the action covariance, while the conditional mean remains to be learned. Although a rectified linear unit output could enforce a nonnegative mean, the regional structure in Theorem 1 suggests the parameterization
(71) and use the Gaussian computational policy
This Gaussian family is a computational representative of the admissible laws in Section 2.3. Its mean satisfies the nonnegative control constraint and its covariance is .
For a positive integer , discretize by , , with , and let
Thus the actor has vector parameters. We use for both and the sequence .
For a fixed policy , let denote expectation for the trajectory generated by and initialized by . Define
(73)
On each open region, satisfies the Feynman–Kac equation
A piecewise-quadratic fixed-policy value takes the form
(75) where the theoretical regional coefficients satisfy
(76)
(77)
All time arguments in (76)–(77) are suppressed for readability; Appendix Appendix B gives the substitution.
Because the dynamics are unknown, parameterize these coefficients by functions and represented on the time grid by
and use for both the pair and the sequence . The critic is
Let denote a state-action trajectory generated by , where is sampled from . Write and , and define
Thus is the realized cost-to-go from along one sampled trajectory. Its conditional expectation under the fixed policy is approximated by the critic . The corresponding critic loss is
This is the martingale loss criterion of Jia and Zhou (2022a, Section 3.1), also used for finite-horizon policy evaluation by Li et al. (2026, Section 4.1). Each requires a trajectory through T, so we approximate the loss with batches of complete episodes. The regional gradient contributions from one trajectory are
(81)
For a mini-batch of M trajectories, with superscript indexing the trajectory, use
For a vector argument, is understood componentwise. With critic learning rate , update
(83)
The terminal parameters are fixed at
The critic approximates the value of the current policy. We use it next to construct a trajectory-based actor update.
4.2. Policy gradient
We use a continuous-time trajectory representation of the policy gradient. On either open state region, denotes the Gaussian density in (72). Assume that is admissible and smooth in , its score is square integrable and continuous in the state-time variables, the policy-gradient integrand is integrable, and the stochastic integrals below are true martingales.
Lemma 2 (Policy-gradient representation). On either open state region,
(85)
Proof. The result follows directly from Theorem 5 of Jia and Zhou (2022b).
Lemma 2 expresses the fixed-policy value gradient through observable trajectories rather than the unknown coefficients. Because the objective includes a running LQ cost, the increment contains both the value change and that cost. On the grid , replace in the policy-gradient representation by the critic and approximate the running-cost integral over by its left-endpoint value. This gives the observable increment
For (72), the score for each regional mean parameter is the covariance-weighted deviation of the normalized action from its mean. Multiplying the score by gives the one-trajectory regional contributions
(87)
For a mini-batch of M trajectories, set
With actor learning rate , use the nonnegativity-preserving update
(89)
In the actor step, denotes the updated critic , where indexes training rounds. Both value terms in (86) use this critic, with their respective time-grid coefficients. The score uses the actor that generated the retained batch.
Algorithm 1. Finite-horizon model-free actor-critic scheme
Input. Choose , the grid , , initial parameters and , learning rates , batch size , and iteration numbers , , and .
Critic warm-up. For , sample trajectories under , compute , and update using (82)–(83).
Actor-critic iterations. For :
-
Hold the actor fixed, perform critic updates, and retain the last sampled batch.
-
On the retained batch, evaluate (86) with the updated critic.
-
Estimate (88) with the actor that generated this batch and update by (89).
Output. Return the updated policy .
The algorithm returns an exploratory policy estimate and its conditional mean. Under the state-scaled parameterization, the drift and diffusion vanish at x = 0, and a trajectory from a nonzero state stays in its initial region. A data set from one initial region therefore updates only its actor and critic. Under Assumption 5, the target mean gain is also the corresponding gain of the original constrained problem.
4.3. Infinite-horizon actor-critic algorithm
The undiscounted infinite-horizon objective in (48) requires a different policy-evaluation signal. A complete finite-horizon episode supplies the return , whereas an infinite-horizon trajectory has no terminal return. We therefore evaluate the infinite-horizon policy through martingale orthogonality conditions on observed increments, following the policy-evaluation characterization of Jia and Zhou (2022a, Section 3.2).
At each iteration, independent paths share a regional actor and critic, which are updated in policy-evaluation–policy-improvement order. The actor uses a score-weighted one-step increment of the type developed by Jia and Zhou (2022b, Algorithm 3); here the value is an infinite-horizon total-cost value and the updates minimize cost.
The scheme uses separate positive- and negative-region parameters and projects both mean gains onto . Each training round uses finite obser-vation windows to evaluate and then improve the shared regional policy, without imposing a finite-horizon terminal objective.
Throughout this subsection the coefficients are constant, Assumption 6 continues to hold, and . Parameterize the time-independent conditional mean and its Gaussian computational representative by
and
The projection of and onto below enforces the same conditional-mean constraint as (14); individual Gaussian action samples need not be componentwise nonnegative.
For fixed , use the regional rates and costs from (63). In the region , the second moment is . Thus, when
the fixed-policy total cost and its boundary condition at infinity are
Moreover,
In region , its integrand is . If , the positive running-cost coefficient instead makes the total cost infinite. The updates below use finite observed transitions without computing the rate . At an intermediate iterate, their total-cost interpretation therefore requires (92); the algorithm does not guarantee stability at every iterate. The optimal target is stabilizing by Theorem 3.
Use the regional quadratic critic
For fixed actor and critic parameters, write
For an observed transition over a time interval , use the following one-step observed increment of the value-plus-accumulated-cost process:
The increment in (97) has no terminal, discount, or average-reward correction. If the gain satisfies (92), the fixed-policy calculation and Itô’s formula make a martingale under the integrability conditions of Jia and Zhou (2022a).
Use the regional critic features as test functions in the martingale orthogonality conditions:
which are the regional components of . At round , collect independent paths from the same nonzero regional initial state . Each path uses throughout the observed cells; superscript indexes paths. The critic averages the pathwise sums of the orthogonality increments:
(99)
Following the regional score representation in Li et al. (2026, equation (26)), define the score-weighted actor contributions for an individual transition by
(101)
Equation (101) projects the resulting cost-descent step onto the nonnegative cone.
In the actor step, is recomputed by (97) on the same batch with after (99). Both state values use the updated critic; the score uses .
Algorithm 2. Batch actor-critic for the undiscounted infinite horizon
Input. Choose , observation step , path count , observation-window cell count , regional initial states and , initial parameters and , and learning-rate sequences and .
Learning. For and each region :
-
Restart M independent paths at , sharing and . Hold these parameters fixed while sampling J one-step transitions per path under (91) and observing their running costs.
-
Use the sampled increments in (99) to update .
-
On the same paths, evaluate (100) with the updated critic and update by (101).
Output. Return the infinite-horizon policy (91) and its nonnegative conditional mean (90).
The length is an observation window, not a control horizon; its endpoint contributes no terminal return or continuation value. Restarting from nonzero states supplies data before the second moment decays under a stable policy, as shown in (67). A nonzero path stays in its initial region, so the two actors require separate positive- and negative-state runs. At an iterate satisfying (92), the critic has the total-cost interpretation in (93).
5. Numerical experiments
We report separate finite- and infinite-horizon experiments. The finite-horizon study compares learned coefficients with analytical targets and examines running costs and mean-policy compatibility. The infinite-horizon study evaluates the batch Algorithm 2 against the regional algebraic targets and checks the second-moment rates from (63). Its finite data windows contribute only one-step increments, with no assigned terminal value. Gaussian sampling implements the prescribed moments; the control problems retain the general moment-constrained policy class.
5.1. Finite-horizon design
For the finite-horizon study, we use time-dependent dynamics based on
Wu et al. (2020, Section 4). The horizon is , with one state, three controls, and three Brownian components. For ,
We examine four cost specifications. The terminal benchmark sets
The running case sets
For the mixed compatible case, define and take
Thus Assumption 5 holds with . The mixed incompatible case uses
which does not satisfy Assumption 5.
For each specification, denotes the model-based gain without exploration and the model-based optimal mean gain at the training covariance. Neither oracle is supplied to the learner. We use time cells and , so only the positive region is active. The covariance is , with for the terminal case, 0.01 for the running and compatible cases, and 0.02 for the incompatible case.
Each experiment uses seeds 0, 1, 2, batches of 512 trajectories, 300 critic warm-up steps, and 4000 actor iterations with one critic update per actor update. We set , , the initial actor gain to 0.02, and the initial critic coefficient to 1. One actor gain is shared within each of 20 blocks of time cells. We average the cell gradients within a block, clip the block gradient at 0.1, and then project it onto the nonnegative cone. Each critic-gradient coordinate is clipped to before projection. The critic directly learns the coefficient in (78):
For a learned gain and a reference gain , define
The errors and compare the actor in (72) with the exploratory and original targets, respectively. The critic error is the relative root-mean-square error of against the analytical coefficient defined by (76) for the current policy.
The terminal-only ablation deletes the running-cost contribution from both the critic return in (79) and the actor increment in (86), while keeping all other settings unchanged. It is reported only in the running case, where isolates the omitted running contribution.
5.2. Finite-horizon coefficient and policy comparison
Table 1 reports the final errors as the mean sample standard deviation over three seeds, with and .
| Case | Method | Critic error | ||
|---|---|---|---|---|
| Terminal | Full | 0.0138 ± 0.0039 | 0.0035 ± 0.0004 | 0.0035 ± 0.0004 |
| Running | Full | 0.0263 ± 0.0136 | 0.0071 ± 0.0006 | 0.0070 ± 0.0006 |
| Running | Ablation | 1.0000 ± 6.9 × 10-8 | 0.0683 ± 0.0001 | 0.0678 ± 0.0001 |
| Compatible | Full | 0.1004 ± 0.0626 | 0.0049 ± 0.0002 | 0.0049 ± 0.0002 |
| Incompatible | Full | 0.2855 ± 0.1225 | 0.0098 ± 0.0007 | 0.0115 ± 0.0003 |
Table 1: Finite-horizon errors after 4000 actor iterations using the unnormalized gradients in (82) and (88). Entries are means sample standard deviations over three independent seeds.
Block sharing reduces the number of actor parameters; averaging, clipping, and projection control individual updates. These computational choices leave the control problem's policy class unchanged.
In the terminal benchmark, the two oracle gains agree to numerical precision, and the learned gain has the same error, 0.0035, relative to both. This benchmark has R = 0 and therefore does not satisfy Assumption 3. In the running-cost case, the full critic error is 0.0263, compared with 1.0000 under terminal-only ablation; the actor error to rises from 0.0071 to 0.0683. Because , deleting the running cost makes the ablated return identically zero. This comparison isolates the contribution of running costs in this specification.
The mixed-cost cases examine the mean-policy identity in Theorem 2. In the compatible case,
and the full method has the same error, 0.0049, relative to both oracles. The corresponding critic error is . In the incompatible case,
The final gain is closer to the exploratory oracle than to the original oracle, with errors 0.0098 and 0.0115; this ordering holds for all three seeds. Together, the two cases illustrate exact oracle agreement under compatibility and a distinct exploratory target in this incompatible specification.
Figure 1 shows that the terminal and running full-method critic errors end at the order of , whereas the running ablation remains near ; the compatible and incompatible curves have wider three-seed bands. In Figure 2, the two oracle-error curves overlap in the terminal and compatible cases. In the incompatible case, the solid curve crosses below the dashed curve late in training and remains lower at iteration 4000.
5.3. Finite-horizon sensitivity
We vary one critic parameter at a time in the incompatible case. Starting from , we try , 2 and , 2 while holding other settings fixed. Across the five settings, the critic error ranges from 0.2363 to 0.3736, from 0.0093 to 0.0118, and from 0.0112 to 0.0126. The actor remains closer to the exploratory oracle in every setting, while the critic error changes appreciably with . These three-seed observations concern oracle ordering over the reported parameter range.
Critic coefficient error during learning

Mixed compatible
Mixed incompatible

Full

Terminal-only ablation
Curves: seed means; bands: +/- one sample standard deviation; logarithmic vertical scale.
Figure 1: Critic coefficient error during learning. The full method is shown by solid lines and the terminal-only ablation by dashed lines. Curves are three-seed means, shaded bands are one sample standard deviation, and the vertical scale is logarithmic.
5.4. Infinite-horizon batch actor-critic experiment
The infinite-horizon study uses a separate constant-coefficient scalar model with one control and one Brownian component:
The block cost matrix is
Moreover, the time-independent compatibility condition (68) holds with , because and . Hence Proposition 3 applies whenever the hypotheses of Theorem 3 hold.
Full-method gain errors to the two oracle targets


Mixed compatible
Mixed incompatible

To exploratory oracle

To original oracle
Curves: seed means; bands: +/- one sample standard deviation; logarithmic vertical scale.
Figure 2: Full-method gain errors relative to the exploratory and original oracles. The error to is shown by solid lines and the error to by dashed lines. Curves are three-seed means, shaded bands are one sample standard deviation, and the vertical scale is logarithmic.
We train Algorithm 2 directly on this model. The positive and negative branches start separately from and ; within each region, all paths in the same training round share a common gain and critic coefficient. The sampling policy is
As in (72), this distribution is used to generate samples with the required conditional moments; the theoretical policy class in Theorem 3 remains distribution free beyond those moments.
For each of 20 independent seeds, training runs for 400 rounds. Every round restarts paths per region and observes steps of length
; the resulting window is not a control horizon. We set , , , and . The critic updates first, followed by the actor on the same batch. We use no critic warm-up, state normalization, gradient clipping, or model-based stability gate. Within each numerical cell, we hold fixed, propagate the resulting geometric state equation, and approximate running cost at the left endpoint. Neither update uses a terminal value or finite-window return.
For (108), the quantities in (63) reduce to
The positive-region infinite-horizon oracle is . The negative-region oracle is . Their second-moment rates are and . These model-based quantities are used only to assess the learned policy after training. Table 2 reports the outcomes.
| Region | Learned | Learned | Current-policy critic error | Stable runs | ||
|---|---|---|---|---|---|---|
| + | 0.9837 ± 0.0097 | 1.0000 | 0.5529 ± 0.0589 | 0.5789 | 0.0517 | 20/20 |
| - | 0.0000 ± 0.0000 | 0.0000 | 2.3526 ± 0.0282 | 2.3333 | 0.0291 | 20/20 |
Table 2: Batch infinite-horizon actor-critic results after 400 rounds. Learned quantities are means sample standard deviations over 20 independent seeds. The current-policy critic error is the mean of ; “stable runs” counts runs with at every recorded iterate. Rates and oracle values are retrospective model-based diagnostics, not training gates.
The learned positive-region gain approaches its oracle value 1.0000, while the negative-region gain reaches the nonnegative boundary 0.0000. Mean absolute critic error relative to the current-policy value is 0.0517 and 0.0291 in the two regions. All 20 runs completed 400 rounds, and every recorded gain had a negative diagnostic rate. This observation does not imply that the ungated update preserves stability in general.
Batch actor-critic learning on the infinite-horizon model

512 paths per region and round; each 0.5-unit window supplies one-step observations only.
Figure 3: Batch infinite-horizon learning across 20 independent seeds. Solid curves show means, shaded bands one sample standard deviation, and dashed lines the model-based algebraic targets. The positive critic has intermittent excursions even though the final learned gains are near their targets; the curves do not establish monotone or general convergence.
To compare the learning variability and recorded policy stability of single-path and multiple-path sampling, we repeat the experiment with one newly initialized path per region and round. The dynamics, initial parameters, 400 rounds, observation window, and learning rates are unchanged. All 20 runs complete training. The final gains are and ; the numbers of runs with all recorded second-moment rates negative are 19/20 and 18/20, respectively. Compared with the 512-path results in Table 2, the final gains have larger variability across seeds, and fewer runs maintain negative rates at every recorded iterate.
The studies use different dynamics and assess different claims. The finite-horizon study examines learning and the exploratory-versus-original mean comparison; the infinite-horizon study assesses the batch infinite-horizon algorithm on a separate scalar model.
6. Conclusion
This paper studied continuous-time stochastic LQ control with a scalar state and nonnegative control constraints. We introduced an auxiliary problem without entropy, using randomized policies with nonnegative conditional means and prescribed state-dependent covariance. Moment reduction and state separation yielded two regional Riccati equations and characterized the finite-horizon value function and optimal conditional mean (Theorem 1). Quadratic running costs can make exploration change the optimal mean. We gave a sufficient control-cost compatibility condition under which that mean coincides with the original optimal constrained feedback (Theorem 2). For constant coefficients, we characterized the undiscounted infinite-horizon optimum and established mean-square asymptotic stability under the stated assumptions (Theorem 3).
For unknown dynamics, we developed finite- and infinite-horizon actor-critic schemes using the martingale methods of Jia and Zhou (2022a,b). In the reported running-cost comparison, including the running cost reduced both critic and policy errors. The compatible and incompatible cases illustrated, respectively, agreement of the two optimal mean feedbacks and a distinct exploratory target. The learned gains were close to their analytical targets in the reported finite- and infinite-horizon experiments (Tables 1 and 2).
Appendix A. Proofs for the exploratory-control results
This appendix gives the moment-reduction, state-separation, regional-equation, and viscosity-verification calculations used in Section 3.
Appendix A.1. Characteristics under
We derive the coefficients of the exploratory dynamics in (18)–(22) from the prescribed covariance and the point-action dynamics. The calculation averages the drift and quadratic variation under a policy.
Fix and write and . By linearity of integration,
(A.1)
For the jth diffusion channel, write and . Starting from the definition of the quadratic variation under ,
The remaining quadratic term is evaluated from the covariance identity
Indeed, using ,
Substituting this identity and then using gives
(A.2)
The first term evaluates diffusion at the policy mean; the second is the variance from action randomization. Summing over Brownian components gives
Each in (22) can therefore be taken as the nonnegative square root in (A.2). The construction averages the quadratic variation , rather than the signed diffusion coefficient.
Appendix A.2. Moment reduction and state separation
We give the details of Proposition 2. Fix and an admissible law , and write
By the definition of covariance,
Hence
which proves (30).
The drift reduction is immediate from the affine dependence on the action:
which is (20).
For the diffusion term, first note that
Taking expectation under and using (A.4),
Therefore,
(A.5)
where the time argument t has been suppressed in the second line only for readability. This proves (21).
For the running cost, the cross and state terms depend only on the first moment, while the control term is handled by the same trace identity:
Consequently,
which is (31).
Under the prescribed covariance , the HJB integrand depends on a law only through its mean . Every is realized by, for example,
. This Gaussian law establishes attainability without restricting the admissible policy class. Hence the infimum over laws in (29) equals the infimum over means in (32), proving Proposition 2.
For state separation, fix . If , set . Since is a cone, if and only if , and
If , set with . Then
Finally, if , the objective reduces to . Assumption 3 gives for every . Hence its unique minimum over is attained at , and the minimizer in each of the three state regions is unique. These three cases prove (36)–(37).
Appendix A.3. Derivation of the regional Riccati equations
For , take the regional candidate . Then
Substituting these derivatives into (32) and applying (36) gives the + equation in (38). For , the same calculation with and the negative branch of (36) gives the - equation. The terminal condition follows from .
Appendix A.4. Uniqueness of the regional minimizers
For , Assumption 3 gives
Each regional objective in (35) is strictly convex and coercive on the closed convex set and thus has a unique minimizer . Uniqueness of the HJB solution is separately covered by the comparison conditions in Theorem 1.
Appendix A.5. Verification of Theorem 1
Let be the piecewise-quadratic candidate in (40). It satisfies the terminal condition. We verify the HJB equation on each open region and then at their common boundary.
- Interior regions. For x > 0,
Denote the left-hand side of (32) by LHS. Substitution yields
(A.8)
By (36), the minimum equals ; hence (38) gives LHS = 0. The minimizing mean is . For , the same calculation with the negative regional equation gives LHS = 0 and the minimizing mean ; the details are identical and are omitted.
- Separating boundary. At x = 0, the candidate is continuous because
Its first-order derivatives also exist and satisfy
When , the second derivative may jump at the boundary. We use the viscosity verification of Wu et al. (2020). Let and denote the parabolic second-order superdifferential and subdifferential; records their time, first-state, and second-state components. At , we obtain
(A.9)
Define the HJB term
(A.10)
At , all terms containing vanish. Hence, for any ,
(A.11)
where the last equality follows by taking and from the positive semidefiniteness of the quadratic form. Thus is a viscosity subsolution on the separating boundary.
On the other hand, for any ,
(A.12)
Hence is also a viscosity supersolution on the separating boundary. Together with the verification in the two interior regions, this shows that is a viscosity solution of (32) with the terminal condition .
Finally, for , take
and . Then
The regional minimizing means together with yield (41). Under the comparison condition stated in Theorem 1, the viscosity solution is unique, and hence .
Appendix B. Derivations for the unknown-dynamics learning section
This appendix derives the fixed-policy regional equations used in Section 4.
Appendix B.1. Fixed-policy regional equations
Consider first , for which . Proposition 2 gives
(B.2)
and
(B.3)
Substituting and (B.1)–(B.3) into (74) gives (76). For , the same calculation with and gives (77). At , the policy is , the state and all costs remain zero. This verifies (75). Using (33), the control-dependent terms in the two coefficient equations are
and
respectively. Minimization over therefore recovers the regional quadratic programs (34)–(35).
References
Chau, H., Nguyen, D., Nguyen, T., 2026. Continuous-time optimal investment with portfolio constraints: A reinforcement learning approach. European Journal of Operational Research 328(3), 1068–1092.
Chen, S., Li, X., Zhou, X.Y., 1998. Stochastic linear quadratic regulators with indefinite control weight costs. SIAM Journal on Control and Optimization 36(5), 1685–1702.
Dai, M., Dong, Y., Jia, Y., Zhou, X.Y., 2026. Data-driven Merton's strategies via policy randomization. arXiv:2312.11797v3, revised February 14, 2026.
Giegrich, M., Reisinger, C., Zhang, Y., 2024. Convergence of policy gradient methods for finite-horizon exploratory linear-quadratic control problems. SIAM Journal on Control and Optimization 62(2), 1060–1092.
Guo, X., Li, X., Xu, R., 2026. Fast policy learning for linear-quadratic control with entropy regularization. SIAM Journal on Control and Optimization 64(1), 124–151.
Hambly, B., Xu, R., Yang, H., 2023. Recent advances in reinforcement learning in finance. Mathematical Finance 33(3), 437–503.
Hu, Y., Zhou, X.Y., 2005. Constrained stochastic LQ control with random coefficients, and application to portfolio selection. SIAM Journal on Control and Optimization 44(2), 444–466.
Huang, Y., Jia, Y., Zhou, X.Y., 2024. Mean-variance portfolio selection by continuous-time reinforcement learning: Algorithms, regret analysis, and empirical study. arXiv:2412.16175v3, revised March 28, 2026.
Jia, Y., Ouyang, D., Zhang, Y., 2026. Accuracy of discretely sampled stochastic policies in continuous-time reinforcement learning. SIAM Journal on Control and Optimization 64(3), 1889–1929.
Jia, Y., Zhou, X.Y., 2022a. Policy evaluation and temporal-difference learning in continuous time and space: A martingale approach. Journal of Machine Learning Research 23(154), 1–55.
Jia, Y., Zhou, X.Y., 2022b. Policy gradient and actor-critic learning in continuous time and space: Theory and algorithms. Journal of Machine Learning Research 23(275), 1–50.
Jia, Y., Zhou, X.Y., 2023. q-learning in continuous time. Journal of Machine Learning Research 24(161), 1–61.
Khalil, H.K., 1992. Nonlinear Systems. Macmillan, New York.
Li, X., Zhou, X.Y., Lim, A.E.B., 2002. Dynamic mean-variance portfolio selection with no-shorting constraints. SIAM Journal on Control and Optimization 40(5), 1540–1555.
Li, X., Wang, Y., Zhou, X.Y., 2026. Dynamic mean-variance portfolio selection with no-shorting constraints and unknown investment opportunity sets. arXiv:2607.16625v2, revised September 21, 2026.
Li, X., Xu, Z.Q., 2016. Continuous-time Markowitz's model with constraints on wealth and portfolio. Operations Research Letters 44(6), 729–736.
Prashanth, L.A., Ghavamzadeh, M., 2016. Variance-constrained actor-critic algorithms for discounted and average reward MDPs. Machine Learning 105(3), 367–417.
Sethi, D., Šiška, D., Zhang, Y., 2025. Entropy annealing for policy mirror descent in continuous time and space. SIAM Journal on Control and Optimization 63(4), 3006–3041.
Tamar, A., Di Castro, D., Mannor, S., 2012. Policy gradients with variance related risk criteria. Proceedings of the 29th International Conference on Machine Learning, 935–942.
Tamar, A., Di Castro, D., Mannor, S., 2016. Learning the Variance of the Reward-To-Go. Journal of Machine Learning Research 17(13), 1–36.
Tang, W., Zhang, Y.P., Zhou, X.Y., 2022. Exploratory HJB equations and their convergence. SIAM Journal on Control and Optimization 60(6), 3191–3216.
Villani, C., 2009. Optimal Transport: Old and New. Grundlehren der mathematischen Wissenschaften 338, Springer, Berlin.
Wang, H., Zariphopoulou, T., Zhou, X.Y., 2020. Reinforcement learning in continuous time and space: A stochastic control approach. Journal of Machine Learning Research 21(198), 1–34.
Wang, H., Zhou, X.Y., 2020. Continuous-time mean-variance portfolio selection: A reinforcement learning framework. Mathematical Finance 30(4), 1273–1308.
Wu, W., Gao, J., Lu, J.-G., Li, X., 2020. On continuous-time constrained stochastic linear-quadratic control. Automatica 114, 108809.
Yong, J., Zhou, X.Y., 1999. Stochastic Controls: Hamiltonian Systems and HJB Equations. Applications of Mathematics 43, Springer, New York.
Zhou, X.Y., Li, D., 2000. Continuous-time mean-variance portfolio selection: A stochastic LQ framework. Applied Mathematics & Optimization 42(1), 19–33.