Finance ops · Production

Mercado Pago's Enigma system automates collateral allocation management using linear programming and Google OR-Tools

The problem

Mercado Pago's Collateral Management team must daily select from millions of loans — valued in billions of dollars — to back multiple credit lines, each with complex and overlapping contractual conditions, and complete the entire process within a few hours. The combinatorial scale of the problem is NP-Complete, causing execution time to grow exponentially as portfolio size increases.

Workflow diagram · grounded in source
1
Daily allocation process initiated
trigger
“The daily collateral allocation process must be completed within a few hours, requiring swift decision-making.”
2
Gather inputs from GCP
integration
“gathering essential inputs, primarily loan data and configuration settings, both sourced from Google Cloud Platform”
3
Cluster loans with grouping heuristic
ai_action
“we developed an in-house grouping heuristic that enables us to strategically combine loans with similar characteristics into clusters. This technique effectively reduces the overall number of loan entries the solution must evaluate, stre…”
4
Linear programming optimization
ai_action
“This model employs advanced optimization techniques to analyze the loans based on various criteria and constraints. The goal is to determine the most suitable loans to assign to each credit line to maximize or minimize the objective func…”
5
Generate reports and insights
output
“Enigma generates outputs that include a refined selection of loans. These results facilitate comprehensive reporting and data visualization. This step not only aids in decision-making but also provides the Collateral Management team with…”
6
Upload to transactional system
integration
“The final step involves uploading the selected loans into the transactional system.”
Reported outcome

Enigma automates and optimizes the loan selection process for securitizing each credit line, maintaining required execution time at scale through an in-house grouping heuristic and providing the Collateral Management team with clear insights via comprehensive reporting.

Reported metrics
Execution time at scalemaintain the required execution time while preserving the overall performance of the solution
Loan entries evaluatedeffectively reduces the overall number of loan entries the solution must evaluate
Reported stack
Google OR-ToolsGoogle Cloud PlatformFury
Source
https://medium.com/mercadolibre-tech/the-billion-dollar-puzzle-optimizing-collateral-allocation-management-with-ai-87cb5e6cf975
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Enigma automates and optimizes the loan selection process for securitizing each credit line, maintaining required execution time at scale through an in-house grouping heuristic and providing the Collateral Management…

What tools did this team use?

Google OR-Tools, Google Cloud Platform, Fury.

What results were reported?

Execution time at scale: maintain the required execution time while preserving the overall performance of the solution; Loan entries evaluated: effectively reduces the overall number of loan entries the solution must evaluate (source-reported, not independently verified).

How is this finance ops AI workflow structured?

Daily allocation process initiated → Gather inputs from GCP → Cluster loans with grouping heuristic → Linear programming optimization → Generate reports and insights → Upload to transactional system.