A Genetic algorithm for Objective formulation effect on the shortfall of retirees in developing countries: a case study in Iran

The certainty about retirement income is dependent on the longevity and the selected investment policy by individuals during their working years. Attention to longevity and investment risks is of high significance in making enough income for retirees. In this research, the impact of the objective formulation selection on investment decisions has been investigated. Two functions including terminal wealth objective formulation and retirement income objective formulation are applied to investigate these decisions. Based on the investment alternatives, 5 asset classes including Equity, Certificate of deposit


Introduction
Individuals' social security in different countries is ensured in various ways which generally include a Defined benefit plan, Defined contribution plan, and Personal account.In the Defined benefit plan, the longevity and investment risks are imposed on the retirement fund which is administered by the government.But in the Defined contribution plan and Personal account, these risks are imposed on individuals directly or indirectly.Thus the selection of the optimal investment policy is of high importance.
In this research, the aforementioned functions have been investigated using the shortfall approach and the bootstrapping simulation contributed to estimating the probable return of the markets.Based on the investment interests in Iran, 5 markets including real estate, equity, certificate of deposit, foreign exchange, and gold coin were scrutinized using bootstrapping simulation to estimate the probable returns of the markets.
In the research carried out by Kamali et al (2020), the same procedure was used but only two assets including equity and cash were studied.In this study, the final wealth was recommended as the optimal objective formulation.In this research, the impact of investment in different assets on individuals' shortfall amounts has been examined besides the probability of investment in 5 assets.
The documented data about the markets through the last 23 years was applied in the simulation of the markets.According to the calculation complexity of the problem, the Genetic Algorithm in modeling the investment decision-making was adopted.The results are demonstrative of the fact that the contingency of investment in different assets cannot end in a decrease in individuals' shortfall.
The retirement income objective formulation has been repeatedly confirmed as the optimal function due to the wealth accumulation nature through increasing the investment risk in the selected approach.

Literature Review
Individuals' social security is one of the main concerns of the governments and different regulations have been set in various countries to direct retirement plans based on this burden.
Definite regulations for investment and withdrawal have been set as well in accordance with the mentioned plans.Some of these adjustments bound the investment framework and others may define the retirement system too.Finke and Wolf (2013) have studied individuals' social security and income in different societies.
In the personal account approach, the investment and longevity risks are directly imposed on the people; therefore, the attention to the optimal investment policy in this plan is of high importance.This policy has been considered in numerous studies.
These studies have scrutinized the static or dynamic decision-making and the pre-retirement, post-retirement, or whole-life investment periods.In static decision-making, the individuals' investments are not gradual and are defined at the start of the decision-making.Antolin et al (2010), Basu et al (2011), and Butt and Deng (2012) have applied the same approach.
Dynamic decision-making is more complex.One of the most common dynamic decision-making approaches is dynamic programming in which the decisions are made step by step.Gerrard et al (2004), Steinorth and Mitchel (2012), and Kaur (2019) have investigated the optimal investment policies during retirement.Vigna and Haberman (2001), Haberman and Vigna (2002), Basu et al (2011), Blake et al (2011) and Korn et al (2011) have only investigated the preretirement investment policies.In the research done by Horneff et al (2013), the whole life stages have been studied.Kamali et al (2020) have applied two functions including the final wealth and retirement income objective formulations and have used the shortfall approach to investigate the aforementioned objective formulations.They have only studied two alternatives of investment in stocks and certificates of deposits.
Gaurav et al (2020) use a stochastic life-cycle model to test how the superannuation guarantee impacts the welfare of Australian superannuation fund members under a reference-dependent utility function.The results show that there is no single SG rate that is appropriate for all members and they suggest that the main reason for increasing the SG would be an aim of replacing the age pension where possible.
In this research, the mentioned objective formulations are studied as well.
In the final wealth maximization objective formulation, the pre-retirement period has been considered based on its nature and in the retirement income objective formulations, the whole life cycle is analyzed.
In this research, the investment in 5 assets is analyzed by the Genetic Algorithm due to the calculation complexity of the problem.According to the Metaheuristic Genetic Algorithm solution feature, static programming is also applied.
In order to predict market returns, using simple assumptions to analyze the whole population is essential in the analytical approach.Pirvu and Zhang (2012) have used the geometrical Brownian motion to predict different markets.Blake et al (2011) and Horneff et al (2013) have assumed that the markets obey the quadratic approach.The bootstrapping simulation is another approach in the context of market returns estimation.The advantage of this procedure is that it does not make assumptions about the market returns.In this approach, the return can take different forms.Steinorth and Mitchell (2012) have applied the Mont Carlo simulation approach.They have used bootstrapping simulation for predicting market returns.

