{'fraction_non_alphanumeric': 0.03728842832469775, 'fraction_numerical': 0.017150259067357513, 'mean_word_length': 4.213018816962276, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimization problem for a portfolio with an illiquid asset: Lie group analysis

Management of a portfolio that includes an illiquid asset is an important problem of modern mathematical finance. One of the ways to model illiquidity among others is to build an optimization problem and assume that one of the assets in a portfolio can not be sold until a certain finite, infinite or random moment of time. This approach arises a certain amount of models that are actively studied at the moment. Working in the Merton's optimal consumption framework with continuous time we consider an optimization problem for a portfolio with an illiquid, a risky and a risk-free asset. Our goal in this paper is to carry out a complete Lie group analysis of PDEs describing value function and investment and consumption strategies for a portfolio with an illiquid asset that is sold in an exogenous random moment of time with a prescribed liquidation time distribution. The problem of such type leads to three dimensional nonlinear Hamilton-Jacobi-Bellman (HJB) equations. Such equations are not only tedious for analytical methods but are also quite challenging form a numeric point of view. To reduce the three-dimensional problem to a two-dimensional one or even to an ODE one usually uses some substitutions, yet the methods used to find such substitutions are rarely discussed by the authors. We find the admitted Lie algebra for a broad class of liquidation time distributions in cases of HARA and log utility functions and formulate corresponding theorems for all these cases. We use found Lie algebras to obtain reductions of the studied equations. Several of similar substitutions were used in other papers before whereas others are new to our knowledge. This method gives us the possibility to provide a complete set of non-equivalent substitutions and reduced equations.


Introduction
Study of optimization problems with an illiquid asset leads to three dimensional nonlinear Hamilton-Jacobi-Bellman (HJB) equations. Such equations are not only tedious for analytical methods but are also quite challenging form a numeric point of view. One of the standard techniques is to find an inner symmetry of the equation and reduce the number of variables at least to two or if possible to one. The problems of lower dimensions are usually better studied and are, therefore, easier to handle.
All papers known to us devoted to three dimensional HJB equations provide variable substitutions without any remark on how to get similar substitution in other cases or why they use this or that substitution. Yet since the famous work of S. Lie [16] it is well known that smooth point transformations with continuous parameter admitted by linear or nonlinear partial differential equations (PDEs) can be found algorithmically using Lie group analysis. The procedure that helps to find a symmetry group admitted by a PDE is well described in many textbooks, for example, we can recommend [20], [13] or [4] to the interested reader. Yet practical application of these procedures is connected with tedious and voluminous calculations which can be only slightly facilitated with the help of modern computer packages. For example, preparing this paper we used the program IntroToSymmetry to obtain the determining system of equations. Solving these determining systems of partial differential equations is usually rather hard and can rarely be done by an algorithm, but the possibility to find the system of determining equations facilitates the work of a researcher since the systems are quite voluminous. For example, in the studied cases the systems had more then a hundred equations.
Once the Lie algebra admitted by the studied PDE is found one can find all non equivalent variable substitutions which reduce the dimension of the given PDE, if there are any. The found Lie algebra admitted by the PDE generates the corresponding symmetry group of this equation. Using the corresponding exponential map of the adjoint representation of the considered Lie algebra we can find the symmetry group or corresponding subgroups of the equation as well. We do not have to look for an explicit form of the symmetry group to find reductions of the studied PDEs and invariant solutions of the equations. It is enough to know and to use the properties of the symmetry algebra which corresponds to the admitted symmetry group. The optimal system of subalgebras of this algebra gives rise to a complete set of non equivalent substitutions and as a result a set of different reductions of the studied PDE.
The solutions of reduced PDEs are called invariant solutions because they are invariant under the action of a given subgroup. The goal of this paper is to find the admitted Lie algebras for PDEs describing value function and investment and consumption strategies for a portfolio with an illiquid asset that is sold in a random moment of time with a prescribed liquidation time distribution. We find the admitted Lie algebras for a certain class of liquidation time distributions in cases of HARA and log utility functions and formulate corresponding theorems. We provide the optimal system of subalgebras for a general case of a liquidation time distribution in both cases of HARA and logarithmic utility functions. We separately regard a case of an exponential distribution of a liquidation time where the corresponding PDE admits an extended Lie algebra. It leads to certain distinguishing properties that give rise to non trivial reductions of three dimensional PDEs to two dimensional equations and even to ordinary differential equations in some cases. We describe all non equiva-lent substitutions, provide the reductions and the corresponding lower dimensional equations as well as the corresponding allocation-consumption strategies.

Economical setting
In [5], [6] the authors described in detail an optimization problem that corresponds to the following situation: an investor has an illiquid asset that has some paper value and can not be sold till some moment of time that is random with a prescribed distribution. He tries to maximize his average consumption investing into a risky asset that is partly correlated with the illiquid one and into a riskless asset, that has a constant dividend rate.

Formulation of the optimization problem
The investor's portfolio includes a riskless bond B t , a risky asset S t and a non-traded asset H t that generates stochastic income, i.e., dividends or costs of maintaining the asset. The liquidation time of the portfolio T is a randomly-distributed continuous variable. The risk-free bank account B t , with the interest rate r, follows dB t = rB t dt, t ≤ T, (2.1) where r is constant. The stock price S t follows the geometrical Brownian motion dS t = S t (α dt + σ dW 1 ), t ≤ T, (2.2) with the continuously compounded rate of return α > r and the standard deviation σ . The lower case index t denotes the spot value of the asset at the moment t. The illiquid asset H t , that can not be traded up to the time T and its paper value is correlated with the stock price and is governed by as it was shown in [6], where µ is the expected rate of return of the risky illiquid asset, (W 1 ,W 2 ) are two independent standard Brownian motions, δ is the rate of dividend paid by the illiquid asset, η is the standard deviation of the rate of return, and ρ ∈ (−1, 1) is the correlation coefficient between the stock index and the illiquid risky asset. The parameters µ, δ , η, ρ are all assumed to be constant.
The stochastically distributed time T is an exogenous time and it does not depend on the Brownian motions (W 1 ,W 2 ). The probability density function of the T distribution is denoted by φ (t), whereas Φ(t) denotes the cumulative distribution function, and Φ(t), the survival function, also known as a reliability function, Φ(t) = 1 − Φ(t).
We omit here the explicit notion of the possible parameters of the distribution in order to make the formulas shorter.
We assume that the investor consumes at rate c(t) from the liquid wealth and the allocation-consumption plan (π, c) consists of the allocation of the portfolio with the cash amount π = π(t) invested in stocks, the consumption stream c = c(t) and the rest of the capital kept in bonds. Further on we sometimes omit the dependence on t in some of the equations for the sake of clarity of the formulas. The consumption stream c is admissible if and only if it is positive and there exists a strategy that finances it. All the income is derived from the capital gains and the investor must be solvent. In other words, the liquid wealth process L t must cover the consumption stream. The wealth process L t is the sum of cash holdings in bonds, stocks and random dividends from the non-traded asset minus the consumption stream, i.e. it must satisfy the balance equation The investor wants to maximize the overall utility consumed up to the random time of liquidation T , given by It means we work with the problem (2.4) that corresponds to the value function V (l, h,t), which is defined as where l could be regarded as an initial capital and h as a paper value of the illiquid asset. The value function V (l, h,t) satisfies the Hamilton-Jacobi-Bellman (HJB) equation for the value function, in terms of l, h and t with the boundary condition (2.9) In [5] and [6] the authors have already demonstrated that the formulated problem has a unique solution under certain conditions. Namely, 1. U(c) is strictly increasing, concave and twice differentiable in c, In this paper we restrict ourselves specifically to the cases of HARA and logarithmic utility that satisfy three first conditions by definition. We also assume by default that other parameters of the problem are chosen to satisfy all the conditions above and therefore the the existence and uniqueness of the solution are guaranteed.

Similar problems described in the literature
There are a lot of works in the framework of optimization that work with the problems that correspond to the HJB equations that look very similar to (2.6). Almost always the authors that work with this kind of models use certain reductions of the PDE they work with. This reductions are hardly ever explained in the literature and are usually presented to the reader without any formal derivation, yet are crucial for further analysis of the problem. Before carrying out a Lie-group analysis of the problem that we have formulated in the Section 2, let us briefly describe the works where the authors are using lie-type reductions similar to the ones that we obtain further in this paper.
In [9] the authors formulate the problem of optimal investment with undiversifiable income risk. This problem is also an optimization problem for a portfolio of three-assets, one of which is riskless, one is risky classical stock and the third one corresponds to the nonnegative stochastic income. The problem is regarded under an infinite time horizon, so the studied equation is two-dimensional. In [10] the authors regard the same problem with infinite time horizon and a specific HARA-utility. The authors use a substitution u(x, y) = y γ u(x/y), where u is a value function and x and y are two space variables. We can see the origin of this substitution further in (4.42). The same substitution without the reasoning behind it is used in [25] for the problem with finite time horizon. The substitution is reducing a three-dimensional problem to a two-dimensional one.
The authors in [23] regard a problem very similar to the one described in Section 2. They also work with a three-asset portfolio, where one asset is illiquid an is sold in a predetermined moment of time. The main difference between our approach and [23] is that we work with an exogenous randomly distributed liquidation time. And again the authors in [23] use a reduction V (l, h,t) = h 1−γ V (z,t) but do not comment on how did the obtain this substitution. 3 Lie-group analyses of the problem with a general liquidation time distribution and different utility functions After a formal maximization of (2.7) and (2.8) for the chosen utility function the equation (2.6) becomes a three dimensional non-linear PDE (for all the details see [5] and [6]). As we have already said in this paper we regard two different utility functions and now we look at the cases of HARA utility and log utility separately.

The case of HARA utility function
It is well know that a utility function U(c) where the risk tolerance R(c) is defined as and is a linear function of c, is called a HARA (hyperbolic absolute risk aversion) utility function. In this paper we use two types of utility functions: a HARA utility function U HARA (c) and the log-utility function U LOG (c) = log(c). Let us note here that the log-utility function is often regarded as a limit case of HARA utility function. One can indeed choose HARA utility in such a way that allows a formal transition from HARA utility to log-utility as parameter γ of HARA utility goes to zero, but in general this transition does not hold for any form of HARA utility. We will demonstrate this transition on different levels and because of that further in this paper we work with HARA utility in the form with the risk tolerance T (c) = c 1−γ , 0 < γ < 1. One can easily see that as γ → 0 HARA-utility function written as (3.10) tends the to log-utility The HJB equation (2.6) where we insert the HARA utility in the form (3.10) after formal maximization procedure (see also [6]) will take the form Here the investment π(t, l, h) and consumption c(t, l, h) look as follows in terms of the value function V (3.14) Equation (3.12) is a nonlinear three dimensional PDE with three independent variables t, h, l. To reduce the dimension of the equation (3.12) we use Lie group analysis, that allows us to find the generators of the corresponding symmetry algebra admitted by this equation. In detail one can find the description of this method applied to similar PDEs in [4]. Here we formulate the main theorem of Lie group analysis for the optimization problem with HARA type utility function.  with an additional generator 16) i.e. L HARA 4 =< U 1 , U 2 , U 3 , U 4 >. Except finite dimensional Lie algebras (3.15) and (3.16) correspondingly equation (3.12) admits also an infinite dimensional algebra L ∞ =< ψ(h,t) ∂ ∂V > where the function ψ(h,t) is any solution of the linear PDE The Lie algebra L HARA 3 has the following non-zero commutator relations The Lie algebra L HARA 4 has the following non-zero commutator relations Remark 3.1 The found Lie algebra describes the symmetry property of the equation (3.12) for any function Φ(t). In [5], [6] we have proved the theorem for existence and uniqueness of the solution of HJB equation for a liquidation time distribution which Φ(t) ∼ e −κt or faster as t → ∞, therefore we will regard this type of the distribution studying the analytical properties of the equation further on.
Prof 3.1 As in [4] we introduce the second jet bundle j (2) and present the equation as a function of these variables in the jet bundle j (2) . We look for generators of the admitted Lie algebra in the form where the functions ξ 1 , ξ 2 , ξ 3 , η 1 can be found using the over determined system of determining equations where U (2) is the second prolongation of U in j (2) . We look at the action of U (2) on ∆(l, h,t,V,V l ,V h ,V t ,V ll ,V ll ,V lh ,V hh ) on its solution subvariety ∆ = 0 and obtain an overdetermined system of PDEs on the functions ξ 1 , ξ 2 , ξ 3 and η 1 from (3.20). This system has 137 PDEs on the functions ξ 1 , ξ 2 , ξ 3 , η 1 . The most of them are trivial and lead to following conditions on the functions This basically means that the unknown functions have the following structure ξ 1 (l, h,t,V ) = a 1 (t)l + a 2 (t), ξ 2 (l, h,t,V ) = ξ 2 (h,t), ξ 3 (l, h,t,V ) = ξ 3 (t), Here a 1 (t) and d 1 (h,t) are some functions which will be defined later. To find the unknown functions a 1 (t), a 2 (t), ξ 2 (h,t), d 1 (h,t), d 2 (h,t) we should have a closer look on the non-trivial equations of the obtained system, that are left. After all simplifications we get the system of seven PDEs and ξ 1 , ξ 2 , ξ 3 = const and η 1 satisfy (3.22). Using (3.22) we obtain a simplified system. Solving the system for an arbitrary function Φ(t) we obtain (3.26) The equations (3.26) contain three arbitrary constants a 2 , b 1 , d 2 and a function d 1 (h,t) which is an arbitrary solution of Ld 1 (h,t) = 0. Formulas (3.26) define three generators of finite dimensional Lie algebra L HARA 3 (3.15) and an infinitely dimensional algebra L ∞ as it was described in Theorem 3.1.
If we assume that in the equations (3.24) and (3.25) the expression Φ t Φ = const, i.e. the liquidation time is exponentially distributed we additionally obtain the fourth symmetry (3.16). It is a unique case when Lie algebra L HARA 3 has any extensions.

