Abstract
Orientation: This article is related to Financial Risk Management, Investment Management and Portfolio Optimisation.
Research purpose: The aim is to compute optimal investment allocations from one period to another.
Motivation of the study: Financial market systems are governed by random behaviours expressing the complexity of the economy and the politics. Risk Measure and Management are current and major issues for financial market operators and attract the attention of researchers who develop suitable tools and methods to describe and control risk. In this article, financial risk management is considered for an investor operating in the financial market.
Research approach/design and method: This research developed Mathematical Models to describe the problem and Computational Simulations to compute, summarise the results and show their reliabilities.
Main findings: The results are the investments allocations stored, some tables and the related computational simulations. By going from period one to another, one can notice from the graphs that the portfolio risk is decreasing and the portfolio profit increasing.
Practical/managerial implications: The approach used in this article shows a way of solving rigorously any linearly constrained quadratic optimisation problem and any constrained nonlinear problem. It gives the ability of transforming judiciously certain linearly constrained nonlinear programming problems into sequences of linearly constrained quadratic problems and solving them efficiently.
Contributions/valueadd: This article developed Mathematical Models and Matlab Computer Optimisation Programs to give Computational Simulations. It wrote Computer Programs for a fifthorder autoregressive model to forecast asset profits.
Keywords: investment allocations; portfolio selection; portfolio optimisation; data forecasting; risk minimisation; profit maximisation; sequential quadratic programming.
Introduction
The importance of optimal investment allocations and judicious historical data management are discussed in this article. These are everyday issues that financial operators, financial managers, financial planners and financial regulators have been addressing for decades. A considerable body of work exists on optimal investment allocations (also called portfolio optimisation, portfolio selection, etc.), which focuses on specific hypotheses and assumptions. Examples are provided in the referenced papers (Bielecki et al. 2003; Li & WanLung 2000; Lim 2004; Lim & Zhou 2002; Markowitz 1952; Zhou & Li 1999; Xia 2005; Xun & Zhou 2006). Most of the examples deal with single or shortperiod cases, which generally require continuous risk management for investment allocations.
Even when financial data describing features of portfolio assets are used to optimise a portfolio over a specified period, such data may impact the future. Thus, this data may be needed in some way to predict future financial data of the same type, as the historical data may contain relevant hidden or implicit information. Autoregressive (AR) models are one of the tools suitable to forecasting and prediction of data.
Autoregressive models are used to study the correlation between various random variables constituting a time series. They are extensively applied in finance, which is the reason why AR models for financial data are critical. The use of these models can facilitate the investigation of financial systems by revealing meaningful and useful information about financial processes. For example, AR models can be used to predict asset prices. This article also proposes the use of AR models to forecast expected profit vectors for financial assets, as well as the covariance matrices related to asset profits.
Certain mathematical, statistical and econometric models for mean forecasting, as well as statistical and econometric models for volatility, covariance, etc., are available. This article notes that every element of the covariance matrix is an expected value and can thus be forecast by using a mean forecasting model. Consequently, this article deals with the computation of optimal investment allocations to minimise risk for a specified minimum level of profit.
Markowitz was one of the first researchers to propose a model for solving singleperiod portfolio optimisation problems (Markowitz 1952; Zenios 1993). After further refinement and extension, his model contributed to the development of a method for quantifying risk by using variance, which enables investors to maximise profit for a given threshold of the risk.
Merton (1972) uses this model to compute an analytic solution when the covariance matrix is positive, and shortselling is allowed. The task of selecting an optimal investment is not easy, especially when dealing with a large set of assets while aiming to manage risk. One of the critical approaches involves designing reliable mathematical models that describe the problem precisely and accurately, and then computing analytical or numerical solutions to obtain associated computational simulations.
Problem formulation
Given a long time horizon [0,T] and N assets i = 1,···, N, such that for every asset i the profit is a random variable with an expected value equal to µ_{i}, the aim is to compute the optimal investment allocation, , with , to drive the portfolio in the period [0, T] and fulfil the following conditions:
Subject to:
where ∀i, R_{i}(t) is the profit of asset i at time t; µ_{i}(t) is the expected value of profit R_{i}(t); σ_{i}(t) is the volatility of R_{i}(t); µ_{p}(t) is the specified minimum level for the portfolio expected rate profit; and σ_{ij}(t)=cov(R_{i}(t), R_{j}(t)) is the covariance between the profit of asset i and the profit of asset j.
The above problem can be reformulated as a sequence of the following equality constrained quadratic optimisation problems:
Subject to:
where µ_{p}, as stated in [Eqn 5], is a variable that can take many values. For every given value of µ_{p}, the corresponding optimal investment allocations, the minimum risk σ_{p} and the point (µ_{p}, σ_{p}) must be computed to give a solution curve expressing the tradeoff between minimum risk and expected profit. In matrix form, the above problem sequence can be expressed as:
where μ = (μ_{1} μ_{2} … μ_{N}) is a realvalue Ndimensional vector, and Σ = (σ_{ij}) 1 ≤ i, j ≤ N is a real symmetric matrix. Various methods are available to solve the problem: the interior point method, the active set method, the augmented Lagrangian method, the conjugate gradient method, the gradient projection method, the extension of the simplex algorithm method, the simulated annealing method, the particle swarm optimisation method, the genetic algorithm method, the controlled random search algorithm method, the genetic programming method and the Newton’s method.
For the case in which Σ is positive definite, the above problem becomes a special case of the more general field of convex optimisation. By applying the Lagrangian method, the problem sequence (4)–(6) can be reformulated as the computation of such that the following condition is satisfied:
where:
Without loss of generality, consider a fixed integer i, then the derived firstorder necessary conditions for optimality are as follows:
As an example, a hypothetical data set (containing 10 time series on financial asset profits for a period of 12 months, generated randomly using Matlab Software) has been processed according to the optimal investment allocations, and the tradeoff between risk and profit is given in Figure 1, which, as expected, shows that profit is an increasing function of risk.