1-The optimization method
In this research, the Genetic Algorithm is used to solve the problem with 5 investment alternatives including equity, certificate of deposit, foreign exchange, gold coin, and real estate.In the proposed model it is assumed that individuals invest in personal accounts and are able to withdraw from these accounts.
In order to optimize the mentioned objective formulations, an appropriate financial objective must be set.In the literature, the shortfall approach and the utility have been used.In the shortfall approach, the failure in meeting the defined target results in a shortfall.Haberman and Vigna (2002) and Butt and Deng (2012) have applied this approach.The utility function is another approach used in the literature.Horneff et al (2013) and Kopcke et al (2013) have applied this approach.

2-The shortfall approach modeling
In the study done by Van wyk (2012), different functions in the literature have been investigated.Many functions have considered terminal wealth and the success in making enough wealth or income at retirement, thus the failure in making wealth or income is considered a shortfall.Vigna and Haberman (2001), Haberman and Vigna (2002), Basu et al (2011), Korn et al (2011), andYao et al (2014) have applied this approach.
In this research, the focus of modeling is on comparing the impact of terminal wealth and retirement income on the social security of individuals.Therefore, the impact of objective formulation structure on the investment strategy selection has been studied.Antolin et al (2010) have also followed this approach and investigated the impact of investment strategy selection on choosing the asset in order to reach income at retirement.Butt and Khemka (2015) have also done research with a similar approach.They compared the final wealth and the retirement income objective formulations.
To sum up, this research is the analytical study of the mentioned objective formulations using historical data to analyze the retirement plan of a personal account in the country.
According to the analytical nature of the research, the bootstrapping simulation has been used and the Genetic Algorithm has been applied due to the nature of investment and a better possibility of decision-making.Based on the studies on consumption and wealth level, a consistent objective formulation has been used to investigate these factors.

Research Methodology
In this section, the application of the Genetic Algorithm will be described.
Prior to proposing the model, the research variable and the structural relations in decision-making are clarified.In the end, the modeling procedure in the Genetic Algorithm is described.In this research, all variables are calculated annually and then applied.

1-Research variables
In this research, the individuals' initial wealth level has been taken as the state variable.Since the investigation of the whole research space is not possible, point Optimization has been used to explore the results for each state.In this research ‫و‬ is known as the value function in which is the individual's age and is other individual's conditions other than age.
‫و‬ is the result of 200 simulations in a metaheuristic Genetic Algorithm and ( ‫و‬ ) represents the value function in each simulation.
Due to the application of the bootstrapping simulation in this research, the value distribution function cannot be developed but the value function is definite in each year.To investigate the research space by point Optimization, the individuals are divided into different categories and each category is optimized.This research aims to investigate the objective functions but due to the different conditions in various categories, it is possible to investigate other people's situations by interpolation.
The age of starting an activity in each category is assumed 25 and the activity period is taken 40 years.In order to study the whole population, 21 levels of individuals' primary wealth in a range of 0 to 20 billion IRR was taken and the population wealth in categories increased steadily.
According to what is described above, the stock exchange index, banking deposit rates, foreign exchange, gold coin and real estate, inflation, and death rate in Iran are independent variables.The asset classes' logarithm returns are calculated as in Eq.1.In order to calculate the real return, the inflation rates reported by the central bank of Iran, were used.To calculate the daily return, it is assumed that the price of mentioned assets changes steadily.stands for the price of asset I on the day t and is the inflation rate of the same day.
In this research, the retirement income and the terminal wealth are taken as dependent variables and the investment amount in each asset and the consumption are taken as state variables.