The case of the log-utility function
A logarithmic utility function is very close to the HARA-function, moreover it could be regarded as a limit case of HARA-utility (3.11).Yet certain properties of the logarithm make this particular case rather popular therefore we analyze it separately.
The whole approach is very similar to the method described in Section 3.1 therefore we omit some details here. In the case of the log-utility function the HJB equation after the formal maximization procedure will take the following form Here the investment π(t, l, h) and consumption c(t, l, h) look as follows in terms of the value function V .
Remark 3.2 We choose the form of HARA-utility in such a way that (3.11) holds. Now we see that the maximization procedure that transforms HJB equation to PDE preserves this property as well. If we formally take a limit of (3.12) as γ → 0 we obtain (3.27).
As it turns out analogously to the previous chapter one can formulate the main theorem of Lie group analysis for this PDE.  with an additional generator The Lie algebra L LOG 3 has one non-zero commutator relation [U 2 , U 3 ] = U 2 . The Lie algebra L LOG 4 has the following non-zero commutator relations  (3.16) and (3.31), we can see that the formal limit procedure holds for them as well and the generators for HARA-utility transfer to generators for log-utility under a formal limit γ → 0.
Prof 3.2 Acting analogously to the proof of the Theorem 3.2 we look for the generators of the admitted Lie algebra in the form (3.20). A corresponding determining system obtained analogously to (3.21) has 130 equations on the functions ξ 1 , ξ 2 , ξ 3 and η 1 . The most of these equation are trivial and we can easily solve them. This way we obtain where b 1 is a constant and d 1 (h,t) is a function to be determined. The remaining equations can be rewritten as (3.33). Inserting these functions ξ 1 , ξ 2 , ξ 3 and η 1 into (3.34) we obtain a simplified system of determining equations.
Solving the system for an arbitrary Φ(t) we obtain the following solution (3.35) If and only if the expression Φ (t) Φ(t) is a constant further denoted as κ the solution of the overdetermined system (3.34) is as follows (3.37) It means that just for the special exponential form of Φ(t) we obtain an extension of the Lie algebra L LOG

