Adv Syst Sci Appl 2019; 02; 44-62 Published online at http://ijassa.ipu.ru/index.php/ijassa/article/view/708 The Relaxation of Complementary Slackness Conditions as a Regularization Method for Optimal Control Problems Nikolay Pilnik1,2,3 and Igor Pospelov2 and Stanislav Radionov1,2,3* 1)National Research University Higher School of Economics, Moscow, Russia; E-mail: saradionov@edu.hse.ru 2)Federal Research Center “Computer Science and Control”, Moscow, Russia; 3)Financial Research Institute of the Ministry of Finance of the Russian Federation, Moscow, Russia Received March 3, 2019; Revised June 21, 2019; Published July 10, 2019 Abstract: A new approach to the transformation of solutions of optimal control problems is presented. It utilizes the approximation of differential equations for the dual variables, the transformation of continuous time equations to their discrete analogues, the relaxation of complementary slackness conditions. The proposed approach is tested on the Russian banking system model, which is derived as a solution of a linear nonautonomous optimization problem with mixed constraints. It is shown that the use of this method regularizes the model in a sense it becomes applicable for the forecasting of the main Russian banking indicators (the accuracy of forecasts is comparable with advanced econometric models) and the policy analysis. The stability of model parameters with respect to the change of the estimation time interval and the stability of the model with respect to small disturbances of parameters is confirmed. Keywords: optimal control; complementary slackness conditions; banking system. 1. INTRODUCTION AND LITERATURE REVIEW In this paper, an approach to transforming solutions of optimal behavior problems of macroeconomic agents that constitute the blocks of general economic equilibrium models is presented. The features of this approach using the example of the Russian banking system model are demonstrated, which is intended to be a block of a larger model of the Russian economy. The essence of this method is a special transformation of some relationships (complementary slackness conditions) to a more regular ones of the special form. This allows to find the analytical expressions for all variables of the model, which greatly simplifies the procedure of parameter estimation. The presented methodology is substantially different from the approach applied in the dynamic stochastic general equilibrium (DSGE) framework, which is a mainstream in a modern macroeconomic modeling nowadays. It is well known fact that dynamic stochastic general equilibrium (DSGE) models cannot be solved exactly except for the simplest cases due to their exceptional mathematical complexity. Hence, the approximation techniques should be used. The most common technique is called the perturbation method. The key idea is to approximate the model around the so-called steady state and then find the exact solution of the approximation, see for example [1]. * Corresponding author: saradionov@edu.hse.ru THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 45 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) Hence, the dynamics of the economy is considered as a deviation from its steady state caused by shocks, which can be interpreted as positive or negative depending on the sign of their impact. The steady state is a numeric vector which contains the steady values of all model variables. It can be calculated after some model transformations, usually the detrending (if the variables exhibit balanced growth), or the change of variables of the model to their stationary version. In the practical models the first order approximation is usually used (see for example [2, 3, 4]), because higher-order approximations of the models with more than 5-7 equations is prohibitively time-costly during the parameter estimation phase, and also lead to unreliable estimations (with high standard deviations). Some modifications of perturbation method were proposed, for example, in [5, 6]. Nevertheless, it is known that linear approximation can perform poorly for the regions not very close to the steady state. Even worse, linear approximation can lead to wrong conclusions about the existence and uniqueness of equilibrium, see [7]. For these reasons, there a growing interest in more advanced quadratic and higher order approximation techniques, and some advances in this direction have been made, see for example [8, 9]. For this moment, however, the linear approach is still a mainstream due to the issue of unreliable coefficients described above. A brief review of the macroeconomic models incorporating banking sector as well as a review of papers dedicated to the Russian banking system was presented in the accompanying paper [10]. The summary of this review is that the banking system gradually becomes an element of DSGE models, but the description of this sector remains highly stylized due to limitations of the model size described above. The model presented in this paper describes an agent “bank” with substantially wider set of available controls. Bank can lend to producers and consumers and can take savings from both. Savings and loans can be nominated in national currency (Russian rubles) and in a foreign one (actually in a currency basket containing US dollars and euros). In comparison with the version of the model presented in the accompanying paper [10], we now model loans of firms and households introduced as separate variables. We also include one more restriction on the banking system associated with a capital adequacy ratio. This work continues our research on the Russian banking sector presented in [11, 12, 13]. The contribution of this article is threefold. First, a new methodology of the transformation of optimal control problem solution using the turnpike property and relaxation of complementary slackness conditions is presented. Second, it is shown how this methodology allows to transform the system of equations of the model and obtain a complete analytical solution, which is used later on at the stage of estimating the parameters of the model. Third, a wider set of macroeconomic variables whose trajectories are successfully replicated by our model is considered. 2. THE MODEL 2.1. Statement of the model The model of the whole banking system as a single agent is considered. It is transformed to the usual dynamic model that determines the demand of the banking system for deposits and the supply of loans depending on the current balance of the bank, as well as on interest rates and other external market factors. The bank model is considered in continuous time on the interval  0 ,t T . Using the sufficient conditions of the maximum in the Lagrange form, the analytical solution of the bank problem is obtained. The subsequent use of the turnpike property and the transition to discrete time allows to use the technique of relaxation of the complementary slackness conditions. After that, the 46 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) expressions for all endogenous variables of the model are obtained, in the right-hand parts of which only exogenous variables and previous values of endogenous variables are included. The following tables contains the list of the model variables – the money stocks, the flows associated with it, its durations, interest rates and the model parameters. The relationships between these variables are assumed to follow equalities and inequalities presented below. Table 2.1. The model variables Variable Meaning Associated flow Duration Interest rate ( )Lh t Household loans in rubles ( )Kh t ( )lh t ( )lhr t ( )Sh t Household deposits in rubles ( )Vh t ( )sh t ( )shr t ( )La t Firm loans in rubles ( )Ka t ( )la t ( )lar t ( )Sa t Firm deposits in rubles ( )Va t ( )sa t ( )sar t ( )vLh t Household loans in foreign currency ( )vKh t ( )vlh t ( )vlhr t ( )vSh t Household deposits in foreign currency ( )vVh t ( )vsh t ( )vshr t ( )vLa t Firm loans in foreign currency ( )vKa t ( )vla t ( )vlar t ( )vSa t Firm deposits in foreign currency ( )vVa t ( )vsa t ( )vsar t ( )Sc t Deposits of the Central Bank ( )scr t ( )Lc t Loans of the Central Bank ( )lcr t ( )vSf t Deposits of the foreigners ( )vsfr t  N t Balances of settlement accounts  nN t Supply of balances of settlement accounts  A t Liquid funds in rubles  vA t Liquid funds in foreign currency  Rc t ( )Z t Dividends paid by the bank  oOP t Other liabilities  oOC t Table 2.1. The model parameters Parameter Meaning  ww t Dollar to ruble exchange rate sh , sa , lh , la , vsh , vsa , vsf , vlh , vla Parameters of liquidity constraints  sn t ,  vsn t Parameters of reserve requirement  a t Parameter of capital adequacy constraints  , ,  liq t Parameters of utility function THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 47 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) Consider the bank, which issued household loans nominated in rubles in the amount of ( )Lh t by the time t . The average terms of loans (durations) will be denoted by 1 ( )lh t . The variable ( )lh t will be referred below as the inverse durations and interpreted as the average return frequency of household loans in rubles. Then the dynamics of loans is described by the equation         d d lhLh t Kh t t Lh t t   , (2.1) where ( ) 0Kh t  (2.2) is the flow of newly issued loans. Note that in all the formulas given below, unless otherwise specified, it is assumed that the relationship is valid for any point in time on the interval  0 ,t T . With respect to loans granted, the bank receives interest payments ( ) ( )lhr t Lh t , where ( )lhr t is the effective interest rate on household loans in rubles. Denote the amount of household deposits in rubles the bank attracted by the time t by ( )Sh t . The average terms for which deposits are attracted, will be denoted by 1 ( )sh t . The variable ( )sh t will be referred below as the inverse durations and interpreted as the average frequency of the return of deposits. Then the dynamics of household deposits in rubles is described by equations         d d shSh t Vh t t Sh t t   , (2.3) where ( ) 0Vh t  (2.4) is the flow of newly attracted deposits. The bank pays interest on borrowed funds ( ) ( )hr t Sh t , where ( )shr t is the effective interest rate on household deposits in rubles. Similarly, the bank interacts with firms, giving them loans and attracting deposits from them in rubles. These processes are described by the equations         d d laLa t Ka t t La t t   ,         d d saSa t Va t t Sa t t   , (2.5) where ( ) 0Ka t  , ( ) 0Va t  are the flows of newly issued firm loans in rubles and newly attracted firm deposits in rubles. Variables ( )la t and ( )sa t describe the frequency of repayment of loans and deposits of firms. Interest payments are made according to the effective interest rates ( )lar t and ( )sar t . In addition to operations in rubles, the bank conducts operations in foreign currency. To describe these processes, we duplicate the description of loans and deposits for individuals and firms given above with the prefix “v” added to each variable, which indicates that this variable is nominated in dollars. The equations which describe the currency transactions are as follows:         d d vlhvLh t vKh t t vLh t t   , ( ) 0vKh t  , (2.6)         d d vlavLa t vKa t t vLa t t   , ( ) 0vKa t  ,         d d vshvSh t vVh t t vSh t t   , ( ) 0vVh t  , 48 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019)         d d vsavSa t vVa t t vSa t t   , ( ) 0vVa t  . (2.7) Denote the dollar to ruble exchange rate by  ww t . Interest payments in dollars are made at effective interest rates ( )vlhr t ( )vshr t , ( )vlar t и ( )vsar t . In addition to deposits, the bank also attracts funds in the form of interest free balances of settlement accounts  N t . There is no regulating value for the size of these balances, and the bank should simply focus on the supply from the clients. Therefore, this value is considered to be bounded exogenously:    nN t N t , where  nN t is the supply of the balances of settlement accounts known to the bank. Similar logic is used to describe two other external sources of funds: deposits of the Central Bank, which it invested in the banking system  Sc t (in rubles) and deposits of foreign organizations attracted by the bank from abroad  vSf t (in dollars). The three variables introduced above  nN t ,  scSc t ,  vsfvSf t , in fact, describe the state of the other agents of the economy that interact with the bank. Current accounts characterize the economic activity of households and firms, deposits of the Central Bank describe the monetary policy pursued by it (the amount of funds invested in the banking system), and deposits of foreign organizations show the intensity of interaction with the external world. These variables become especially important when describing the 2014–2015 crisis phenomena and the external constraints that appeared in the form of various sanctions. Interest paid on deposits of the Central Bank and foreign organizations are defined by the rates ( )scr t and ( )vsfr t . The bank also has another channel of interaction with the Central Bank - interest accounts, which in our terms means loans issued by the bank to the Central Bank. We denote them by  Lc t . The bank receives interest payments on this account in rubles at the rate of ( )lcr t . The only restriction on this variable is the condition of non-negativity   0Lc t  . (2.8) For servicing operations related to loans and deposits, the bank uses two types of liquid funds: the first one nominated in rubles  A t and the second one nominated in foreign currency  vA t . It is assumed that their volumes in the balance sheet are proportional to ruble and foreign currency loans and deposits, respectively. These proportions are defined by the coefficients  with corresponding indices. These coefficients have a legislative counterparts. In fact, they are model analogues of liquidity adequacy ratios.          sh sa lh laA t Sh t Sa t Lh t La t       , (2.9)            vsh vsa vsf vlh vlavA t Sh t Sa t Sf t Lh tv La tv v v v         . The bank’s activity in attracting deposits is limited by the reserve requirement, which obliges the bank to keep part of the funds raised in the Central Bank accounts. We model this requirement as                     ,s vs wRc t n t Sh t Sa t n t w t vSh t vSa t vSf t     (2.10) where  sn t and  vsn t are the reserve requirement coefficients for the ruble and the foreign currency deposits. THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 49 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) Taking into account all the operations described above, the financial balance of the bank can be written out as:                     d d lh lh la laA t Kh t t r t Lh t Ka t t r t La t t          (2.11)                                                                                     d d d d d d d d d d w vlh vlh vla vla sh sh sa sa w vsh vsh vsa vsa sc w vsf lc w w t vKh t t r t vLh t vKa t t r t vLa t Vh t t r t Sh t Va t t r t Sa t w t vVh t t r t vSh t vVa t t r t vSa t Sc t r t Sc t w t vSf t r t vSf t Lc t r t Lc t t t t N t w t vA t t                                                  d d ( ) . d d o ot Rc t OP t OC t Z t t t          The flow ( )Z t is the amount of dividends paid by the bank. Variable  oOP t is “other liabilities” and means the difference between all other liabilities and bank balance assets that are not described in the model. The flow  oOC t includes tax payments, investments in fixed assets (including participation in property), as well as operating expenses. These flows (except, perhaps, taxes) are not directly related to the assets and liabilities of the bank, hence we will not delve into the  oOC t structure. Finally, the last limitation of the bank's activity in the model is the capital adequacy ratio. Equity is not explicitly included in the model, therefore it is written as the difference of assets and liabilities of the bank. The minimum value of equity capital is determined by the total volume of bank assets in the proportion set by the capital adequacy ratio  a t . In the model, this restriction looks like this:                                                           . w w a w t A t La t Lh t Lc t Rc t w t vA t vLa t vLh t A t La t Lh t Lc t Rc t w t vA t vLa t vLh t Sa t Sh t Sc t N t OP t w t vSa t vSh t vSf t                            (2.12) The above relationships represent the limitations imposed within the model on the bank’s ability to choose the values of its planned variables (controls):                                             , , , , , , , , , , , , , , , , , ( ), ( ), , , , , . Kh t Lh t Ka t La t Vh t Sh t Va t Sa t vKh t vLh t vKa t vLa t vVh t vSh t vVa t vSa t Sc t Lc t Sf t Z t N t Rc t A t vA t (2.13) According to the principle of rational expectations underlying the models of intertemporal equilibrium, when planning its control variables, the bank can rely on an accurate forecast of information variables:                                                       , , , , , , , , , , , , , , , , , , , ( ), , , , , , , , . lh sh la sa vlh vsh vla vsa lh sh la sa sc lc vlh vsh vla vsa vsf a s vs n o o sc sf w t t t t t t t t r t r t r t r t r t r t r t r t r t r t r t t n t n t N t OP t OC t Sc t Sf t w t          (2.14) As a result, the choice of the planned variables by the bank actually determines the supply 50 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) of loans, as well as its demand for attracted and liquid funds as a function of current and future values of information variables (primarily interest). The goal of the bank is to maximize the total discounted utility from the received undistributed profit taking into account the given deflator  liq t . Therefore, the functional of the bank can be written as    0 1 e d 1 t T t liq Z t t t              , with respect to the variables (2.13) with constraints (2.1) – (2.11) on  0 ,t T , the values of phase variables specified at the initial time and the given trajectories of exogenous values (2.14). For the solvability of the constrained optimization problem it is necessary to supplement it with terminal conditions, which can be defined as a growth condition for some linear form of the phase variables:                                                                   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ( ) ( ( ) . o w o w A T Lh T La T Lc T Sh T Sa T Sc T N T Rc T OP T w T vA T vLh T vLa T vSh T vSa T vSf T A t Lh t La t Lc t Sh t Sa t Sc t N t Rc t OP t w t vA t vLh t vLa t vSh t vSa t vSf t                                     (2.15) This is an analog of no Ponzi condition written in terms of bank’s own capital which is a difference between its assets and liabilities. 2.2. Optimal behavior in the model The formulated problem belongs to a very complex class of optimal control problems — it is a linear nonautonomous problem with mixed constraints. Next, we describe the main stages of finding and transforming its solution. Each of the constraints is assigned a dual variable (non-negative - to inequality and with indefinite sign - to equality), a Lagrange functional is composed and the conditions of its saddle point are written out, which represent a system of sufficient optimality conditions, see for example [14]. These conditions fall into four groups:  differential equations, the initial conditions for which are assumed to be given;  conjugate differential equations for the dual variables;  transversality conditions that define terminal conditions for conjugate differential equations;  complementary slackness conditions for inequalities. In general, they consist of three conditions ( ) ( ) 0, ( ) 0, ( ) 0t X t X t t     , where ( )X t is the direct variables in the original inequality, and ( )t is the dual variable to this inequality. The system of such conditions we will denoted further by   ( ) ( )t X t . Consider the technique of working with a system of sufficient conditions obtained after transforming variations of the Lagrange functional in direct variables on the example of equations for variables describing the bank’s interaction with the consumer (the conditions for interacting with a firm look similar). Start with the above-mentioned THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 51 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) conditions of complementary slackness, derived from inequalities for the positiveness of new deposits attracted (2.2) and loans issued (2.4) in rubles and foreign currency. This set of conditions is as follows:      [ 6 ][ ]t t Kh t , (2.16)        [ 8 ][ ]wt t w t vKh t ,      [ 14 ][ ]t t Vh t ,        [ 16 ][ ]wt t w t vVh t . (2.17) In this case,        2 , 4 , 6 , 8t t t t    is the normalized dual variables to the corresponding inequalities,  t is the dual variable to the financial balance. The dynamics of the dual variable  t turns out to be extremely important for describing the optimal behavior of the bank. For convenience, the following variable will be used later     ( ) d t dtt t      . The rate of decline of the dual variable to the financial balance ( )t can be interpreted as the profitability of the agent. Transforming the variations of the Lagrange functional with respect to stocks ( ), ( ), ( ), ( )Lh t vLh t Sh t vSh t and flows ( ), ( ), ( ), ( )Kh t vKh t Vh t vVh t allows us to obtain differential equations for normalized dual variables        2 , 4 , 6 , 8t t t t                 d 6 6 (1 , d )lh lh lc lht t t t r t r t t          (2.18)                         d d d8 8 d d d1 1 , w vlh w w vlh lc vlh vlh w w t tt t t t t w t w t tr t r t w t                                          d 1 14 14 d 1 ( ) ( ) , 1 ( ) sh s sh lc a a sh a t t t t n t r t t t t r t t t                                                  d ( )d d16 16 d 1 ( ) d 1 d1 . 1 ( ) w a vsh w a w vsh vs vsh vsh a w lc w t ttt t t t t t w t t w t tn t r t r t t w t                                    (2.19) Variation of the Lagrange functional with respect to the variable  Z t leads to a differential equation for this variable 52 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019)           d d 1 d . d liq liq tt tZ t Z t t t                  (2.20) Relations (2.16) - (2.20), restrictions on direct variables (2.1), (2.3), (2.5), (2.6) - (2.7) and (2.11), as well as conditions (2.9) - (2.10) transformed into equalities together with the conditions on the terminal values of dual variables, obtained by varying the Lagrange functional with respect to phase variables at the time T , fully describe the solution of the optimal control problem. 2.3. Transformation of the solution In addition to the standard methods developed for solving such problems, novel methods developed for the transition from problems in continuous time, like the one discussed above, to problems in discrete time, which can be used for matching with statistical data are also used. This method will be presented in this subsection. At the first stage, differential equations for dual variables (2.18) - (2.19) are transformed, using the following property. All these equations are highly unstable in straight time. The only bounded solution on  0 ,t T is the one close to the quasistationary one, normalized in such a way to fulfill the terminal condition as equality. This solution is a zero order approximation of the abovementioned normalization coefficient (see [15]). Therefore, a large part (actually almost the whole interval  0 ,t T for a given observed rates and durations) is spent around the separatrix, deviating sharply from it to fulfill the terminal condition. This property of the solution is called the turnpike property and is described in detail, for example, in [16]. Using it, differential equations (2.18) - (2.19) can be approximated by the following expressions after replacing the derivative of the normalized dual variable with zero according to the definition of separatrix.           (1 , ) 6 lh lc lh lh r t r t t t t         (2.21)                       d d1 1 8 , d d w vlh lc vlh vlh w w vlh w w t tr t r t w t t w t tt t w t                           ( ) 1 1 ( ) 1 ( ) 14 , a sh s sh lc a a sh t t r t n t r t t t t t t                    THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 53 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019)                         ( ) 1 1 ( ) 1 ( ) d d1 16 . d d l a vsh vs a a w vsh vsh w c w vsh w t t n t r t t t w t tr t w t t w t tt t w t                          (2.22) Note that using the above four relations for dual variables leads to elimination of the influence of the future (terminal conditions that determine their value at the moment of time T ) on the past (the entire trajectory until this last moment) typical for the dual variables. The terminal condition (2.15) ensures the solvability of the original problem and allows to obtain the values of the dual variables at the moment of time T . That is why the terminal conditions themselves will not be of further interest, since they only affect for a very small amount of time before the moment T . From the point of view of using models of this kind in applied calculations, it should be borne in mind that the statistics of the entire trajectory even for exogenous variables is not available. The data is fundamentally discrete and is calculated with a certain frequency: month, quarter, year, and so on. Hence, the data either on average for this period or the value corresponding to its end is used. In order to adapt the model to this type of data, the sampling procedure is used - the transition to discrete time (see [17] for more details). It is assumed that, although the bank acts as described in its optimization problem in continuous time on an interval  0 ,t T , it is possible to observe it at discrete moments. It should be noted that this technique is essential in the construction of the model. If a model is directly written in discrete time, then the complementary slackness conditions (2.16) - (2.17) will have to be resolved in a uniform way: the direct variables in the right bracket will always have to be assumed larger than zero, and the dual variables in the left bracket will be considered equal to zero. The latter, by virtue of relations (2.21) - (2.22), will lead to the appearance of rigid relations between rates, which, is not what is observed in the data. It is also incorrect to reject these relations both from a mathematical point of view, thereby violating the equality between the number of equations and the number of endogenous variables, as well as the essential one. Dual variables        2 , 4 , 6 , 8t t t t    do not simply take into account the influence of individual interest rates that are in their relations (2.21) - (2.22), but also link these effects within the entire model through a variable  t . This property allows the model to describe not only the direct effects of interest rates (for example, a change in the rate on ruble loans to the households on the volume of ruble loans issued to the households), but also cross- impact. The model takes into account the dependencies of all endogenous variables from all exogenous variables (which, in principle, is typical for general equilibrium models). In the process of deriving a system of equations describing optimality conditions, the type of functional form for each such dependence is determined. It seems that it is extremely difficult to obtain such dependencies in the framework of econometric models, because, firstly, in this case the functional form has to be guessed (the testing possibilities, although they exist, are very limited), and secondly, take into account the influence of all 54 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) exogenous variables even per one endogenous variable are practically impossible - the number of estimated coefficients is critical for the available data set. Further, every indicator in discrete time is associated with indicator in continuous time. Within this approach, each derivative can be replaced by the difference between the current and the previous value. ( ) ( ) ( 1) d X t X t X t dt    , but at the same time, the variable itself, which occurs in the same equations without a differential, must be replaced by its value at the previous time. The result of applying this technique can be demonstrated for the balance of ruble loans issued to the public (2.1), which should be written as          1 1lhLh t Lh t Kh t t Lh t     . (2.23) Balances (2.3), (2.5), (2.6) - (2.7) should be rewritten in a similar way. Then the financial balance (2.11) should be rewritten in the form                       1 1 1 lh lh la la A t A t Kh t t r t Lh t Ka t t r t La t                (2.24)                                                                                       1 1 1 1 1 1 1 1 1 1 1 w vlh vlh w vla vla sh sh sa sa w vsh vsh w vsa vsa sc n n w t vKh t t r t vLh t w t vKa t t r t vLa t Vh t t r t Sh t Va t t r t Sa t w t vVh t t r t vSh t w t vVa t t r t vSa t Sc t Sc t r t Sc t N t N t Rc t Rc t Lc t Lc t                                                                                1 1 1 1 1 . lc o o o w vsc r t Lc t OP t OP t OC t Z t w t vA t vA t vSc t vSc t r t vSc t                 Expressions (2.9) - (2.10) and (2.12), written as equalities, should be rewritten as            1sh sa lh laA t Sh t Sa t Lh t La t d Seas t        ,            vsh vsa vsf vlh vlavA t Sh t Sa t Sf t Lh tv La tv v v v         ,                    s vs wRc t n t Sh t Sa t n t w t vSh t vSa t vSf t     ,                                                            w w a w t A t La t Lh t Lc t Rc t w t vA t vLa t vLh t A t La t Lh t Lc t Rc t w t vA t vLa t vLh t Sa t Sh t Sc t N t OP t w t vSa t vSh t vSf t                            . In turn, relation (2.20) can be rewritten as               11 1 1 . 1 liq liq liq t tt Z t Z t Z t t                   (2.25) The complementary slackness conditions (2.16) - (2.17) require a separate discussion. In fact, they are degenerate functional dependencies, the graph of which delineates the boundaries of the first quarter, and, therefore, the optimal solution of the system under study “jumps around the corners”. From the economic point of view, they describe the THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 55 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) infinitely elastic supply or demand functions of the agent. From the point of view of the subsequent model calibration, these relationships present a significant difficulty, substantially increasing the instability of the coefficient estimates, and, as a result, the forecasts calculated using the model. Nevertheless, with the help of natural assumptions about switching modes determined by the method of resolving each of the conditions of the complementary slackness, it is possible to move to more regular and convenient ratios from the point of view of the model calibration. This technique is studied in more detail in [17]. The main idea behind this method is that although the bank itself works in continuous time, it can only be observed at specific points of time (at the end of each month). Because of this, pure regimes of resolving the complementary slackness conditions are never seen. Indeed, some mixtures are observable, which can be described as follows: "Bank issued new loans x% time in this month, and did not issue them (1-x)% time in this month". The equations presented below answer the question of what is the proportion of time spent in this or that regime. Using the previously obtained expressions for dual variables (2.21) - (2.22) and the special rules for their normalization, the relaxation coefficients , , , ,i i i i ia b c cc cf are added, where 1,...,8i  is the number of the corresponding complementary slackness condition. Consider the principles of relaxation of the complementary slackness conditions on the example of the households’ foreign currency deposits because the equation (2.22) is the most complicated one. According to our approach, (2.17) is replaced with the following relation                        1 1 1 1 1 1 16 1 1 . ( ) w w vsh w c f vVh w t w t vVh t b a t t t vSh t w t c t cc t cf t B t                      The direct variable included in the complementary slackness condition always appears as a dependent one. The first bracket on the right side is a linear function of the dual variable. In this case, there are two coefficients 1 1,a b that will be estimated later. This bracket actually determines the proportion of time during the month (discrete grid step) when new deposits are taken. However, it is important to remember that this bracket itself has no dimension, and the dependent variable clearly has a dimension. Therefore, the first bracket is normalized to two more factors: to the corresponding phase variable of the previous period (variable of the “stock” type), and to the bracket that coincides with the denominator of the expression (2.22) for the dual variable. Such a normalization allows us to analytically find all model variables in discrete time. The resulting first term in the right part actually describes the choice of banks for the volume of deposits taken depending on their level at the previous point in time, their interest rate, duration and exchange rate (only for currency indicators). In addition, information about the corresponding indicators of other bank-controlled variables is transmitted through the variable ( )t . To take into account the influence of exogenous variables, a second term containing coefficients 1 1 1, ,c cc cf is added to this expression, in which, for convenience, the following variables are introduced              1 1 ,n n o o ot N t N t OP t OP t OC t Z t                  1 1 ,c sct Sc t Sc t r t Sc t      56 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019)           ( ) 1 1 .f w vsft w t vSf t vSf t r t vSf t      The function ( )vVhB t is specifically chosen to agree on the dimensionality of the components of the entire expression, and for the convenience of its further use when substituting into the financial balance. For example, for the variables  vVh t and  vKh t the similar function should contain the dollar exchange rate ( )ww t . Preliminary analysis of the data showed that there is a clear seasonal component in some series, namely in ruble deposits of the households and firms and in ruble liquidity, showing clear peaks at the end of each year. No preliminary adjustment to this seasonality is made, but instead, if necessary, an amendment for a special dummy variable  Seas t is introduced, which takes unit values every December and is zero at all other points. Consider the expressions only for variables describing the interaction of the bank and the households. As a result of the described transformations, the following expressions are obtained                                        1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 , 1 ( ) w w vsh vsh vsh w a vsh vsh lc a c f w a w t w t vVh t a r t b t a b w t u t n t a r t u t a b t vSh t c t cc t cf t w t u t                                (2.26)                                2 2 2 2 2 2 2 2 2 3 1 1 1 , 1 ( ) sh sh a sh sh lc a c f a a r t b t u t n t a r t Vh t Sh t u t a b t c t cc t cf t d Seas t d Seas t u t                                                               5 5 5 5 5 5 5 5 5 1 1 1 1 1 , w w vlh vlh vlh w c f vlh lc w w t w t vKh t a r t b t a b w t c t cc t cf t a r t b t vLh t w t                                                  6 6 6 6 6 6 6 1 1 4 5 1 , lh lh lh lc c f Kh t a r t b t a r t b t Lh t c t cc t cf t d Seas t d Seas t                   (2.27) where the following notation is used for convenience 1 ( ) . 1 ( ) a a u t t    Now we describe the logic of the relationship between variables in the resulting dynamic system at a time t . Suppose that its state is fully known at the moment of time 1t  (all variables from (2.13) are known), information variables from (2.14), and all coefficients are also known. In addition, for now assume that the value of ( )t is known. Then, from the relaxed complementary slackness conditions (2.26) - (2.27), the variables ( ), ( ), ( ), ( )Kh t vKh t Vh t vVh t and ( ), ( ), ( ), ( )Ka t vKa t Va t vVa t are determined. Then from balances of type (2.23) ( ), ( ), ( ), ( )Lh t vLh t Sh t vSh t and ( ), ( ), ( ), ( )La t vLa t Sa t vSa t can be found. From (2.25) ( )Z t can be found. As a result, all unknown variables at time t from THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 57 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) the financial balance (2.24) can be written as functions of profitability ( )t , parameters, information variables, and variables at time 1t  . After substituting such expressions in the financial balance, we get an expression for the variable ( )t .                                                                                 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 lh la vlh w vla w w a a a a vs vsh lc vsh w w a vsh a vsh a a sh s lc a r t Lh t r t La t r t w t vLh t r t w t vLa t g t u t b u t u t u t n t r t g t a w t vSh t u t b t u t a r t u t u t n t a r t u t t b                                                                                                                                    2 3 3 3 3 4 4 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 sh a sh a w a a a a vs vsa lc vsa w w a vsa a vsa a a s sa lc a sa a sa a t Sh t u t a r t u t g t u t b u t u t u t n t r t g t a w t vSa t u t b t u t a r t u t u t n t a r t u t b t u t a r t u t                                                               1Sa t                                                                           1 2 3 4 1 2 3 4 1 2 3 4 2 3 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 w lc a n op sc vsf a c a f a w w wa a A t w t vA t Rc t r t Lc t u t N t OP t r t Sc t w t r t vSf t c c c c t cc cc cc cc u t t cf cf cf cf u t w t t u t d Seas t d Seas t b u t a w t vSh t b u t                                                                         2 3 3 4 4 , 1 1 1 1 1 a a aw u t a Sh t b u t a w t vSa t b u t a Sa t                 where         1 1 w w w w w t w t g t w t     . In fact, the expression for profitability is a weighted combination of interest rates, and the weights are determined, among other things, by the structure of bank assets and liabilities in the previous period, their durations, as well as the interest rate and other exogenous variables. Finally, one more property of the system under consideration should be noted. With a special selection of parameters, the equation for ( )t can be simplified due to the fact that some combinations of exogenous variables with the corresponding coefficients in total are zero. Therefore, to simplify the calculations carried out further, it is assumed that 58 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) 8 1 1i i с   , 8 1 1i i сc   , 8 1 1i i сf   . It should be noted that all the analytical transformations described above are performed via the ECOMOD support system developed under the guidance of I. Pospelov [16]. It allows to check the information links of the model, correctness of the balances, and the dimensions. It also automatically writes down the sufficient optimality conditions in the Lagrange form. 3. NUMERICAL RESULTS As in the accompanying paper [10], the main source of statistical data is the Form 101 (turnover sheet) published by the Bank of Russia on a monthly basis starting from January 2004. To estimate this version of the model, this data on the period from January 2010 to November 2018 is used. The principles of aggregation of the Form 101 accounts into the model variables, as well as calculations of the interest and duration rates are described in [10]. To estimate the parameters of the model, the same multistep forecasting methodology described in the accompanying paper [10] is applied. To put it simple, the parameters such that the model produces the most accurate forecasts for up to six months ahead from the current point are found. In other words, the error function is the sum of squared relative errors of forecasts for 1, 2, …, 6 months calculated for every moment from 0 to T-1. Using Monte-Carlo method, a stable vector of parameters in a sense that algorithm (we use lsqnonlin command from MATLAB’s computing environment Optimization package) converges to it from different regions is found. Of course, the uniqueness of solution of this error minimization problem cannot be guaranteed, but another set of parameters with comparable accuracy of forecasts during rather extensive computations was not found. The average forecast errors of the model variables in per cents for a given length of forecasts are summarized in th e following table: Table 3.1. Forecast errors Length of forecasts, months 1 2 3 4 5 6 Mean La 1.1 1.5 1.7 1.9 2.3 2.5 1.8 Sa 2.7 3.6 4.7 5.2 5.9 6.9 4.8 vLa 2.0 2.7 3.3 4.0 4.8 5.4 3.7 vSa 3.0 4.5 5.5 6.1 6.8 7.5 5.6 Lh 1.7 2.2 2.7 3.3 3.5 3.9 2.9 Sh 1.4 2.0 2.4 2.8 3.2 3.7 2.6 vLh 1.6 2.1 2.6 3.3 3.6 4.0 2.9 vSh 1.9 2.7 3.2 3.2 3.3 3.6 3.0 A 5.5 5.4 5.8 6.0 6.2 6.1 5.8 Rc 0.0 0.3 0.5 0.6 0.7 0.8 0.5 vA 12.7 12.4 12.0 11.3 11.2 11.1 11.8 Lc 92.4 87.3 85.3 82.5 88.6 110.2 91.0 The “Mean” column contains average forecast errors for different forecasts lengths. As can be seen, the model successfully replicates the dynamics of all the model variables, THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 59 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) except for Lc. The forecast quality of Lc is poor because this variable is rather small in the forecasting region – under current economic conditions banks do not have extra funds to store them in the Central Bank. Instead they prefer to use them in more profitable ways. Nevertheless, we cannot ignore this variable, because the model is oriented on the analysis of banking system reaction on external influences. In the last 15 years the need of the banking system for this instrument was observed several times. The forecast accuracy presented in the Table 1 is comparable (and for some variables outperforms) the models of the same type and also econometric models, see [3]. The presented version of the model contains, apart from the common variables such as volumes of loans and deposits, several variables related to capital adequacy ratio. The variables of this type are bank capital itself, “other liabilities” and bank deposits in the Central Bank. From the technical point of view, capital adequacy requirement complicates our model significantly, because it contains almost all model variables. However, the transformation method we applied allows us to find the analytic solution which contains the explicit formula for ( )t . We think this relation, together with a set of extra coefficients describing the connection between continuous and discrete time scales, allows us to preserve the forecasting quality of the model despite the fact it became significantly more complicated. The sensitivity analysis of the obtained set of parameters was performed with plausible results. First, the parameters of the model were reevaluated for several shorter time intervals and remained almost the same. This fact confirms the assumption that the model with the found set of parameters describes long-term relationships between the variables. Second, the variables of the model were recalculated for a slightly distorted version of the parameters found and remained almost the same. This fact confirms the stability of the model, making it applicable for policy analysis and forecasting. The following Figures 1-6 show an example of the model forecasting. The forecast is calculated from December 2017 for the next six months. Figure 1. Liquid funds in rubles (A), trillion rubles Figure 2. Liquid funds in foreign currency (vA), trillion dollars 0 0,5 1 1,5 2 2,5 3 3,5 2 4 6 8 10 12 2 4 6 2017 2018 Statistical data December 2017 Forecast 0 0,005 0,01 0,015 0,02 0,025 0,03 0,035 0,04 0,045 2 4 6 8 10 12 2 4 6 2017 2018 Statistical data December 2017 Forecast 60 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) Figure 3. Firm loans in rubles (La), trillion rubles Figure 4. Household loans in rubles (Lh), trillion rubles Figure 5. Firm deposits in rubles (Sa), trillion rubles Figure 6. Household deposits in rubles (Sh), trillion rubles 4. CONCLUSIONS The model presented in this paper is based on the new transformation techniques of solutions of optimal control problems with inequality constraints. These techniques include the turnpike property-based approximation of differential equations for the dual variables, the special method of transformation of continuous time equations to their discrete analogues, the relaxation of complementary slackness conditions. This model can be used by policymakers for measuring the effects of regulation policies such as changes of key interest rate, deposits of Central Bank in the banking system or reserve requirements, and by the market participants as well. The proposed model successfully replicates the dynamics of 11 variables which describe the main indicators of the banking system (with 12 endogenous variables in the model in total). For comparison, the benchmark DSGE model of the US economy described in [3] replicates 7 variables, and the model described in [18] replicates 10 variables. More advanced model of the Czech economy contains 28 endogenous variables in the version of the model described in [19]. Further extension of the presented work can 0 5 10 15 20 25 30 35 40 2 4 6 8 10 12 2 4 6 2017 2018 Statistical data December 2017 Forecast 0 2 4 6 8 10 12 14 16 2 4 6 8 10 12 2 4 6 2017 2018 Statistical data December 2017 Forecast 0 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 2 4 6 2017 2018 Statistical data December 2017 Forecast 0 2 4 6 8 10 12 14 16 18 20 2 4 6 8 10 12 2 4 6 2017 2018 Statistical data December 2017 Forecast THE RELAXATION OF COMPLEMENTARY SLACKNESS CONDITIONS 61 Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) include the analysis of the applicability of the proposed approach to a wider class of optimal control problems and the development of more general-purpose approach. For example, presented approach can be used in modelling of other macroeconomic agents such as consumer, producer, trader, and in the development of general equilibrium models composed of the agents of this kind. Further development of the presented banking system model (more detailed description of its structure with appropriate increase of number of variables) also seems promising. ACKNOWLEDGEMENTS The reported study was funded by RFBR according to the research project № 18-31- 00353. REFERENCES [1] Judd, K.L. & Guu, S.M. (1997). Asymptotic methods for aggregate growth models. J. Econ. Dyn. Con. 21 (6), 1025–1042. https://doi.org/10.1016/S0165- 1889(97)00015-8 [2] Pilnik, N., Radionov, S. & Yazykov, A. (2018). Model optimalnogo povedeniya sovremennoy rossiyskoy bankovskoy sistemy [The optimal behavior model of the modern Russian banking system]. HSE Econ J, 22 (4), 418-447, [in Russian]. http://doi.org/10.17323/1813-8691-2018-22-3-418-447 [3] Smets, F. & Wouters, R. (2003). An Estimated Dynamic Stochastic General Equilibrium Model of the Euro Area. J. Eur. Econ. Ass. 1 (5), 1123–1175. https://doi.org/10.1162/154247603770383415 [4] Christiano, L.J., Eichenbaum M. & Evans C.L. (2005). Nominal Rigidities and the Dynamic Effects of a Shock to Monetary Policy, J. Polit. Econ, 113 (1), 1–45. https://doi.org/10.1086/426038 [5] Fernández-Villaverde, J. & Rubio-Ramírez, J. (2006). Solving DSGE models with perturbation methods and a change of variables. J. Econ. Dyn. Con. 30 (12), 2509–2531. https://doi.org/10.1016/j.jedc.2005.07.009 [6] Foerster, A., Rubio-Ramírez, J., Waggoner, D. & Zha, T. (2016). Perturbation methods for Markov-switching dynamic stochastic general equilibrium models. Quant. Econ. 7 (2), 637–669. https://doi.org/10.3982/QE596 [7] Benhabib, J., Schmitt-Grohé, S. & Uribe M. (2001), The Perils of Taylor Rules, J. Econ. T. 96 (1-2), 40–69. https://doi.org/10.1006/jeth.1999.2585 [8] A. Binning. (2013). Solving Second and Third-Order Approximations to DSGE Models: A Recursive Sylvester Equation Solution, Norges Bank Working Paper, 18. [9] Mutschler, F. (2018). Higher-order statistics for DSGE models. Econ. and Stat. 6, 44–56. https://doi.org/10.1016/j.ecosta.2016.10.005 [10] Pilnik, N., Radionov, S. & Yazykov, A. (2018). The model of the Russian banking system with indicators nominated in rubles and in foreign currency, Optimization and Applications 9th International Conference, OPTIMA 2018, Petrovac, Montenegro, October 1–5, 2018, Revised Selected Papers, 2019, Springer, Heidelberg, Germany. https://doi.org/10.1007/978-3-030-10934-9_30 [11] Andreyev, M., Pilnik, N. & Pospelov, I. (2009) Modelirovanie deyatelnosti sovremennoy rossiyskoy bankoskoy sistemy [The modelling of Russian banking system activity]. HSE Econ. J, 13 (2), 143–171, [in Russian]. [12] Andreyev, M., Pilnik, N. & Pospelov, I. (2009) Silniy magistralny effekt v modeli ratsionalnykh ozhidaniy sovremennoy bankovskoy sistemy Rossii [The strong turnpike https://doi.org/10.1016/S0165-1889(97)00015-8 https://doi.org/10.1016/S0165-1889(97)00015-8 http://doi.org/10.17323/1813-8691-2018-22-3-418-447 https://doi.org/10.1162/154247603770383415 https://doi.org/10.1162/154247603770383415 https://doi.org/10.1016/j.jedc.2005.07.009 https://doi.org/10.3982/QE596 https://doi.org/10.1006/jeth.1999.2585 https://doi.org/10.1016/j.ecosta.2016.10.005 https://doi.org/10.1007/978-3-030-10934-9_30 62 N. PILNIK, I. POSPELOV, S. RADIONOV Copyright ©2019 ASSA Adv. in Systems Science and Appl. (2019) property in the rational expectations model of the modern Russian banking system], J. New Econ. Assoc, 1 (2), 70–84, [in Russian]. [13] Pilnik, N., & Radionov, S. (2017). O novykh podkhodah k identifikacii blokov modeley obshego ravnovesiya [On the new approaches to the identification of the blocks of general equilibrium models]. MIPT Proc. 9 (3), 151–160, [in Russian]. [14] Sundaram, R. (1996). A First Course in Optimization Theory. Cambridge University Press. [15] Mishchenko, E., & Rozov, N. (1975) Differencialnie uravneniya s malim paramaetrom I relaksacionnie kolebaniya [Differential equations with small parameter and relaxation oscillations], Science, Moscow, USSR. [in Russian]. [16] Andreyev, M., Pilnik, N., Pospelov, I., Pospelova I. & Khokhlov M. (2007) Technologiya modelirovaniya ekonomiki i model sovremennoy ekonomiki Rossii [The technology of economic modelling and the model of the modern Russian economy], MIFI, Moscow, Russia. [in Russian]. [17] Vasilyev S., Pilnik N. & Radionov S. (in print). The relaxation of complementary slackness conditions in dynamic general equilibrium models, Math. Mod. Comp. Simul. [18] Smets, F. & Wouters, R. (2007). Shocks and Frictions in US Business Cycles: A Bayesian DSGE Approach, Amer. Econ. Rev. 97 (3), 586–608. https://doi.org/10.1007/978-3-030-10934-9_30 [19] Stork Z. (2011). A DSGE model of the Czech economy: A Ministry of Finance approach, EcoMod 3007. https://doi.org/10.1007/978-3-030-10934-9_30