FIGURE 1: Plot of portfolio return as a function of portfolio risk. 

A further data set is presented in Table 1, which contains 10 risky financial asset profits for a period of 12 months. For each i, Profit i is the profit of the financial asset i. From Table 1, a vector of 10 expected profits μ = (μ_{1} μ_{2} … μ_{10}) and a covariance matrix Σ = (σ_{ij})_{1} _{≤} _{i,} _{j} _{≤} _{N} are computed to serve as inputs for the problem. The associated results are given in Tables 2 and 3, respectively.
TABLE 1: Twelvemonth historical asset profits (Inputs). 
TABLE 2: Minimum expected profit and optimal (minimum) portfolio risk. 
TABLE 3: Ten optimal investment allocations. 
The optimal allocations in Table 3 show that the investor does not need to allocate all the money they have because for Asset 1 and Asset 4 the optimal allocation is 0.
As for the first example, additional examples were considered to support the study of the tradeoff between the portfolio minimum risk and maximum expected profit. The related computational simulations are illustrated by Figures 2 and 3.

FIGURE 2: Plot of portfolio expected rate of return as a function of portfolio risk. 


FIGURE 3: Plot of portfolio expected profit as a function of portfolio risk. 

For longperiod investment allocations, the firstperiod investment allocations problem must be solved. Then the historical data (the expected rateofprofit vector and the covariance matrix) can be forecast to build a new expected rateofprofit vector and a new covariance matrix for the second period.
At every period other than the second period, the expected rateofprofit vector and the covariance matrix are obtained by forecasting the expected rate of profit and the covariance matrix for the previous period.
Many techniques exist for forecasting data. Such techniques are described by autoregressive (AR) models, moving average (MA) models and autoregressive moving average (ARMA) models. These are all captured by autoregressive integrated moving average (ARIMA) models. This article uses AR to obtain the asset expected rateofprofit vector μ = (μ_{1} μ_{2} … μ_{N}) and the covariance matrix Σ = (σ_{ij})_{1} _{≤} _{i, j} _{≤} _{N} for each period.
The following section illustrates the use of forecasting from one period to another.
Input data forecasting for investment allocations
This section deals with deriving future expected rateofprofit vectors and future covariance matrices for the portfolio assets of the previous period. The second expected rateofprofit vector and the covariance matrix are derived from those of the first period. AR models, which are widely used in finance, are applied in this derivation. At every period other than the second period, the expected rateofprofit vector, as well as the expected covariance matrix, is obtained from the estimated rateofprofit vector and the estimated covariance matrix of the previous period.
The first period uses the expected rateofprofit vector and the covariance matrix for the asset profits obtained from given historical data. The second period applies firstorder AR modelling to the first period expected rateofprofit vector and covariance matrix to obtain the second period expected rateofprofit vector and covariance matrix and then finally to obtain the secondperiod investment allocations. The third period applies secondorder AR modelling simultaneously to the first and second period expected rateofprofit vectors, and covariance matrices, to obtain the thirdperiod expected rateofprofit vector and covariance matrix and then finally to obtain the thirdperiod investment allocations.
In general, the kth period simultaneously applies (k1)order AR modelling to all the previous (k1)period expected rateofprofit vectors and covariance matrices to obtain the kth period expected rateofprofit vector and covariance matrix and then to obtain the kth period investment allocations. For every period, the application of the AR model can be performed as follows:
 Define the AR order.
 Estimate the unknown AR model parameters by means of Yule–Walker approach.
 Plot the time series associated with the AR model results.