Reductions in the general case with HARA-utility function
In this chapter we discuss the complete set of possible reductions of three dimensional PDEs (3.12) arising in the case of HARA-utility function. In the previous chapter we have seen that some of the generators of the admitted Lie algebras L HARA 3,4 described in Theorem 3.1 and L LOG 3,4 as presented in Theorem 3.2 coincide in all studied cases. Let us now briefly discuss the mathematical and economic meaning of these generators.
The first generator U 1 = ∂ ∂V means that the original value function V (l, h,t), solution of (3.12) for HARA utility or (3.27) for log utility correspondingly, can be shifted on any constant and still be a solution of the main equation. Neither allocation π or consumption function c will change their values, because the also depend only on the derivatives of the value functions (3.13), (3.14). In some sense it is a trivial symmetry, since the equation (3.12) contains just the derivatives of V (l, h,t) we certainly can add a constant to this function and it sill will be a solution of the equation. This symmetry does not give a rise to any reductions of the studied three dimensional PDEs.
The second generator U 2 = e rt ∂ ∂ l means that the value of the independent variable l can be shifted on the arbitrary value ae rt , i.e. the shift l → l + ae rt , a − const. leaves the solution unaltered. From economical point of view it means that we can arbitrary shift the initial liquidity on a bank account a, a > 0 or credit a, a < 0. The value function V (l, h,t) and the allocation-consumption strategy (π, c) will be unaltered, see (3.12) or (3.27). This symmetry is also trivial since it does not give any reductions of the original three dimensional PDEs.
Furthermore we also get an infinitely-dimensional algebra 0 has a very interesting meaning. We can add any solution ψ(h,t) of this equation to the value function V (l, h,t) without any changes of the allocationconsumption strategy (π, c). In economical sense it means that the additional use of some financial instrument which is the solution of ψ t (h,t) a financial instrument which value is defined just by the paper value of the illiquid asset and time, can not change the allocation-consumption strategy (π, c). Now we are going to discuss the possible reductions of the three dimensional PDE (3.12) arising in the case of the HARA utility in detail.

