Abstract
This paper aims at computing optimal control policies to drive a self-financing portfolio of financial assets from a given initial financial state to a final state in a given time horizon such that for the first case, the functional portfolio financial risk is minimized and, for the second case, the functional portfolio profit is maximized. The optimal control policies are the optimal investment allocation processes, the optimal state process is the optimal investor’s wealth process, also called the system response to the input control and is obtained by solving the combined system of differential equations formed by the state and costate system of differential equations derived and extracted from Pontryagin’s Minimum Principle. Computational simulations are provided to show the effectiveness and the reliability of the approach.
Keywords
Introduction
Financial system dynamics involve considerable and significant randomness due to perturbation in the economic and political world. That’s why they are modelled by stochastic differential equations that enable researchers to rigorously analyse problems, solve them, and then interpret results to allow decision makers to prescribe reliable recommendations. Solving stochastic differential equations analytically is not easy. Consequently, the use of numerical methods is usually recommended. Financial operators and financial regulators in financial markets are mostly concerned with risk management and risk measurement to protect portfolios against random and harmful events. This article considers a self-financing portfolio with risk minimization and profit maximization. The study of portfolio dynamics is a critical topic in financial economics, financial engineering, financial mathematics, and in related areas. The control of self-financing portfolios is a relevant and critical issue that draws the attention of financial operators, financial managers, financial planners and financial regulators who have been dealing with similar and connected problems since some years. The literature defines a self-financing portfolio as one in which if there is no money coming in and no money moving out, then the purchase of a new financial asset is financed by the sale of an old one. Most of time the financial manager is concerned with maximizing the portfolio return and minimizing the portfolio risk which requires the use of Optimization and Optimal Control Theory techniques and tools. There exists a considerable body of research using Optimal Control Theory to rigorously and efficiently tackle financial optimization problems. Refer, for example, to Tomas (2010), Patrick and Ronnie (2016), Anton (2001), Li and Zhou (2006), Bielecki, Jin, PLiska and Zhou (2005) and Jiongming Yong and Xun Yu Zhou (1999). This paper aims to address, firstly, minimizing the self-financing integral functional portfolio risk, subject to the investor’s wealth dynamics and secondly, maximizing the integral functional portfolio expected profit subject to investor’s wealth dynamics; The wealth dynamics is described by a controlled stochastic differential equation, where the controls are the unknown investment allocation processes also called investment allocation policies which determine the instantaneous components of the portfolio. We are, firstly, dealing with a stochastic optimal control problem where the objective functional to minimize is the portfolio risk (defined by the portfolio variance), the control processes are the instantaneous investment allocation processes, the state process is the investor’s wealth process (where the wealth at the initial time is the capital). One of the papers in which is defined the wealth dynamics for the self-financing portfolio is Zhou and Li (2000). In such papers the wealth dynamics is left in terms of a stochastic differential equation. The authors optimized the portfolio at the final time. Unlike them, this paper solved the equation analytically and numerically and the portfolio is optimized over the whole time interval. In other words, this paper is concerned with computing the investment allocation processes to control the wealth dynamics at every point in time such that, firstly the functional risk is minimized, and secondly, the functional profit is maximized. The contributions (innovations) of this paper are the following:
Computation of the analytical and numerical solutions of the wealth equation. Indeed, the mean-variance presented by Markowitz constitutes a fundamental basis for portfolio optimization in a single period. It uses the variance to quantify the risk and offers to each financial operator the ability to maximize the portfolio expected return for an acceptable threshold of risk. The Markowitz theory did undergo some extensions. Zhou and Li (2000) used Markowitz theory as a starting point to maximize the return and minimize risk at the final time. The authors did transform their original optimal control problem into a class of auxiliary stochastic linear quadratic problems involving a stochastic Ricatti equation. This paper solved analytically and numerically, the original version of that equation.
Derivation of explicit numerical simulations of the wealth process in the self-financing portfolio by using successively and separately Euler-Maruyama, Milstein and Stochastic Runge-Kutta methods. For a judiciously provided control vector process, and depending on the researcher’s intuition and initiatives, each of the above numerical simulation can be coded into a function (or functions) to obtain numerical and computational solutions for the wealth stochastic differential equation. Since every derived numerical simulation concerns a stochastic model, it does not depend on the stationarity of the wealth time series, it then allows to obtain and forecast the value of wealth process as well as that of the financial portfolio process. Their solutions can be compared to the exact solution to assess their accuracies.
Approximation of the given controlled stochastic differential equation (the wealth equation) with a random ordinary differential equation. Such a trick enables the approximation of the Pontryagin Minimum Principle first-order necessary conditions for optimality (for the portfolio risk minimization problem) and the approximation of Pontryagin’s Maximum Principle first-order necessary conditions of optimality (for the portfolio profit maximization problem). Notice that the derivation of the first-order necessary conditions of optimality leads to the construction of the Hamiltonians systems, the computation, from the normal equations, of the control policy (Investment Allocation) processes in terms of the state (wealth) and costate (adjoint) processes. The expression of the control processes are substituted into the state and the costate system to judiciously vanish the unknown control and obtain everything in terms of only the state and costate processes.
As said above Zhou and Li (2000) minimize risk and maximize the expected return both at the final time. Unlike Zhou and Li (2000), this paper minimize the integral functional (whose integrand is the portfolio risk) and maximize the integral functional (whose integrand is the expected return) over the entire given time interval.
Development of computer programs consisting of interacting Matlab functions to solve the stochastic optimal control problem and obtain the control (investment allocation) processes, the state (wealth) process, the costate process, the Hamiltonian process, the risk process, the profit process, etc.
Computation of the numerical and computational portfolio risk (variance) process and the portfolio expected return process which are summarized by the associated computational simulations.
The paper is subdivided into the following sections: Section 2 presents the problem of portfolio risk minimization subject to wealth dynamics in the self-financing portfolio. Section 3 studies existence and uniqueness of solution of the wealth stochastic differential equation. Section 4 computes the analytical solution of the wealth equation. Section 5 derives, for a given control process, numerical simulation of the wealth equation by using successively numerical integration, Euler-Maruyama, Milstein, improved Euler-Maruyama, stochastic Runge-Kutta methods. Section 6 applies the Pontryagin Minimum principles of optimality to derive the Hamiltonian system containing differential equations involving random parameter for the state and the costate (adjoint) processes. Section 7 solves numerically the problem and obtain the optimal wealth (state) process which is the system response to the input control (investment allocation) processes, also called optimal state feedback control processes. The optimal investment allocation processes and the corresponding system response (which is the stochastic wealth process), are collectively called optimal pair, the stochastic costate process and the risk (variance) process are plotted to show the effectiveness of the approach and summarize the solutions. Section 8 presents the problem of portfolio profit maximization subject to wealth dynamics in the self-financing portfolio and suggests a method to find the solution. Section 9 concludes the paper by presenting the results and by discussing on them.
Portfolio risk minimization
The concern is to compute optimal investment allocation processes such that the functional portfolio risk is minimized. Such a problem is defined as follows:
The investment allocation for asset i is given by:
Redefine equation (2) in terms of functions f (.) and g (.) (which are respectively its drift and its diffusion coefficients) so that we can be able to address concisely and in compact way the existence and uniqueness of solution. We then have the following:
The solution is unique because function f (t, X (t) , ω1 (t) , ..., ω m (t)) and function g (t, X (t) , ω1 (t) , ..., ω m (t)) satisfy the Lipschitz condition. For any details on Lipschitz condition, the reader is kindly referred to articles and books on analytical and numerical solution of differential equations.
Reconsider the controlled stochastic differential equation.
Reconsider the above equation (2) defining the wealth dynamics. For an imposed or a provided optimal input control process Ω = (ω1 (t) , ..., ω m (t)), the numerical solution, also called the optimal system response (the optimal wealth) is as follows:
Divide the given time interval [0, T] into N subintervals 0 = t0 < t1 < ... < t
N
= T where
By applying the Euler-Maruyama numerical method to solve the given wealth equation (2), provided a Wiener process {W (t)} t≥0 discretized into {Wkk≥0 and any feasible input control processes (ω1 (t) , ..., ω
m
(t)), discretized into (ω1,k, ..., ωm,k) one finds the approximate solution given as follows:
For some optimal input control processes judiciously designed, one can kindly compute and obtain the investor’s optimal wealth process.
By using the Milstein numerical simulation, the approximate solution to the stochastic differential equation (2) is the following:
Consider the wealth equation (2) as rewritten in compact form by (11). The numerical solution is given by:
Consider the wealth equation (2) as rewritten in compact form by (11). Then the Runge Kutta numerical simulation of the wealth stochastic differential equation is as follows:
where A = (a ij )andB = (b ij )ares * s real matrices, α T = (α1, ..., α s ) are now vectors belonging to R. Runge-Kutta numerical simulation may be used to approximate, for a judiciously designed and provided control processes (Investment Allocations), compute the numerical solution of the wealth equation. For each of the above considered numerical simulation method, for a designed optimal control policy, the solution to the stochastic differential equation (2) is the optimal wealth for the investor.
where
Let Ω0 denotes the set of control processes as above defined,
The feasible control problem is formulated as follows: Given an initial wealth X (0) = X0 ∈ R, compute a control vector process strategy ω (·) ∈ U to bring the system (36) from the specified initial state to a certain free X (T) final state such that the portfolio risk is minimized. This stochastic control strategy will be called a feasible control process strategy, feasible investment allocation processes.
Define the auxiliary optimal control problem such that the computation of a feasible control approximating the optimal control can be achieved. Numerical and computational methods are expected to be used to obtain the results.
The Hamiltonian function is given by:
To compute Ω = (ω1 (t) , ..., ω m (t)), first calculate the following expressions:
The first-order optimality conditions, ∀i = 1, ..., m let
which can be rewritten in matrix form as:
Since
The equations (48) – (51) state Pontryagin’s Minimum Principle of optimality. Such equations form a system of equations which is solved using a fourth-order Runge-Kutta method.
For the inputs, numerical data for the stocks were randomly generated three times to show the effectiveness of the approach. For the first case, random data were generated as six time series for the stock returns where every time series has a hundred elements. Every time series gives a stock profile from time t = 1to timet = 100. From those time series a covariance matrix was computed to show the correlation between stocks. Such a covariance matrix serves as input for the objective functional represented by the risk function which is the variance of the portfolio profit. Such a function also involves the unknown investment allocations representing the stochastic control processes. Some elements of the covariance matrix are also needed in the diffusion component of the wealth equation. After solving the system of equations representing Pontriagin’s Minimum Principle of optimality we obtain the stochastic control processes which constitute the portfolio stock investment allocations given in Figure 1. At every time tthere is an investment allocation. From the second plot of Figure 1, the reader can notice that the second function is zero at every time which instructs the investor to allocate nothing to the associated stock (stock number 2) during the considered time interval. Money will be allocated only to stocks number 1, 3, 4, 5 and 6 according to the results in the plots. Such stocks will constitute the portfolio. The amount of investment to allocate for a stock depends on the performance of the associated stock. The better it performs, the greater is the amount allocated. Then, the system state response (also called the wealth) to the input control processes, and the associated costate process (also called adjoint process), are obtained. This is shown in Figure 2 and Figure 3, respectively where one can notice that the wealth is increasing.

Plot of the Portfolio Stock Investment allocations.

Plot of Wealth versus Time.

Plot of the costate process.
As in the first case, the same procedure is performed in the second case, and yields the input control processes which are the stock investment allocations as shown in Figure 4. One will notice that there is nothing to allocate to stock number 1, 2 and 5 during the considered time interval since their associated investment allocation functions are zero at every time. The portfolio is only constituted by stocks 3, 4 and 6 from the first month to the last. Then, the related system response, and its adjoint, are shown in Figure 5 and Figure 6 respectively. Again, the wealth is increasing. The risk (variance) is plotted and represented in Figure 7 which shows a considerable, significant and reliable risk minimization.

Plot of the Portfolio Stock Investment allocations.

Plot of Wealth versus Time.

Plot of the costate process related to the wealth process.

Plot of risk versus Time.
As for the two previous cases, the third case shows that the generated input data to the optimal control problem together with Pontryagin’s Minimum Principle gives the optimal input control processes to the financial system (the portfolio) as shown in Figure 8 where all the stocks are included in the portfolio. They are financed from the first month to the last. Such investments are increasing from the first month to the last. Such control processes determine the system response represented by the wealth process (which is increasing) as shown in Figure 9, and the cowealth process shown in Figure 10. From the control processes and the covariance matrix of the financial stock returns, the optimal risk (variance) process is obtained, significantly minimized as shown in Figure 11. Figure 7 and Figure 11 represent the risk function from the first month to the last (where at every time (month) there is an optimal investment allocation). From these figures, one can notice that the risk is significantly minimized.

Plot of the Portfolio Stock Investment allocations.

Plot of Wealth versus Time.

Plot of the costate process.

Plot of risk versus Time.
The concern here is to compute optimal investment allocation processes such that the functional portfolio profit is maximized. Such a problem is defined as follows:
To compute Ω = (ω1 (t) , ..., ω m (t)), first calculate the following expressions:
The first-order necessary conditions for optimality imply, ∀i = 1, ..., m let
which can be rewritten in matrix form as:
Since
The aim of this paper was to compute optimal control processes to drive a controlled stochastic system from a given initial state to a final one such that the portfolio variance is minimized. To solve the problem, the following approach was used: Pontryagin’s Minimum Principle was applied to derive an Hamiltonian system of equations. Control processes were explicitly derived in terms of the state and costate processes. Finally, such control expressions were substituted into the state and the costate system of differential equations and a Matlab function was developed to code a fourth-order Runge-Kutta numerical method to solve, through a developed main function, the system formed by the state and costate equations (which were also coded into a Matlab function). From the above computational simulation comments, we can assess the relevance of approach. The above problem can also be solved by focusing on the objective functional and the Euler-Maruyama, Milstein, improved Euler or stochastic Runge-Kutta numerical method, as well as the initial state and define judiciously the control processes. Since the above problem is a stochastic linear quadratic problem, it can also be solved by using the stochastic Riccati equation as well as the stochastic Hamilton-Jacobi-Bellman principle or the control parameterization method.
Footnotes
Acknowledgment
The author thanks the university for the financial support.