2-The life table and the research structural relation
In the present research, the number of alive individuals at age x is shown by , and the probability of staying alive at the age of x is shown by .The probability of death is the product of subtracting the probability of staying alive from 1.The probability of death at the age of x is shown by .The probability of staying alive is calculated as Eq.2. (2) In Eq.2, shows the number of people alive at the age of x.The probability of staying alive at the age of x in individuals for t years is calculated as in Eq.3, shown below. (3) The decision-making relation in this research is presented in Eq.4.

3-The research assumptions
The following assumptions are used in problem modeling: 1.The whole investment and longevity risks are transferred to individuals.

The individuals' income during retirement is only based on personal
account and there will be no income origin by losing this account.
3. According to the small number of fee charges, it is assumed that there are no fees in calculations.
4. There is no mandatory retirement plan for people.
5. Only investment in stock markets, banking deposits, foreign exchange, gold coin, and real estate is possible.
6.In order to remove the inflation effect in data, the average monthly inflation rates, announced by the central bank of Iran, are used.Thus, it is assumed that the inflation is distributed uniformly on days of each month.
7. The whole individual's wealth is invested in a personal account and there is no other income assumed for him/her.
8. The individual works full-time until the age of 50 and then retires.
9. There is no assumption regarding income increase and individual promotion is ignored.
10.The life table is approved by law, which is applied by insurance companies, is used and it is assumed that the person does not pass away before 65.