Reductions in the case of general liquidation time distribution and HARA utility
In order to describe all non-equivalent invariant solutions to (3.12) we need to find an optimal system of subalgebras for the admitted Lie algebra (3.15) described by Theorem 3.1. Let us at first remind you how does our problem look in a general case Here the investment π(t, l, h) and consumption c(t, l, h) look as in (3.13) and (3.14). The Lie algebra admitted by this PDE is described in Theorem 3.1 and is three-or four-dimensional depending on the properties of the function Φ(t). The classification of all real three-and four-dimensional solvable Lie algebras is given in [22]. The authors provide optimal systems of subalgebras for every real solvable three-and four-dimensional Lie-algebra. In this Section we study a three-dimensional case.
In order to have a consistency with this classification we change a basis of the corresponding algebra to a suitable one for every Lie algebras described above. One can also use the software package SymboLie [19] (a supplement package for Mathematica) to find an optimal system of subalgebras for a given Lie algebra directly, but we prefer to use the classification and notation provided in [22] for the sake of consistency.
The reductions can be obtained if we replace original variables with new independent and dependent variables which are invariant under the action of the Lie group or subgroup of this Lie group admitted by the equation. In this section we will list all non-equivalent reductions and provide all possible reduced equations.
First of all we should introduce the notations that we use further. We denote by h i the subalgebras of the Lie algebra L HARA

System of optimal subalgebras
At firs let us reassign the basis of L HARA 3 to adopt the real three-dimensional Lie algebra L HARA 3 to the classification obtained in [22] in the following way U 1 = e 2 , U 2 = e 1 , U 3 = e 3 . The basis is now defined as This basis has two non zero commutation relations which are given now in the following form (4.40) Now we can see that L HARA 3 = e 1 , e 2 , e 3 corresponds to A γ 3,5 , where 0 < γ < 1, in the classification of [22]. The system of optimal subalgebras for this algebra is listed in Table 1.

Dimension of
System of optimal subalgebras of the Lie algebra L HARA presented in (3.15).
The optimal system of one-and two-parameter subalgebras give rise to the system of one or two dimensional symmetry subgroups H i of the studied PDE. Our goal now is to find all possible corresponding reductions and to describe the solutions which are invariant under the action of the group H i .

and corresponding reductions
Let us look closer at all one dimensional subalgebras listed in Table 1. If we try to reduce the tree dimensional PDE to a two dimensional one, then such reduction can be provided by one of the corresponding one dimensional subgroups if at all.
L HARA 3 has four one-dimensional subalgebras h i which give rise to four one parameter subgroups H i . Our goal is to study the corresponding invariant solutions. Not every subgroup out of all listed in Table 1 provides a nontrivial reduction of the original PDE, but if a non-trivial reduction of Lie-type exists, then it can be found out through a suitable subalgebra listed in Table 1. We have already discussed the meaning of h 1 and h 2 above in Section 4.1. These two cases do not give us any reductions, as we have already discussed these two cases in the beginning go this section. Let us start with the next case.
Case Table 1 we denote the subalgebra that is spanned by the generator H 3 denotes a corresponding subgroup. To find the invariants of H 3 we solve a characteristic system of the equations where the first equation of the system is a formal notation that shows that independent variable t is actually an invariant of the equation under the action of H 3 . We can obtain two other independent invariants solving the system above These invariants (4.41) can be used as new independent variables t, z and the invariant (4.42) as the dependent variable W (t, z) to reduce the three dimensional PDE (4.38) to a two dimensional one After this reduction the allocation π(t, z, h) and consumption c(t, z, h) strategies (3.13) and (3.14) look as follows Case H 4 (h 4 ). This subalgebra H 4 is spanned by the generator e rt ∂ ∂ l ± ∂ ∂V . We can write a characteristic system for this case We can see from this system that two independent variables t and h are invariants. The third invariant is W (t, h) = V (l, h,t) ∓ e −rt l. This means that in this case the value function has the form V = W (t, h) ± e −rt l. This essentially means that V in this case is a linear function of l. From [6] and [5] we know that the value function described by (2.5) should be concave in l, so this case is not interesting for our problem from the economical point of view. Since though H 4 gives us a reduction of the equation (3.12) the corresponding value function does not satisfy the conditions sufficient for a solution of (2.5) in the class of l-concave functions. The two-dimensional subalgebras of L HARA 3 do not give us any meaningful substitutions, what would be able to reduce the problem to an ODE. This means that if we deal with a HARA utility function and a general form of the liquidation time distribution we have just one possibility to reduce the tree dimensional PDE (4.38) to a two dimensional one (4.43) using the substitution (4.41)-(4.42). Any further reductions in the framework of Lie group analysis are not possible. It does not mean that any other simplifications of the PDE are not possible, but we do not have an algorithmic way to obtain it. At the same time it is important to note that if we study such problem we can for sure apply numeric or quantitate methods to study the equation (4.43).

A special case of an exponential liquidation time distribution in (3.12)
The exponential liquidation time distribution with the survival function Φ(t) = e −κt is a special case of the problem that deserves our separate attention. We have proven in Theorem 3.1 that in this case and just in this case we obtain an extended four dimensional Lie algebra and can hope to obtain deeper reductions than in the general case. Inserting this special form of Φ(t) into (4.38) we obtain the following equation Here the investment π(t, l, h) and consumption c(t, l, h) look as follows in terms of the value function V Since the non-zero commutators of L HARA 4 depend on the parameters κ, r and γ the inner structure of the Lie algebra L HARA 4 is different for different values of these parameters. If we further use the classification of all solvable real three and four dimensional Lie algebras proposed in [22], we can see that depending on the relations between the parameters of the equation we obtain two different algebraic structures. Using the notation of [22] we see that when κ = rγ then L HARA 4 corresponds to 2A 2 , whereas when κ = rγ then L HARA 4 corresponds to A γ 3,5 A 1 , see [22]. We now look at each of these cases separately.  We can see that L HARA 4 corresponds to 2A 2 or in another common notation A 2 ⊕A 2 , according to the classification [22]. The system of optimal subalgebras for an algebra of this type is listed in Table 2.

