Applications of Evolutionary Algorithms in Finance
Evolutionary algorithms are algorithms (set of rules to be followed in problem solving operations) that uses biological concepts to solve computational problems. These biological concepts consist of concepts like selection, mutation and crossover. There are different types of evolutionary algorithms, such as genetic algorithm, particle swarm optimization and many more. Although there are a lot other evolutionary algorithms and different industries they can be applied to, in the paper I will be focusing on the ones mentioned in the previous sentence and its use in problem solving in the financial sector. I will define the problem the specific evolutionary algorithm solves, explain how the candidate solution is represented by an individual and how the evaluation of a candidate solution is computed by the fitness function. Also, the strengths and weakness of the algorithm. I will discuss in depth two different problems each of the algorithm mentioned above solves or makes easier predictions in the finance industry. The problems are Bankruptcy Prediction (which is done with genetic algorithm) and Portfolio Optimization (which is done by particle swarm optimization).
Bankruptcy Prediction
Genetic algorithms have been used to predict company’s bankruptcy for the past couple years. Bankruptcy and financial calamity can be very damaging to stakeholders of the company including creditors and stockholders. Predicting bankruptcy can give the company the chance to take advantages of investment opportunities the best way possible and avoid wasting available resources (ahmadi, Amjadian and Pardegi, 2012). In this section I will discuss from my research how genetic algorithm and financial ratios are used to predict upcoming bankruptcy for a company. Also, I will be pointing out the benefits and the liabilities of the algorithm. In this illustration 24 financial ratios where used which was split into 4 sections leverage (capital structure), activity, liquidation and profitability ratios. All the 24 ratios are used as parameters in the chromosome which is an individual which is a candidate solutions. The 24 parameters were “Current Ratio, Current Assets Ratio, Quick Ratios, Cash Flows / Total Assets, Cash Flows / Total Liabilities, Cash Flows / Total Current Liabilities, Cash Flows / Sales, Debt Ratios, Owner's Equity /Total liabilities, Current debts to Net Worth Ratio3, Long-term debts to Net Worth Ratio, Possessory Ratio, Frequency of Inventory Turnover Utilization, Inventory Turnover Period, Assets Turnover, Inventory to Working Capital, Working Capital turnover, Return on Sales Ratio, Gross Profit Ratio, Operating Profit Ratio, Return on Net worth Ratio, Return on Common Equity Ratio, Return on Assets Ratio and EPS(earnings per share)” (ahmadi, Amjadian and Pardegi, 2012). About 1000 chromosomes are produced at random to initialize the first population. A number R set prior, and if the multiplication of the product of the candidate solution’s field by the company’s related parameter is greater than R then the company is non-bankrupt whilst if its less than R then the company is assumed to be bankrupt. The aim now is to have a candidate solution (chromosome) were the fitness function for non-bankrupt companies are more than R and for bankrupt companies are less than R. To do this we give a data set of 100 companies were 50% are bankrupt and the other 50% are not bankrupt.
This is the function for computing the non-bankruptcy and bankruptcy companies. C is the number of companies, i is number of chromosomes, j is the number of chromosomes’ field and the company’s parameter and H is the number of non-bankruptcy companies and B is the number of the bankrupt companies (ahmadi, Amjadian and Pardegi, 2012).
How the evaluation of a candidate solution is computed by the fitness function is by the formula above. For all candidate solution, the fitness function is set to zero. If ij.cj is greater than R for a non-bankrupt company out of the 100 companies then add 1 to the fitness. As well as if ij.cj is less than R for a bankrupted company then also add 1 to the fitness. If ij.cj is greater than R for a bankrupt company and ij.cj is less than R for a non-bankrupt company then reduce the fitness’s by 1. If we get a chromosome (candidate solution) which the fitness function is equal to 100 (which can be unlikely in most cases) then that is the best solution for the problem out of all solution because it gave the right result for all 100 companies. In a case were the fitness equal to the negative of the number of companies then the chromosome believes that all bankrupt companies are non-bankrupt companies and vice versa. Roulette wheel selection or tournament selection can be used for selection. These types of selection have been discussed extensively in lectures already. For the crossover operation two-point and single point crossover might be used.
This is an example of a crossover operation between two chromosomes P and S. For this problem, the chance mutation happens is 0.001
(ahmadi, Amjadian and Pardegi, 2012).
The strengths that this algorithm has for the bankrupt prediction problem is that if the assumptions are correct or the heuristic is good then base on it, it can find the best solution. On the other hand, if the heuristic isn’t good enough then the solution given by the algorithm wouldn’t be great. So, the heuristic really plays a big part in the results of the algorithm. In this case, the heuristic is the 24 financial ratios.
Portfolio Optimization
A portfolio is a file showing a collection of assets and investments. Assets like cash, bonds, stocks and commodities. Portfolio optimization is figuring out the best possible amount of capital to invest in each asset, essentially to get the greatest return from the smallest risk. As simple or linear as this problem sounds it is quite complex. There are a lot of constraints for an asset that must be considered like, “diversification requirements, minimum and maximum exposure to assets, transaction costs and foreign exchange” (Turing Finance, 2018). In this paragraph, I will be discussing how Particle Swarm Optimization algorithm is used for portfolio optimization. This problem has been attempted to be solve with the algorithm discussed in the previous paragraph but results show that the particle swarm optimization algorithm (PSO) is more suitable for this problem (Kamali, 2014). How it works is that there are forecasts made describing the expected risk and the return of assets in the portfolio. Then the PSO algorithm takes those forecasts as inputs and try to decide how much of the capital should be invested into the assets, considering the constraints and the that “risk adjusted return of the portfolio is maximized” (Turing Finance, 2018). A critic of the algorithm is that the forecast should be very spot on and accurate for the algorithm to work well.
An “individual” which is a candidate solution is represented by how much capital is allocated to assets in a portfolio. To get the fitness of these different candidate solution to know which solution is the global best, we need to use a function which balances the risk and return of an asset. So, from this function we get the fitness of a solution and as the particles (individuals) moves through the search space they converge to locations with particles that have high fitness’s. That function to calculate the fitness in this case could be the Sharpe ratio. “The Sharpe Ratio is designed to measure the expected return per unit of risk for a zero-investment strategy. The difference between the returns on two investment assets represents the results of such a strategy The Sharpe ratio does not cover cases in which only one investment return is involved.” (Sharpe, 1994).
This is an example of the Sharpe ratio being implemented and calculated. (Zhu et al., 2011)
Applying this function to all candidate solution gives us the fitness for each of the solutions, now we need to find the best solution out of all the candidate solutions. These solutions are transformed to vectors and are plotted in a search space with multiple dimensions (in correlation to the vector). Every time the algorithm is iterated it finds the global best position (the particle with the highest fitness). Every particle knows its personal best position (the position of the particle where the fitness was the highest). As the algorithm iterates each particle moves closer to its personal best position and the global best position. Also as the iteration goes on these values are being updated if need be. Eventually all particles converge to the optimal solution (the best candidate solution) which produces an optimized portfolio.
(Turing Finance, 2018)
In the image above the new position of the particles (grey particles) are being updated in relations to the global best position (blue particles) and the personal best position (red particles).
The strengths of this algorithm in portfolio optimization is that the algorithm gives sub-optimal solution to the problem. In this case, the sub-optimal solution was the global and personal best solution before updating. The calculations are straight forward and search can be done by the speed of particles, hence there is no overlapping or mutation calculation. A weakness of the algorithm is that non-coordinated system can be solved by this algorithm. (Bai, 2010)