Presentation is loading. Please wait.

Presentation is loading. Please wait.

Warehouse Lending Optimization Paul Parker (2016).

Similar presentations


Presentation on theme: "Warehouse Lending Optimization Paul Parker (2016)."— Presentation transcript:

1 Warehouse Lending Optimization Paul Parker (2016)

2 Problem Background Warehouse Operations Process: As many as 50,000 loans come into the pipeline at once, each with different characteristics such as credit rating, loan to value (LTV), zip code, type of structure, etc. Warehouse Operations Process: As many as 50,000 loans come into the pipeline at once, each with different characteristics such as credit rating, loan to value (LTV), zip code, type of structure, etc. Lender has 11 credit lines for warehousing, each line has different Loan level (eligibility)and Pool level (sublimit) rules Lender has 11 credit lines for warehousing, each line has different Loan level (eligibility)and Pool level (sublimit) rules

3 Problem Background (cont’d) Loan allocation is typically done by hand using Excel spreadsheets Loan allocation is typically done by hand using Excel spreadsheets Any allocation must meet eligibility (loan level) and will incur costs and penalties if sublimit (pool level) requirements are not met Any allocation must meet eligibility (loan level) and will incur costs and penalties if sublimit (pool level) requirements are not met Optimization of cost not typically done Optimization of cost not typically done

4 Sample Loan Attributes

5 Sample Lender Constraints

6 Problem Background (cont’d) Problem: create an algorithm to automate the allocation of N loans to n liquidity sources under the constraint that the Cost function C(f) is minimized and both eligiblity and sublimit requirements are met Problem: create an algorithm to automate the allocation of N loans to n liquidity sources under the constraint that the Cost function C(f) is minimized and both eligiblity and sublimit requirements are met This is a combinatorial optimization problem, it is also what is called an NP-complete problem, in which the computation time to find an exact solution increases with N as t(N) = exp(const * N) This is a combinatorial optimization problem, it is also what is called an NP-complete problem, in which the computation time to find an exact solution increases with N as t(N) = exp(const * N)

7 Solution Options There are many approaches that can be used to solve the problem, which can be grouped into the following classes: There are many approaches that can be used to solve the problem, which can be grouped into the following classes: Grid search (exhaustive search) Grid search (exhaustive search) Random or Monte Carlo type search Random or Monte Carlo type search Gradient (calculus based) methods Gradient (calculus based) methods Global Optimization methods Global Optimization methods

8 Grid search A Grid Search, or exhaustive search, finds an optimal solution by brute force, attempting every possible solution and suggesting the one that gives the best results A Grid Search, or exhaustive search, finds an optimal solution by brute force, attempting every possible solution and suggesting the one that gives the best results Impractical for all but the case where the number of loans is very small Impractical for all but the case where the number of loans is very small

9 Combinations of solutions for 10 Warehouse Lines (grid search) Number of Loans Possible Solutions Computation Time 14364 0.364 seconds 20167,960 2.8 minutes 36600,000,000 7 days 50 3.74 E+10 432 days 100 1.42 E+14 4491 years

10 Random search A random search (also called a monte carlo search) samples the solution space stochastically A random search (also called a monte carlo search) samples the solution space stochastically Unintelligent - information about the search results is not used to refine the search Unintelligent - information about the search results is not used to refine the search Because there is such a large and complex solution space in this problem it is unlikely that a good solution can be found randomly Because there is such a large and complex solution space in this problem it is unlikely that a good solution can be found randomly

11 Gradient methods Methods such as conjugate gradient and steepest descent Methods such as conjugate gradient and steepest descent Rely on the derivative of a function to find an optimal solution Rely on the derivative of a function to find an optimal solution Very efficient on well behaved functions Very efficient on well behaved functions Poor performance on complex and /or multimodal functions Poor performance on complex and /or multimodal functions

12 Multimodal function in 3 dimensions

13 Gradient methods (cont’d) Gradient methods are analogous to putting a ball somewhere on the previous surface and hoping it will roll down into the lowest point Gradient methods are analogous to putting a ball somewhere on the previous surface and hoping it will roll down into the lowest point Naturally, the ball will go to a minimum, but not necessarily the global minimum Naturally, the ball will go to a minimum, but not necessarily the global minimum Gradient methods have no reliable way to “bounce out” of a local minimum Gradient methods have no reliable way to “bounce out” of a local minimum

14 Global optimization methods Occupy a middle ground between traditional gradient based methods and global enumerative/random schemes Occupy a middle ground between traditional gradient based methods and global enumerative/random schemes Many popular methods Many popular methods Genetic Algorithms Genetic Algorithms Simulated Annealing Simulated Annealing Neural Networks Neural Networks Simulated ant and bee colonies Simulated ant and bee colonies These methods mimic nature to solve complex nonlinear problems These methods mimic nature to solve complex nonlinear problems

