Mathematical Modeling of Bank Loan Allocation Using Dynamic Programming: The Case of Bank Al-Maghrib in 2023

Author's Information:

Zineb Zouaki

Master's student in Participatory Finance Engineering and Artificial intelligence, Faculty of Legal, Economic, and Social Sciences - Ain Sbaa, University Hassan II Casablanca, Morocco.

Hiba Namry

Master's student in Participatory Finance Engineering and Artificial intelligence, Faculty of Legal, Economic, and Social Sciences - Ain Sbaa, University Hassan II Casablanca, Morocco.

Rabie Tiji

Master's student in Participatory Finance Engineering and Artificial intelligence, Faculty of Legal, Economic, and Social Sciences - Ain Sbaa, University Hassan II Casablanca, Morocco.

Imad Tiji

Master's student in Participatory Finance Engineering and Artificial intelligence, Faculty of Legal, Economic, and Social Sciences - Ain Sbaa, University Hassan II Casablanca, Morocco.

Naima Himan

Master's student in Participatory Finance Engineering and Artificial intelligence, Faculty of Legal, Economic, and Social Sciences - Ain Sbaa, University Hassan II Casablanca, Morocco.

Faris Asmaa

Laboratory of Applied Modeling for Economics and Management, Faculty of Legal, Economic, and Social Sciences - Ain Sbaa, University Hassan II Casablanca, Morocco.

El Hachloufi Mostafa

Department of Statistics and Applied Mathematics for Economics and Management, University Hassan II Casablanca, Morocco.

Vol 02 No 09 (2025):Volume 02 Issue 09 September 2025

Page No.: 812-826

Abstract:

This applied study aims to implement a precise mathematical model that enhances the efficiency of financial resource allocation within banking institutions. The model is based on dynamic programming, which is considered one of the most important quantitative methods for making optimal decisions over successive time periods. The core idea revolves around distributing the available financial balance progressively, taking into account present-time preference and the time value of money.

The study relies on actual quarterly data of bank loans during the third quarter of 2023, where the total allocated balance amounted to 549,920 million dirhams, distributed among three main types of loans: investment loans, real estate loans, and consumer loans.

The applied model includes a logarithmic utility function that reflects the diminishing marginal utility with the increase in used resources. The model also integrates both the discount factor (β = 0.95) and the interest rate (r = 0.05) to estimate the optimal allocations for the next three future periods.

This model serves as a reference tool that enables comparison between the actual allocations adopted by the bank and those derived from the theoretical model, opening the door for better strategic decisions and more rational budget management.

KeyWords:

dynamic programming, resource allocation, time value of money, bank loans.

References:

  1. Al-Baz, M. A. (2005). Operations Research and Its Applications in Management. Dar Al-Safaa for Publishing and Distribution, Amman.
  2. Al-Hilali, A. A. (2010). Quantitative Models in Administrative Decision Making. Dar Wael Publishing, Jordan.
  3. Al-Jumaily, T. M. (2012). Decision Analysis Using Operations Research. University of Mosul – Iraq.
  4. Al-Maghrib, B. (2023). Ventilation du crédit bancaire par objet économique (Déc. 2001 à sept. 2023) [jeu de données]. https://data.gov.ma/data/fr/dataset/ventilation-du-credit-bancaire-par-objet-economique-dec-2001-a-sept-2023
  5. Arrow, K. J. (1971). Essays in the Theory of Risk-Bearing. North-Holland Publishing Company.
  6. Bellman, R. (1957). Dynamic Programming. Princeton University Press.
  7. Bellman, R. (1957). Dynamic Programming. Princeton University Press.
  8. Bellman, R., & Dreyfus, S. (1962). Applied Dynamic Programming. Princeton University Press.
  9. Bertsekas, D. P. (2005). Dynamic Programming and Optimal Control, Vol. I (3rd Edition). Athena Scientific.
  10. Bertsekas, D. P. (2012). Dynamic Programming and Optimal Control, Volumes I & II. Athena Scientific.
  11. Brealey, R., Myers, S., & Allen, F. (2020). Principles of Corporate Finance. McGraw-Hill Education.
  12. Brealey, R., Myers, S., & Allen, F. (2020). Principles of Corporate Finance. McGraw-Hill Education.
  13. Carlier, G. (2021). Programmation dynamique et mesures du risque. École Polytechnique, Département de Mathématiques Appliquées.
  14. Coffee, J., & Jr, e. (2018). The Oxford Handbook of Banking. Oxford University Press.
  15. Duffie, D., & Singleton, K. (2019). Credit Risk: Pricing, Measurement, and Management. Princeton University Press.
  16. Dupont, L. (2017). Analyse du problème d’exécution optimale. Mémoire de Master M17316, Université Paris-Dauphine, Département de Mathématiques Appliquées.
  17. Francesco , B., &  Marco , C. (2012). Reinforcement Learning for Automatic Financial Trading: Introduction and Some Applications. Working Paper No. 33/2012, Department of Economics, Ca’ Foscari University of Venice.
  18. Frank, J., Fabozzi, Petter , N., Kolm, Dessislava , A., & Pa. (2010). Quantitative Investment Analysis. John Wiley & Sons (2nd Edition), publié par le CFA Institute Investment Series.
  19. Glasserman, P. (2004). Monte Carlo Methods in Financial Engineering. Springer.
  20. Goda, T. L. (2023). Dynamic Programming Approaches for Resource Allocation in Project Scheduling. Journal of Operations Research and Applications.
  21. John, M., &  Matthew , S. (2001). Learning to Trade via Direct Reinforcement. IEEE Transactions on Neural Networks, 12(4), pages 875–889 .
  22. Lasry, J.-M. (2016). Cours complet de programmation dynamique. Lycée Janson de Sailly – Paris.
  23. Lieberman, H. (2021). Introduction to Operations Research. McGraw-Hill Education.
  24. Ljungqvist, L., & Sargent, T. (2018). Recursive Macroeconomic Theory. MIT Press.
  25. Merton, R. C. (1990). Continuous-Time Finance. Blackwell Publishing.
  26. Nwozo, C., & Nkeki, C. (2012). On a dynamic optimization technique for resource allocation problems in a production company. American Journal of Operations Research.
  27. Powell, W. B. (2011). Approximate Dynamic Programming: Solving the curses of dimensionali. Wiley.
  28. Pratt, J. W. (1964). Risk Aversion in the Small and in the Large. Econometrica, Vol. 32, No. 1-2, pp. 122–136.
  29. Puterman, M. L. (2005). Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons.
  30. Puterman, M. L. (2014). Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley.
  31. Richard A, A., Brealey, Stewart , C., Myers, & Franklin All. (2019). Principles of Corporate Finance. McGraw-Hill Education (13th Edition).
  32. Santner, T. J. (1966). Optimal allocation of observations in two-stage designs. Annals of the Institute of Statistical Mathematics.
  33. Stokey, N., Lucas, R., & Prescott, E. (1989). Recursive Methods in Economic Dynamics. Harvard University Press.
  34. Varian, H. R. (2014). Intermediate Microeconomics: A Modern Approach. W. W. Norton & Company.
  35. Whittle, P. (1982). Optimization over Time: Dynamic Programming and Stochastic Control. John Wiley & Sons.