If you’ve ever thought about the foundations of optimization models and mathematical programming, you may have noticed that they are often shrouded in complex terminology. It is essential to break them down to grasp the very essence of these concepts. Luckily, you’ve come to the right place.

In the vast expanse of Data Science and Machine Learning, few events capture the essence of the industry as distinctly as Nubank’s DS & ML Meetup. Edition #82, held on July 2023, stood out prominently, shining the light both on the theme, “Optimization Models: Math Programming in Practice”, and on Luiza Biasoto, the expert in the field who guided us through this complex subject.

In the conversation hosted by Lucas Farias, Senior Data Scientist at Nubank, Biasoto talked about:

  • The foundations of optimization models and mathematical programming;
  • A fictitious case study about installment credit, to understand the subject in a real-world scenario;
  • Modeling and interpreting results;
  • And the perks of optimization.

Interested? Keep reading the article below!

Understanding the power of optimization

Today, data isn’t just numbers; it’s the catalyst that drives decisions, forecasts trends, and creates sustainable business models. Optimization, the process of making the best use of available resources, lies at the heart of this data revolution.

It’s no longer restricted to complex academic discussions一optimization has become a real-world solution for myriad business challenges, especially in finance.

Our main speaker for this meetup, Luiza Biasoto, Lead Data Scientist at Nubank, is an expert in the field of Mathematical Programming with experience in Software Engineering, Credit Strategy, Data Science and Operations Research.

With an impressive academic background, having a degree in Chemical Engineering from Poli-USP, where she is currently pursuing a Master’s degree in Computer Engineering, as well as an MBA in Software Technology, Luiza has championed the integration of mathematical programming in various business models.

Being a stalwart in the fintech sector, Nubank’s commitment to harnessing the strengths of Data Science and Machine Learning is commendable. In an era dominated by digital interactions, tracking monetary transactions, predicting customer preferences, and identifying potential risks using advanced mathematical models are not just strategies; they are imperatives.

The allure of optimization lies in its ability to churn vast amounts of data into actionable, insightful strategies. The transition from traditional systems to dynamic optimization-centric models necessitates a profound understanding of tools and platforms. Whether one talks about popular programming languages like C#, Java, or Python, or delves deeper into dedicated platforms like Pyomo, there’s a rich tapestry of resources fueling this change.

Crafting an optimization model is a harmonious blend of mathematical prowess and acute business acumen. It’s more than just formulas; it’s about assimilating business objectives, weaving in constraints, and meticulously designing solutions. From the subtleties of decision-making in the expansive credit domain, introducing myriad variables and solvers, to the delicate balance between risk and reward, model construction is an intricate dance.

Check our job opportunities

Installment credit case study

To make our journey more tangible, Luiza introduced a fictitious case study revolving around vehicle financing credit. In this scenario, a client visits a car dealership, expresses interest in financing a vehicle, and awaits the bank’s approval or rejection based on a specific set of credit rules.

Navigating the complex landscape of credit risk, interest rates, and loan approvals is no easy task. Financial institutions often rely on well-structured credit policies to ensure they strike the right balance between customer satisfaction and risk mitigation. 

The scenario

Imagine a simple matrix that cross-references client risk, loan terms (number of installments), and down payments. Each cell in this matrix represents the minimum down payment required for a loan proposal to be approved.

As an example, a client with Risk B who proposes a loan with 60 installments and offers a 10% down payment would be declined since the policy demands a 20% down payment for that particular scenario.

It’s essential to understand that such policies aren’t set in stone. Depending on the economic environment and the financial institution’s strategy, these policies will evolve.

The main objective is to maximize the approved loan amount without surpassing the bank’s risk appetite, or in simple terms, the potential default rate of approved clients. While in our example, we discussed maximizing the approved value, it can be replaced with any relevant profitability indicator depending on the business sector.

The process

To fine-tune or modify a credit policy, institutions follow a standard flow:

  • Baseline analysis: understand the current policy (baseline) and identify its potential shortcomings.
  • Initial simulation: using historical proposal data (from the past 3-6 months or any period with sufficient data), simulate the baseline policy’s outcomes.
  • Scenario analysis: use tools (like Excel) to break down the data – client risk on the rows, installments in columns, and then review each cell to understand its default rate. This step will help identify cells that can either be relaxed (lower default rates) or tightened (higher default rates).
  • Policy modification and resimulation: based on the insights, modify the policy and simulate again. This iterative process continues until the policy reaches desired standards.