15 Genetic algorithms Mimic natural selection by randomly producing a population of solutions, testing each solution, and combining traits for best performing ones Mimic natural selection by randomly producing a population of solutions, testing each solution, and combining traits for best performing ones They also introduce a certain amount of randomness into the search by performing occasional mutations on the solutions They also introduce a certain amount of randomness into the search by performing occasional mutations on the solutions

16 Steps for Implementing the Genetic Algorithm 1. Coding the problem and incorporating constraints 2. Generating an initial (parent) population of random solutions 3. Evaluating the fitness of each solution 4. Subjecting the solutions to a selection process to find pairs of high fitness 5. Applying crossover to the pairs to create a new (child) population 6. Applying mutation operators to the new population 7. Overwriting the old population with the new one

17 Genetic Algorithm

18 Incorporating Constraints Warehouse lenders impose constraints on eligibility both at the loan level and the pool level Warehouse lenders impose constraints on eligibility both at the loan level and the pool level Potential problem for global cost optimization: wasting time computing the cost of solutions which violate loan level constraints (invalid solutions) Potential problem for global cost optimization: wasting time computing the cost of solutions which violate loan level constraints (invalid solutions) One way to deal with this is to penalize invalid solutions in the objective function One way to deal with this is to penalize invalid solutions in the objective function A far better way is to minimize the global cost by searching ONLY the sub space of valid solutions A far better way is to minimize the global cost by searching ONLY the sub space of valid solutions

19 Incorporating Constraints The initial (parent) population of potential solutions can be coded an list of loans, with each loan assigned randomly to an ELIGIBLE lender. To do this, we must compute a list of the eligible lenders for each loan and draw randomly from this list. This insures that time is not wasted evaluating invalid solutions The initial (parent) population of potential solutions can be coded an list of loans, with each loan assigned randomly to an ELIGIBLE lender. To do this, we must compute a list of the eligible lenders for each loan and draw randomly from this list. This insures that time is not wasted evaluating invalid solutions A reasonably large (> 100) initial population of solutions must be generated A reasonably large (> 100) initial population of solutions must be generated To generate a new (child) solutions, we combine two solutions by crossing them over at a random point on the loan list To generate a new (child) solutions, we combine two solutions by crossing them over at a random point on the loan list

20 Generating an Initial (Parent) Population

21 Evaluating the Fitness of Each Solution For the warehouse operations process this is essentially what is done by hand. Loan parameters are compared to loan constraints in an Excel spreadsheet to see if they meet the qualifications for the bin For the warehouse operations process this is essentially what is done by hand. Loan parameters are compared to loan constraints in an Excel spreadsheet to see if they meet the qualifications for the bin For this problem, the fitness function is the same as the cost function, with “fitter” solutions giving a smaller fitness value For this problem, the fitness function is the same as the cost function, with “fitter” solutions giving a smaller fitness value Rapid calculation of this is essential, as it will be done hundreds of thousands of times with each run Rapid calculation of this is essential, as it will be done hundreds of thousands of times with each run

22 Evaluating the Fitness of Each Solution Factory Pattern for creation of Loan Attributes

23 Applying Crossover to the Pairs to Create a New (Child) Population Here we are assuming that the best performing solutions have bits and pieces of the optimal solution, so to get the optimal solution we must mix them up by crossing the solutions over Here we are assuming that the best performing solutions have bits and pieces of the optimal solution, so to get the optimal solution we must mix them up by crossing the solutions over Here we must make sure that the offspring are valid solutions (in terms of eligibility requirements). This can be accomplished easily because the solutions are coded as strings of valid lines, and the action of crossing over does not disrupt the validity of each solution Here we must make sure that the offspring are valid solutions (in terms of eligibility requirements). This can be accomplished easily because the solutions are coded as strings of valid lines, and the action of crossing over does not disrupt the validity of each solution

24 Applying Crossover to the Pairs to Create a New (Child) Population

25 Applying mutation operators to the new population This keeps diversity in the gene pool and guarantees that no “traits” are ever completely lost due to crossover This keeps diversity in the gene pool and guarantees that no “traits” are ever completely lost due to crossover Solutions are mutated by the occasional random change of position for a loan (a different eligible line is selected) Solutions are mutated by the occasional random change of position for a loan (a different eligible line is selected)

26 Overwriting the old generation In this step the old (parent) array is overwritten with the new (child) array and a generation is completed In this step the old (parent) array is overwritten with the new (child) array and a generation is completed The new population can be checked to see if the best model from the previous generation has been reproduced and if not, it is copied into a random slot. This ensures that there is no regression in the solution quality The new population can be checked to see if the best model from the previous generation has been reproduced and if not, it is copied into a random slot. This ensures that there is no regression in the solution quality

27 Results vs. Monte Carlo


Download ppt "Warehouse Lending Optimization Paul Parker (2016)."

Similar presentations


Ads by Google