Dimension of
System of optimal subalgebras of algebra L HARA  for κ = rγ.
We use this optimal system of subalgebras to obtain all non equivalent reductions and list them in the next section. in the case κ = rγ has ten one-dimensional subalgebras listed in Table 2, but by far not all of them can provide meaningful reductions of (4.47). Before we start a step-by-step discussion regarding each subalgebra in the optimal system of subalgebras listed in Table 2 we should remind the reader that we have already discussed two of them before. In Section 4.1.2 we have already shown that subalgebras h 1 = ∂ ∂V and h 3 = e rt ∂ ∂ l and h 6 = ∂ ∂V ± e rt ∂ ∂ l describe important invariant properties of the equation (4.47) but they do not provide any new meaningful reductions. Now we are going to regard other subalgebras in detail.
Case H 2 (h 2 ). This subalgebra is spanned by a generator (4.51) As in the case L HARA 3 we can find invariants of the corresponding subgroup H 4 solving the characteristic system Out of the characteristic system we find the following invariants (4.53) Substituting these new independent variables z and τ and a new dependent variable W (z, τ) into (3.12) we obtain a two-dimensional equation Here the investment π(z, τ, h) and consumption c(z, τ, h) look as follows in terms of the function W Case H 4 (h 4 ). This sub algebra h 4 is spanned by the generator e 1 = ωe 3 Since parameter ω can have any value due to the interplay of the constants we need to regard three cases separately. First, if ω = r/κ this case is defined by a generator The invariants of the corresponding subgroup H 4 for this case are as follows (4.59) Using two invariants (4.58) as the new independent variables and (4.59) as the dependent variable in (4.47) we obtain a two dimensional PDE The second case can be obtained if ω = 1 γ . In this case the algebra h 4 is spanned by the generator One can find the following invariants of the subgroup H 4 Substituting the invariants z and t (4.63) as independent variables and the invariant W (z,t) (4.64) as the dependent variable into (4.47) we derive the following two dimensional equation Here the investment π(t, z, h) and consumption c(t, z, h) look as follows in terms of the function W Before we move on, we need to point out two facts about this substitution. First of all, it directly corresponds to the substitution (4.41) that we have found earlier for a case of general liquidation time distribution. Second notion that we need to make is that an analogous symmetry is used in [23]. The framework of the problem is a bit different, since authors regard a fixed pre-determined liquidation time, yet the substitution they use to reduce a three dimensional PDE to a two dimensional one is very similar. The authors do not carry out a complete analysis of their problem and have to work with an equation of the second order. This makes a problem significantly more complicated, yet in their framework a Lie-type reduction to a one dimensional equation is possible, as it was shown in [5]. The authors in [10] work with the problem of random income in an infinite time set-up, so their problem is two-dimensional by design. They also use a similar substitution to reduce their two dimensional problem to a one dimensional case. Yet it is clear that the substitution they use corresponds to this one. In fact in [5] it is shown how the three-dimensional problem with an illiquid asset corresponds to a two dimensional problem of random income with infinite time horizon. Now, since we have carried out a complete analysis of all Lie-type substitutions we an see which of them were explored in the literature before and give a solid mathematical explanation of this substitutions instead of an educated guess that is most commonly used to simplify the problems of such type These two cases ω = r/κ and ω = 1 γ are special since the generators, that span H 4 , differ significantly form the generator in the most general case (4.57), when ω = r κ , 1 γ .
The invariants in this more general case are as follows As in previous cases we chose the first two invariants as independent variables and the last invariant W (z, τ) defined as (4.69) as a new dependent variable. Substituting these variables into (4.47) we obtain the reduced two dimensional equation Indeed, the condition on V is rewritten as W −→ τ→∞ 0. Here the investment π(z, τ, h) and consumption c(z, τ, h) look as follows in terms of the value function W

(4.72)
Case H 5 (h 5 ). This subalgebra is spanned by the following generator Solving the corresponding characteristic system we find the following invariants of the subgroup H 5 (4.75) Using expressions (4.74) as new independent variables z and τ and (4.75) as a new dependent variable W (x, y) we reduce (4.47) to the two dimensional PDE Here the investment π(x, y, h) and consumption c(x, y, h) look as follows in terms of the value function W . The last one dimensional subalgebra listed in Table 2 is subalgebra h 7 spanned by Solving the characteristic system we find the following invariants of the corresponding subgroup H 7 (4.80) As before to get solutions of (4.47) invariant under the action of H 7 we use the invariants (4.79) as independent variables z, τ and the invariant (4.80) as the dependent variable W (z, τ). This way we reduce equation (4.47) to a two dimensional PDE that looks as follows Here the investment π(z, τ, h) and consumption c(z, τ, h) look as follows in terms of the function W We studied in detail all seven one dimensional subalgebras from optimal system of subalgebras which can describe non equivalent invariant solutions of (4.38) in the case κ = rγ. We demonstrated that only in four cases meaningful reductions to a two dimensional PDEs are possible.

4
As we studied one dimensional subalgebras we obtained the invariant solutions which are unaltered under the action of a one parameter group generated by one dimensional subalgebras from the system of optimal subalgebras. Now we are going to find all non equivalent invariant solutions which are invariant under actions of two parameter subalgebras. This gives us a possibility to reduce a three dimensional PDE to an ODE.
In this section we go further and looking at the second row of the Table 2 find the deeper reductions that can reduce PDE (4.38) to an ordinary differential equation.
Case H 8 (h 8 ). The first two dimensional sub algebra listed in Table 2 is subalgebra h 8 =< e 1 , e 3 > spanned by two generator defined as follows The two dimensional subalgebra is spanned by two generators and each of them was actually studied before. We should find a simultaneous solution to both characteristic systems. We can use our previous knowledge and reformulate one of the characteristic systems in terms of invariant variables of the other one. This could be done in the following way. We have found a general form of the invariants of e 1 in case H 2 (h 2 ) (4.52), (4.53). Let us list them here again for the convenience of the reader If we rewrite the second generator of the subalgebra h 8 in terms of these three invariants z, τ and W as new independent and dependent variables correspondingly, we obtain Solving a corresponding characteristic system dτ This way we obtain an invariant solution under the action of two parameter subgroup H 8 . It means that we can take Y (z) as a new dependent variable in (4.54) and z as a new independent one. Substituting these invariants into PDE (4.54) we obtain a new ODE Naturally, the investment π(z, τ, h) and consumption c(z, τ, h) in terms of Y (z) look now as follows In terms of original variables l, h,t and V the substitution looks as follows It also means that if we obtain a solution Y (z) for (5.164) we obtain the value function that in terms of original variables looks like and the condition V (l, h,t) −→ t→∞ 0 is satisfied. All other two and three dimensional subalgebras listed in Table 2 do not give a reduction of the original equation (4.38) to an ODE, so we will not regard them in detail. In Section 4.2.2 we worked with the case κ = rγ now we study the special case κ = rγ. When κ = rγ as we have mentioned above L HARA 4 has a different structure according to the classification [22]. We substitute now κ = rγ into (4.47) and regard the following equation Here the investment π(t, l, h) and consumption c(t, l, h) look as follows in terms of the value function V (t, l, h) In this case we transform the old basis of L HARA 4 =< U 1 , U 2 , U 3 , U 4 > described in (3.15) and (3.16) into the following one where we use the relation κ = rγ. Now the new basis looks like this e 1 = e rt ∂ ∂ l (4.93) A 1 , in the notation of [22]. The system of optimal subalgebras for this algebra is listed in Table 3.  , if κ = rγ, where ω is a parameter such that −∞ < ω < ∞.