Models
The AR models that are used to sequentially forecast the financial assets rateofprofit vectors and the covariance matrices characteristically generate systems of finite difference equations, which can be reformulated as an algebraic linear system of equations where the unknowns are the parameters. The equations may be simplified by reducing the financial data time series to a zero mean after having subtracted the sample mean.
Thus, the task can be done with a meanadjusted series. The series is called an AR model. For this article, AR models may define the time series of expected rateofprofit vectors and the time series of financial assets covariance matrices as functions of their past values. The order of the AR model will reveal the number of past values that are involved. An investment allocations period may typically involve the previous period data or data from more than one prior period. Some orderbased AR models are described below.
Computation of inputs at the second period
The computation of µ and Σ at the second period of investment allocations is obtained as follows:
The computation of µ and Σ at the second period of investment allocations can also be obtained from the stock profits π at the second period. The profit at the second period is as follows:
where for each t, π_{t} represents a (row) vectors of profits at time t. µ and Σ are predictors for the observation at times t−1, while and are the vectors of autoregression parameters to be estimated. For both µ and Σ, ϵ_{t} is a random error vector (also called innovation or white noise), which is independent and identically distributed with E(ϵ_{t}) = 0 and .
In matrix form, the computation of the expected rate of profit, based on the firstorder autoregressive model (AR(1)), can be expressed as follows:
By letting:
Then using the least square approach, parameter for the µ is obtained as follows:
In matrix form, the computation of the covariance matrix, based on the firstorder autoregressive model (AR 1), can be expressed as follows:
By letting:
Then, using the least square approach, parameter for the Σ is obtained as follows:
Computation of inputs at the third period
The computation of µ and Σ at the third period of investment allocations is obtained as follows:
The computation of µ and Σ at the third period of investment allocations can also be obtained from the stock profits π at the third period. The profit at the second period is as follows:
where each t, µ_{t1} and µ_{t2} (for the expected rate of profit µ_{t} at times t) as well as Σ_{t1} and Σ_{t2} (for the covariance matrix Σ_{t} at time t) represent rows of vector predictors for the observation at times t–1 and t–2, respectively; and are the coefficients of vector µ_{t} to be estimated, and are the coefficients of vector π_{t} to be estimated, while ϵ_{t} is a random error vector and is assumed to be normally distributed. Errors ϵ_{t} are independent of one another and assumed to be normally distributed with expectation zero and constant variance . In matrix form, the thirdperiod inputs for the expected rate of profit, and the covariance matrix, can be computed from the following linear system:
By letting:
Then the thirdperiod inputs µ can also be obtained by:
Similarly, for Σ in matrix form, the thirdperiod inputs for the expected rate of profit and the covariance matrix can be computed from the following linear system:
By letting:
The thirdperiod inputs can also be obtained by:
Computation of the inputs at the (p + 1)st period
At the (p + 1)th period, µ and Σ are obtained by solving the following linear system of difference equations:
The computation of µ and Σ at the third period of investment allocations can also be obtained from the stock profits π at the third period. The profit at the second period is as follows:
For the computational simulations, the fifthorder autoregressive model (defined by Equation 33 where p = 5) is used to forecast the asset profits.
Sequential investment allocations
The concern is the following: find the investment allocations satisfying the following conditions:
Subject to:
and with the following substitutions:
where if the following designations apply:
 is the profit of asset i at period k.
 is the expected value of the profit at period k.
 is the volatility.
 is the specified acceptable minimum level for the portfolio expected rate of profit.
 is the covariance between the profit of asset i and the profit of asset j at period k.
For the first period, the optimal investment allocations can be computed from collected historical data and some specified level of expected profit. Subsequently, for period and can be obtained from the forecasts that are generated for and based on an AR model configuration.
Computational simulations
The computational simulations are based on ‘Sequential investment allocations’ section to show the effectiveness of the theory. The first period investment allocations are based on historical data of Table 1. From that table, an expected value is computed for each asset and a covariance matrix for the whole table is also computed to serve as input to the investment allocation problem.
By applying a fifthorder autoregressive model to forecast the financial data of Table 1 (considered for the first period investment allocations), the autoregressive coefficients ∅_{jπ} (Equation 33) for the assets are given in Table 4.
For each of the 10 considered assets, the associated autoregressive coefficients enable one to perform forecasting and obtain four time series of length 12 each (time series for the next four periods where each period has 12 months). For each period, an investment allocation was performed and was summarised by an efficient frontier curve. An investment allocation (portfolio selection) is associated with each point of the efficient frontier (each pair of [risk, profit]).
Figures 4 to 8 are the computational simulations for the sequential investment allocations from period 1 to period 5 respectively.

