most read
Software Engineering
Why We Killed Our End-to-End Test Suite Sep 24
Culture & Values
The Spark Of Our Foundation: a letter from our founders Dec 9
Software Engineering
The value of canonicity Oct 30
Careers
We bring together great minds from diverse backgrounds who enable discussion and debate and enhance problem-solving.
Learn more about our careers



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:
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:
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:
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:
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