4
We use now the Table 3 to list all non equivalent possible reductions of the three dimensional PDE (4.90) in the the case κ = rγ. As we have shown before the first two subgroups H 1 and H 2 , spanned by h 1 = e rt ∂ ∂ l and h 2 = ∂ ∂W correspondingly, provide no meaningful reductions of (4.47) or, correspondingly, (4.90). Let us move on to the next case.
Solving the corresponding characteristic system we find the following invariants of the subgroup H 3 Here the investment π(z, τ, h) and consumption c(z, τ, h) look as follows in terms of the value function W (4.98) Case H 4 (h 4 ). As one can see in the Table 3 this subalgebra is spanned by We find the following invariants solving the characteristic system of equations We use the invariants z and τ (4.101) of H 4 as independent variables and the invariant W (z, τ) (4.102) as the dependent variable. This way we reduce equation (4.90) to a two dimensional PDE that looks as follows Here the investment π(x, y, h) and consumption c(x, y, h) look as follows in terms of the value function W Case H 5 (h 5 ). This subalgebra is spanned by We find the following invariants of the subgroup H 5 Substituting the invariants of H 5 (4.106) as independent variables z, τ and the invariant (4.107) as the dependent variable W (z, τ) into (4.90) we obtain a two dimensional PDE Here the investment π(z, τ, h) and consumption c(z, τ, h) look as follows in terms of the value function W This equation for the new dependent variable W (z, τ) differs from (4.97) only by the term r as well as the corresponding invariant (4.107) differs from (4.96) by the linear term rt.
Case H 6 (h 6 ). This subalgebra is spanned by If ω = 1 that case is equivalent to (4.63) that we have regarded earlier, the only difference is that we need to take into consideration that now κ = rγ. For all the values of ω we find the following invariants of the subgroup H 6 solving the corresponding characteristic system We use the invariants of H 6 (4.111) as independent variables z, τ and the invariant (4.112) as the dependent variable W (z, τ) in (4.90) and obtain a two dimensional equation Here the investment π(z, τ, h) and consumption c(z, τ, h) look as follows in terms of the value function W . This subalgebra is spanned by Let us note here that if ω = 0 this case is equivalent to the case (4.46) under a condition κ = rγ that we have regarded before. If ω = 0 we can find the following invariants of the subgroup H 7 Substituting the invariants of H 7 (4.116) as the independent variables x and y and the invariant (4.117) as the dependent variable W (x, y) into (4.90) we obtain a two dimensional PDE Here the investment π(x, y, h) and consumption c(x, y, h) look as follows in terms of the value function W y). In this section we go further and using Table 3 find the deeper reductions that can reduce PDE (4.90) to an ordinary differential equation. At first let us note that all two dimensional subalgebras listed in Table 2 but for h 11 do not give a reduction of the original equation (4.90) to an ODE, so we will not regard them in detail.
Case H 11 (h 11 ). The first two dimensional sub algebra listed in Table 2 is subalgebra h 11 =< e 3 , e 4 > spanned by two generators defined as follows The two dimensional subalgebra is spanned by two generators. We should find a simultaneous solution to both characteristic systems. We can use our previous knowledge and reformulate one of the characteristic systems in terms of invariant variables of the other one. This could be done in the following way. We have found a general form of the invariants of e 4 in (4.95). Let us list them here again for the convenience of the reader If we rewrite e 3 (4.121) in terms of these three invariants z, τ and W as new independent and dependent variables correspondingly, we obtain Solving a corresponding characteristic system dτ −1 = dW γW we obtain a new invariant inv e 3 = Y (z) = W (z, τ)e γτ . This way we obtain an invariant solution under the action of two parameter subgroup H 11 . It means that we can take Y (z) as a new dependent variable in (4.97) and z as a new independent one. Substituting these invariants into PDE (4.97) we obtain a new ODE Naturally, the investment π(z, τ, h) and consumption c(z, τ, h) in terms of Y (z) look now as follows In terms of original variables l, h,t and V the substitution looks as follows This substitution is equivalent to the substitution (5.167) under the condition κ = rγ. It is also important to note that if we obtain a solution Y (z) for (4.124) we obtain the value function that in terms of original variables looks like and the condition V (l, h,t) −→ t→∞ 0 is satisfied.

Reductions for a general liquidation time distribution and log-utility function
In this chapter we discuss the complete set of possible symmetry reductions of three dimensional PDE (3.27) arising in the case of log-utility function and a general liquidation time distribution. We also regard a special case of an exponentially distributed liquidation time in the Section 5.2. The logarithmic utility could be regarded as a special case of HARA-utility, as we have mentioned earlier (3.11), moreover we see that L HARA