4-The objective functions of the research
In the present study, two objective functions are considered which will be described in the next section.Eq.5, presents the retirement income objective function analyzed in the paper. ( Where, V is the value function in which the income maximization happens based on decisions of each period I is the expected cost during retirement X is the individual's age K is the index of the individual's balance with his/her primary wealth.In this research 21 levels are taken. ( ‫و‬ ) is the time of shortfall by the zero account balance.
A is the individual's personal account.
( ‫و‬ ) is the time of shortfall by the zero account balance.
is the individual's death probability.
is the discount rate at the age of x by simulation i.
V is the calculated accumulative function up to a defined age.
In this objective function, the number of years through which the individual is able to cover his/her expenditures by financial balance is determined first.Thus, the year in which the individual decreases to zero, is considered the final year of the coverage, and the next year in the function above will be replaced by .
Eq (6) presents the terminal wealth objective function analyzed in the paper. (6) Where; is the expected costs during retirement.
is the present value of pension earned in the following years at the age of x.
is the individual's life expectance.
is the percentage of household income increase.
is the discount rate in simulation i.
In this value function, LP indicates retirement income purchasable from insurance companies.The positive gap between the pension value and discounted financial balance at each age is considered the objective function value at that age.According to the recursive procedure of dynamic programming in this objective formulation, the value of the objective function at each age is the result of the accumulation of objective function of the following years with the assumption of optimized decision making.

5-Genetic Algorithm modeling
Complex problems cannot be optimized using operation research procedures, thus metaheuristic procedures must be applied.There are different algorithms to solve various problems.One of the most commonly developed algorithms which are able to solve problems with the dynamic optimization approach is the Genetic Algorithm.This algorithm will be described in the following section.
The Genetic Algorithm is inspired by Genetics and Darwin's evolution theory.This algorithm is based on the assumption that the best species stay alive.This concept is known as natural selection and is adopted in optimization.
During the 1960s, some scholars investigated the evolutional systems and introduced them as the solution to scientific problems on different grounds.During the 1970s, these systems were used as a superior procedure in many studies.Hoffmeister andSchwefel (1975-1977) first introduced these strategies.
Many studies have applied these algorithms known as machine learning during those years.The Genetic Algorithm was introduced in the same decade by Holland et al (1957).
In this research, the Genetic Algorithm is used due to the calculation complexity for the condition that all mentioned assets are considered.In this algorithm, different procedures and mechanisms are used to meet the goal.
In this research modelling, the number of investment alternatives has increased thus solving the problem using dynamic programing is not possible and metaheuristic algorithms must be used.In this research, the Genetic Algorithm has been used in optimizing the objective formulations.
In order to formulate the Genetic Algorithm, the problem must be transferred from Phenotype to Genotype space first.Then the algorithm must be run based on the developed dynamic formulation by considering the defined limitations.
The first step in space transferring the space into the problem solution space is defining the chromosomes and the quantification of the gene.Each number in each gene is indicative of the purchasing percentage of each asset.The number of genes defined for each chromosome shows the number of asset types.
Based on the limitations caused by leasing prohibition, the accidental weights were allocated to the genes and after normalizing them, the logical weight for each asset was.
In problem solution by applying the Genetic Algorithm, the primary population is first created and evaluated.Then the population is processed by the Algorithm operators and the best chromosome in each repetition is selected.Based on the fitness of each chromosome and the action of the algorithm operators, the primary generation, creates the next generation.

5-1-Selection procedures in Genetic Algorithm
The principal idea in the Genetic Algorithm is that the better people are preferred to the worse.This selection is defined by the fitness function.Different procedures are developed to be applied in the Genetic Algorithm.In these procedures, only the measures of fitness are evaluated which are independent of presenting the population people.

5-1-1-consistent selection with fitness
In this procedure, each individual's expectation rate is calculated by dividing the individual's fitness by the average fitness of the population.

5-1-2-Roulette wheel sampling
In this procedure, a piece of the roulette wheel is allocated to each person.The wheel will have N rounds and each time the person under the marker is selected.In this way, the chromosomes are chosen to create the next generation by the cross-over Operator.

5-1-3-Tournament selection
In order to rank the chromosome rates, the Roulette wheel must pass through the generation once for fitness average and once for a person's rate calculation.This method is more appropriate for parallel implementation.
In this procedure, two people are randomly selected and a number between 0 and 1 is created.If the created number is lower than a predefined measure, the better person will be selected.Otherwise, the person with lower competency will be selected.These two members can take part in generation selection again.

3-5-1-4-Trunction selection
In this procedure, the fitness for each chromosome is defined.Then the chromosomes will be ranked by the fitness measure and a predefined proportion of the chromosomes will be eliminated.New members will replace the eliminated members.In this procedure, the diversity level is high which leads to more exploration of the algorithm.

5-2-Elitism
This mechanism makes the algorithm maintain the best people in each generation because if these people are not chosen for recreation or if they change by intersection or mutation, they will die.Many scholars have learned that the selection of the elites will increase the efficiency of the algorithm.

5-3-stop criteria condition
In evolutional algorithms, the plan execution is done for a predefined number of generations and this can be done based on the chromosomes dispersion or algorithm execution time.This condition can be performed based on fixed maintained results as the best result in algorithms.

5-4 The cross-over operator
In this operator, an accidental weight between 0 and 1 is allocated to the first parent and the remainder of the subtraction of that number from 1, is allocated to the second parent.After multiplying these numbers by each parent chromosome gene and aggregation of the corresponding measures in twoparent chromosomes, a new chromosome is created which breaches the limitation of the stock number.
Thus that chromosome will be normalized to be transferred to the next generation.In this research, the Roulette wheel and single point mutation are applied to transfer the chromosomes to the next generation.According to the 5 assets studied in this research, with the assumption of the chromosomes definition as measures proportion, the intersection operator is presented in Fig. 1.

5-5-The mutation operator
This operator creates an accidental number between 1 and the maximum length of the chromosome.Then the thread between the beginning of the chromosome and the defined accidental point from each parent will be placed in the new offspring chromosome and the remained chromosome between the defined point and the end of the opposite chromosome will be placed in the offspring chromosome.This procedure is shown in Fig. 2.  To develop an algorithm with appropriate efficiency, the diversification mechanism for the population was adopted.To do so, after a defined number of repetitions in running the algorithm which is set by the operator, the new population replaces the existing population.In the new population, the best chromosome of the previous generation is retained.This procedure increases the algorithm's efficiency and productivity.In this research, this appeared in the 20th and 60th repetition.

6-The Genetic Algorithm Optimization
For optimization applying this algorithm, a matrix with the number of rows equal to the defined years for optimization and 5 columns including the asset weights in the research is created.The weight aggregation of each row must equal 1.
In the terminal wealth objective formulation, the chromosome rows number equals the gap between the retirement age (65 years old) and the age of starting the activity (25 years old).Retirement income objective formulation is used between the retirement age (65 years old) and the final year (106 years old), by optimizing both stages, the final results are given.
In the retirement income objective formulation, each chromosome is optimized from the maximum age (106 years) to the age of starting activity (25 years).
In each repetition, the chromosome with the lowest shortfall is chosen as a new board for the next repetition.By the 100th repetition which is assumed as the condition of the halt, the best chromosome is selected and is reported as the investment-optimized syntax in that simulation stage.
In the defined functions, the withdrawal during retirement is assumed to be fixed.The household expenditures and income in these functions are defined to be 522 and 411 million IRR respectively based on the data of the statistics office.The withdrawal from the account continues until the balance decreases to zero.In this situation, if the person is alive, the shortfall has happened and no increase is considered in the income in this research.

Findings
The performance of the objective formulations in each simulation is dependent on the selected accidental return.Thus, in some simulations, the shortfall happens and in others, the situation is desired.But based on the average of the results and simulation repetition up to 200 times, the results can be generalized to the population.It must be noted that the results are not necessarily indicative of the individual's decisions and situation and the interpretation of the results can only lead to developing the optimized guideline to decrease the shortfall.In this research, the households' income and expenditures are considered to be fixed in all categories.
The results of the shortfall approach are dependent on 2 factors including the market's expected return and the discount rate for financial balance sufficiency in each period.According to the research results and with the assumption of the stability of other factors, lower primary wealth leads to higher levels of the shortfall.It is obvious that there is a great correlation between the individual's financial balance and his/her shortfall.This factor is the reason for the shortfall at a definite level of wealth and higher.
At a definite level of wealth and higher, more returns in the mentioned markets do not influence the individual's shortfall and the person's social security is guaranteed.In the previous studies, inappropriate market returns even with the appropriate discount rate, were considered to be the reason for the shortfall.
The average of the real return of the research assets through the last 23 years is demonstrated in table.2.The real estate return is calculated by subtraction of the entities' depreciation from the aggregated returns and rents.As is shown in Fig. 3, the investment in different assets including the stock exchange, real estate, foreign exchange (dollar), gold coin, and banking deposits have been investigated in mentioned categories using a metaheuristic algorithm.The reason for this investigation is the appropriate return of these markets.In the periods that other markets had appropriate returns, they were analyzed.
Based on the results, the retirement income has more risk-taking nature which affects the individual's shortfall and decreases this amount by 20%.Based on the results demonstrated in Fig. 4, the individual's financial balance at the level of 12 billion IRR in the final wealth and the level of 10 billion IRR in the retirement income will cause no shortfall.
It must be noted that the results were simulated only 200 times based on the algorithm mechanism and the necessity of its execution 100 times to find the best results in each iteration.In spite of using 5 markets for ensuring social security for people, social security has not been met in all levels of primary wealth, and decreasing the consumption or increasing the income in these categories for appropriate social security is essential.In Fig. 5, the personal financial balance for an individual primary wealth of zero is demonstrated.As seen, the retirement income shows a lower shortfall.It must be mentioned that the shortfall is the gap between the individual's desired and real situation which is aggregated in the years of the study.

Discussion and Conclusion
The retirement income objective function has the nature of wealth accumulation through increasing investment risk in the shortfall approach.This

Fig. 3 .
Fig.3.The investment proportion in various markets in the metaheuristic algorithm

Fig. 4 .
Fig.4.The shortfall amount in shortfall objective formulations applying metaheuristic genetic algorithm

Fig. 5 .
Fig.5.The financial balance in objective formulations applying metaheuristic genetic algorithm

Table . 1
. The applied parameters in single goal algorithm

Table . 2
. The average annual real return of the assets categories