FIGURE 4: Sequential portfolio investment allocations. Efficient frontier: Period 1. 


FIGURE 5: Sequential portfolio investment allocations. Efficient frontier: Period 2. 


FIGURE 6: Sequential portfolio investment allocations. Efficient frontier: Period 3. 


FIGURE 7: Sequential portfolio investment allocations. Efficient frontier: Period 4. 


FIGURE 8: Sequential portfolio investment allocations. Efficient frontier: Period 5. 

By browsing and comparing the efficient frontier of Periods 1–5 defining the sequential optimal investment allocation for portfolio optimisation, one can notice that the more we progress in time, the more the portfolio risk (the portfolio variance) decreases and the portfolio profit increases, which shows a good process for the optimisation of the considered investor’s portfolio.
The more time is passing the more risk is getting minimised and profit is getting maximised. One may continue forecasting and analyse the meanvariance performance.
Conclusion
The aim of this article was to compute the optimal investment allocations of a number of portfolio assets over a longterm period. The tradeoff between risk and profit for such a longterm formulation was investigated, and computational simulations corroborate the notion that the higher the risk, the higher the profit. For efficient risk management, the given period was subdivided into discrete subperiods so that every subperiod addressed an optimal investment allocations problem. The forecast data could be computed iteratively for consecutive periods.
Acknowledgements
The authors are grateful to the University of Johannesburg for funding their research.
Competing interests
The authors declare that they have no financial or personal relationships that may have inappropriately influenced them in writing this article.
Authors’ contributions
M.M. was responsible for problem formulation mathematical modelling and computational simulations. E.H. and T.M. performed the supervision of the research.
Ethical considerations
This paper was not based on the involvement of people. This article followed all ethical standards for research without direct contact with human or animal subjects.
Funding
This research was funded by the University of Johannesburg.
Data availability statement
Data sharing is not applicable to this article.
Disclaimer
The views and opinions expressed in this article are those of the authors and do not necessarily reflect the official policy or position of any affiliated agency of the authors.
References
Bielecki, T.R., Jin, H., Pliska, S.R. & Zhou, X.Y., 2003, ‘Continuoustime meanvariance portfolio selection with bankruptcy prohibition’, Mathematics of Finances 15(2), 213–244. https://doi.org/10.1111/j.09601627.2005.00218.x
Li, D. & WanLung, Ng., 2000, ‘Optimal dynamic portfolio selection: Multiperiod meanvariance formulation’, Mathematical Finance 10(3), 387–406. https://doi.org/10.1111/14679965.00100
Lim, A.E., 2004, ‘Quadratic hedging and meanvariance portfolio selection with random parameters in an incomplete market’, Mathematics of Operations Research 29(1), 132–161. https://doi.org/10.1287/moor.1030.0065
Lim, A.E. & Zhou, X.Y., 2002, ‘Meanvariance portfolio selection with random parameters in a complete market’ Mathematics of Operations Research 27(1), 101–120. https://doi.org/10.1287/moor.27.1.101.337
Markowitz, H.M., 1952, ‘Portfolio selection’, Journal of Finance 7(1), 77–91. https://doi.org/10.1111/j.15406261.1952.tb01525.x
Markowitz, H.M., 1959, Portfolio selection: Efficient diversification of investments, p. 8, Wiley, New York.
Merton, R.C., 1972, ‘An analytic derivation of the efficient portfolio frontier’, The Journal of Financial and Quantitative Analysis 7(4), 1851–1872. https://doi.org/10.2307/2329621
Xia, J., 2005, ‘Meanvariance portfolio choice: Quadratic partial hedging’, Mathematical Finance 15(3), 533–538. https://doi.org/10.1111/j.14679965.2005.00231.x
Xun, L. & Zhou, X.Y., 2006, ‘Continuoustime meanvariance efficiency: The 80% rule’, The Annals of Applied Probability 16(4), 1751–1763. https://doi.org/10.1214/105051606000000349
Zenios, S.A., 1993, ‘A model for portfolio management with mortgagebacked securities’, Annals of Operations Research 43(6), 337–356. https://doi.org/10.1007/BF02025090
Zhou, X.Y. & Li, D., 1999, ‘Continuoustime meanvariance portfolio selection: A stochastic linear quadratic framework’, Applied Mathematics and Optimization 42(1), 19–33. https://doi.org/10.1007/s002450010003