The case of the general liquidation time distribution
Analogously to the previous sections we look for the optimal system of subalgebras for the Lie algebra L LOG 3 (3.30) admitted by the equation (3.27). It is necessary to study an optimal system of Lie subalgebras to be able to describe all non equivalent symmetry reductions and not loose any of them. We present here for a convenience of the reader the main equation Here the investment π(t, l, h) and consumption c(t, l, h) look as follows in terms of the value function V .
We list all symmetry reductions that can reduce the dimension of the problem by one or two and study them closely in the next Section. We demonstrate how the problem (5.127) transforms after every substitution.

and possible invariant reductions
At first let us reassign the basis of L LOG 3 (3.30) so that it is possible to use the classification [22] in a convenient way. This can be done in the following way U 1 = −e 3 , U 2 = e 2 , U 3 = −e 1 . The basis is now defined as The new basis has just one non zero commutation relation Now we can see that L LOG 3 corresponds to A 1 A 2 case, in the notation of [22]. The system of optimal subalgebras is given in Table 4.

and corresponding reduction
Let us now look at one dimensional subalgebras of L LOG 3 one by one to find all non equivalent reductions of (5.127).
Case H 1 (h 1 ). This subalgebra is spanned by the generator Solving a corresponding characteristic system for the invariants of H 1 we obtain independent invariants Indeed the condition V −→ t→∞ 0 holds only for the situation when β = 0. When β = 0, the investment π(z,t, h) and consumption c(z,t, h) look as follows in terms of the value function W Cases H 2 spanned by h 2 = e rt ∂ ∂ l and H 3 (h 3 ) spanned by h 3 = ∂ ∂V were in principle discussed in Section 4.1.2 hence we do not speak about them in detail. We can see that for a general liquidation time distribution we have only one meaningful Lietype reduction of the equation (5.127). This does not mean that the problem can not be simplifies or solved by the means of numeric or quantitive analysis though.

A special case of an exponential liquidation time distribution and log utility function
In Theorem 3.2 we have shown that the case of an exponential liquidation time distribution is a special one and the equation (3.27) admits an extended Lie algebra. There are four Lie-symmetries in this case, describe in (3.30) and (3.31). We would like to pay some special attention to the case of a logarithmic utility since this particular case is broadly regarded in the literature. The equation (5.127) we study in this section now, when we insert Φ(t) = e −κt , looks as follows Here the investment π(t, l, h) and consumption c(t, l, h) look as follows in terms of the value function V . (5.138)

Study of non equivalent reductions with the system of optimal subalgebras
As in previous cases we change the basis of L LOG 4 to use the convenient classification provided in [22]. Let us at first transform the basis as follows Now the generators of the new basis of L 4 =< e 1 , e 2 , e 3 , e 4 > look like this In The system of optimal subalgebras of L LOG 4 is listed in Table 5.

Dimension of
System of optimal subalgebras of algebra L LOG  , where ω is a parameter such that −∞ < ω < ∞.

and related invariant reductions
Now we are going to study all invariant reductions of the problem (5.136). Let us first note that the subgroups H 1 , H 3 and H 6 , spanned by the generators h 1 = ∂ ∂V , h 3 = e rt ∂ ∂ l and h 6 = ∂ ∂V ± e rt ∂ ∂ l correspondingly, do not give us any interesting reductions so we omit the detailed study of these cases here. We start with a first interesting and non-trivial case.
Case H 2 (h 2 ). The sub algebra is spanned by the generator To find all invariants of the subgroup H 2 we solve the corresponding characteristic system of equations and obtain Substituting two invariants of H 2 (5.140) as the new independent variables z,t and (5.140) as the dependent variable W (z,t) into (5.136) we get Here the investment π(z,t, h) and consumption c(z,t, h) look as follows in terms of the function W .
. This subalgebra is spanned by We need to regard two special cases ω = r/κ and ω = r/κ here. If ω = r/κ this case h 4 is spanned by a generator The invariants for this case are as follows We see that in this case the value function V (l, h,t) = e −κt W (l, h) and the complete dependence on t is described just by the factor e −κt Here the investment π(l, h) and consumption c(l, h) look as follows in terms of the function W .
To find the invariants of H 4 when ω = r/κ we can move according to a standard procedure. We obtain three independent invariants using a corresponding characteristic system Analogously substituting expressions for the invariants z and τ (5.148) as the new independent and W (z, τ) (5.149) as the new dependent variables into (3.27) we get form of the invariants of e 1 . Indeed if we assume that ω = 0 in (5.148) we get the corresponding invariants If we rewrite the second generator e 3 of subalgebra h 8 in terms of these three invariants z, τ and W as new independent and dependent variables correspondingly, we obtain Solving a corresponding characteristic system dτ This way we obtain an invariant solution under the action of two parameter subgroup H 8 . It means that we can take Y (z) as a new dependent variable in (4.54) and z as a new independent one. Substituting these invariants into PDE (4.54) with ω = 0 we obtain a new ODE Naturally, the investment π(z, τ, h) and consumption c(z, τ, h) in terms of Y (z) look now as follows In terms of original variables l, h,t and V the substitution looks as follows It also means that if we obtain a solution Y (z) for (5.164) we obtain the value function that in terms of original variables looks like log h, and the condition V (l, h,t) −→ t→∞ 0 is satisfied. All other two dimensional subalgebras listed in Table 5 do not give a reduction of the original equation (5.136) to an ODE, so we will not regard them in detail.