Constructing the Optimization Model

Now, let’s build our optimization model. First and foremost, the problem at hand is to create an optimized credit policy. We aim to maximize the approved value, keeping the bank’s risk limit in check. Here’s how we model it:

  • Parameters: these are the data points we know, such as loan amounts, pre-financing, potential default rates, and the bank’s risk limit.
  • Sets: these represent the dimensions of our policy, like client risk, down payment bands, and installment bands.
  • Decision variables: this is where our decisions reside. For example, we can denote whether a particular policy cell is “open” or “closed” with a binary variable – ‘0’ for closed and ‘1’ for open.
  • Objective function: our goal, which in this case is to maximize the approved loan amount.
  • Constraints: the mathematical equations that ensure we respect the bank’s risk limit.

Linearizing constraints ensures our model remains solvable with standard optimization techniques. Avoiding nonlinearities (like dividing one variable by another) keeps the problem more tractable.

In summary

We’ve crafted a mixed-integer linear programming (MILP) model. Why “mixed-integer”? Because it includes binary decisions (whether to approve or decline based on various criteria). And it’s linear because our equations involve only linear relationships.

Building such models offers an analytical and systematic approach to making intricate decisions in credit risk management. As financial landscapes shift, institutions armed with optimization techniques can adapt more fluidly, ensuring they remain both competitive and risk-averse.

Model overview

At the core of our discussion is a flowchart, outlining the primary elements of the optimization model:

  • Inputs: these include a six-month average of proposals, with detailed information and potential default rates for each combination of risk group, installment, and entry. This can be thought of as a table with approximately 125 rows. There’s also a singular risk threshold defined by the bank, which determines the maximum allowable default rate from approved applicants.
  • Risk model: amongst the risk groups (ABCDE), we have the risk model, essentially a predictive classification model. This model predicts the probability of a client defaulting. By grouping these probabilities, we can categorize our target audience into stable, homogeneous risk groups. The more discerning the model is in separating payers from defaulters, the more stable these groups are.
  • Constraints: first, the approved default rate must be below or equal to the risk limit. Additionally, for operational risk considerations, if a higher-risk policy is closed, a lower-risk one should be too. For instance, if a client offers a 30% down payment and another offers just 10%, the latter poses a higher operational risk due to lesser collateral. Hence, if the 30% policy is closed, the 10% one should also remain closed.

Operational risk constraints in optimization: the challenges

Any potent tool comes with its fair share of hurdles, and optimization is no exception. Navigating through irregularities within risk groups, handling vast datasets, and deriving solutions that align with organizational goals present formidable challenges. But as professionals in the field would attest, these challenges also pave the way for innovation.

Results & analysis: the fruits of optimization

The benefits of embracing optimization are manifold. Be it the agility infused by computational optimization methods or the enhanced performance metrics post the introduction of constraints, these models validate the efficacy of math programming in real-world scenarios.

The creation of different scenarios and analysis through a pareto-curve can be a very potent tool to find which scenario best fits within the company strategies, unlocking business-competitive insights that are only possible due to the application of optimization methods in the decision-making.

Branching out: applications beyond the credit sector

Optimization’s reach extends far beyond the credit realm. Numerous industries, from manufacturing to logistics, from healthcare to entertainment, can harness the power of optimization. Whether it’s streamlining production processes, enhancing supply chain efficiency, or predicting consumer behavior, the applications are vast and varied.

Resources and further learning: delving deeper

The horizon of knowledge in this domain is vast. Those eager to explore further can plunge into a diverse range of books, such as “Mathematical Programming for Process Optimization“, by Jorge Gut, engage with industry-leading podcasts, like hipsters.tech, or experience hands-on learning with games, like the enlightening Burrito Optimization Game offered by Gurobi.

The future beckons

At its essence, mathematical programming and optimization models symbolize the future of data-driven decision-making. As we generate data at lightning speed, the tools, methodologies, and platforms that facilitate its meaningful interpretation will rise in significance.

Our deepest gratitude to every participant, keynote speaker, and enthusiastic attendee at the Nubank DS & ML Meetup edition #82. For those who missed out or yearn for a deeper understanding, we beckon you to dive into our rich repository of GitHub code snippets. Engage, critique, and share your insights, for collaborative learning is the path forward.

Check our job opportunities