Conclusion
In this paper we regard a portfolio optimization problem for a basket consisting of a riskless liquid, risky liquid and risky illiquid assets. The illiquid asset is sold in a random moment of time T that has a distribution with a survival function Φ(t), satisfying very general conditions lim t→∞ Φ(t)E[U(c(t))] = 0 and Φ(t) ∼ e −κt or faster as t → ∞. This, to our knowledge, is a new generalization of the illiquidity models that was for the first time introduced in [5].
We work with two different utility functions (i.e. logarithmic and HARA-utility). Both of the utility functions were widely used before for the problems of random income and for the portfolio optimization with a portfolio that includes an illiquid asset sold in a deterministic moment of time or with infinite time horizon. In our setting we introduce an exogenous random liquidation time, i.e. a random moment of time T such that the illiquid asset in the optimized portfolio is sold (i.e. liquidated) at this moment. We use two types of utility functions: HARA type utility and logarithmic utility. However, we demonstrate that there is a possibility to choose HARA-utility in such a form that U HARA −→ γ→0 U LOG . This fact was mentioned in some publications before but, to our knowledge, it was not demonstrated explicitly, in a step-by-step manner how deep this connection is on the analytical level. May be because of that majority of the HARA utilities that we found in the literature do not actually posses this quality. They are certainly utility functions of the HARA type but the limit procedure applied to such utility function can at its best be reduced to some modification of logarithmic utility (not log c), while some of them do not even have anything that remotely resembles a logarithm. To demonstrate the connection between two problems we choose U HARA in the form (3.10) and show that not only we obtain correct form of logarithmic utility as γ → 0, i.e. U HARA −→ γ→0 U LOG but, naturally, a threedimensional HJB equation (2.6) corresponding to HARA-utility formally transforms into an HJB-equation that corresponds to logarithmic case as γ → 0. After a formal maximization of (2.6) we obtain three dimensional PDEs corresponding to HARA and logarithmic utility correspondingly. We demonstrate that the PDE (3.27) arising in the case of logarithmic utility function can be formally regarded as a limit case of the PDE (3.12) arising in the case of HARA utility function as γ → 0 .
We carry out the Lie group analysis of the both three dimensional PDEs and are able to obtain the admitted symmetry algebras. Then we prove that the algebraic structure of the PDE with logarithmic utility can be seen as a limit of the algebraic structure of the PDE with HARA-utility as γ → 0. Moreover, this relation does not depend on the form of the survival function Φ(t) of the random liquidation time T . Therefore, we demonstrate that if HARA utility has a special form such that U HARA −→ γ→0 U LOG , formally L HARA 3,4 −→ γ→0 L LOG 3,4 and a logarithmic utility can be regarded as a limit case of HARA utility and this correspondence holds not only for the HJBs but also for the algebraic structures, that stand behind them.
We carry out a complete Lie-symmetry analysis for two different utility functions, i.e. for two different three dimensional PDEs (3.12) and (3.27) which contain an arbitrary function Φ(t). In both cases we are able to solve these rather voluminous problems and find the admitted Lie algebras L HARA 3 and L LOG 3 . The study of the three dimensional problems is connected with a lot of tedious calculations, even the first step on which one needs to find the determining system is, in fact, non-trivial. These difficulties become even more evident if we have an arbitrary function in the studied equation. The problem becomes slightly more tractable if one applies package In-troToSymmetry, but the majority of the calculations still are to be done manually. In this way we get the system of partial differential equations containing 137 and 130 different equations correspondingly. These equations define the generators of the corresponding algebras. Computer systems that we know of, unfortunately, can not solve the obtained system of differential equations. This has to be a step-by-step handmade procedure. To our knowledge, this is a first Lie group analysis of such problem for a general liquidation time distribution. If we look on the amount of calculations it is also understandable why just few cases of three dimensional PDEs are profoundly studied in the literature.
We study the internal structure of the admitted algebras further in order to use these structures and obtain convenient and useful reductions of both PDEs (3.12) and (3.27). Using the notation provided in [22] we show that for a general liquidation time distribution L HARA 3 can be classified as A γ 3,5 and L LOG 3 as A 1 A 2 . We use the system of optimal subalgebras provided in [22] and obtain corresponding reductions of both three dimensional PDEs. We show how each of the original problems can be reduced to a corresponding two dimensional one and prove that in general case with an arbitrary function Φ(t) there is no Lie type reduction that leads to an ODE.
We also show that if and only if the liquidation time defined by a survival function Φ(t) is distributed exponentially, then for both types of the utility functions we get an additional symmetry. We prove that both Lie algebras admit this extension, i.e. we obtain the four dimensional L HARA 4 and L LOG 4 correspondingly for the case of exponentially distributed liquidation time. Indeed, the case of exponentially distributed liquidation time is actually similar to the infinite-horizon random income problem and several other models studied in the literature (see, for instance, [10]), yet our work is the first to our knowledge that explicitly shows which properties make an exponentially distributed liquidation time a distinguished case, that allows a reduction of an original three-dimensional PDEs to ODEs. This is a very important result, since a lot of the works in the field use similar reductions and do not mention that there is actually no other distribution that allows a Lie type reduction of a PDE to an ODE. With a help of Lie group analysis we explain what makes exponential liquidation time distribution a distinguished case, the only situation when one can reduce the three dimensional HJBs to ODEs.
We show that for both utility functions the symmetry algebras L HARA 4 and L LOG 4 admitted by the corresponding equations (4.47) and (5.136) can be classified as A 2 ⊕ A 2 in terms of the notation used in [22]. The study of the Lie algebraic structure of both three dimensional PDEs gives rise to an interesting remark on different level of influence associated with different parameters that define the model. Both equations contain a lot of parameters which describe properties of assets, utility functions and liquidation time distributions. From all of these parameters just three parameters have deep influence on the algebraic structure of the admitted Lie algebras: in both cases it is the interest rate r, the parameter κ of the exponential time distribution and for HARA utility function it is its' parameter γ. The algebras change their structure if one or some of these parameters vanishing. Additionally if κ = rγ, i.e. there is a certain dependency between the parameter of HARA utility function and the corresponding liquidation time distribution, the symmetry algebra L HARA 4 has the structure that corresponds to A γ 3,5 A 1 , in the notation of [22]. Using a system of optimal subalgebras for all admitted algebras allows us to provide all non equivalent reductions of the studied equations and describe the solutions which can not be transformed to each other with a help of the transformations from the admitted symmetry group. For every case we list all possible Lie type reductions of the problem. The reduced equations that are two dimensional PDEs or in some special cases are even ODEs. Such equations are much more convenient for further analytical or numerical studies.
We also show how one can rewrite corresponding optimal policies in every case. They can be described using solutions of the reduced equations. One can see that analogously to the result, obtained in [6] optimal policies tend to classical Merton policies as h → 0, that is only logical, since by construction this situation should correspond to a portfolio without illiquid asset.
Summing up, we carry a complete Lie group analysis for two different optimization problems with HARA and logarithmic utility functions and for a general as well as exponential liquidation time distributions. We list reduced equations and corresponding optimal policies that tend to the classical Merton policies as illiquidity becomes small.