Delivering returns while managing risk remains a key priority in today’s financial markets. Portfolio managers and quantitative analysts are asked to make decisions that not only hold up in theory but also withstand the messy realities of trading—transaction costs, turnover limits, diversification rules, and more.
In our recent webinar, Unlocking Alpha with Gurobi: Advanced Portfolio Optimization and Backtesting with Discrete Constraints, Gurobi experts demonstrated how mathematical optimization can help financial services firms overcome these challenges and gain a competitive edge.
The event featured Gurobi’s Dr. Robert Luce, Principal Developer, and Dr. Silke Horn, Senior Optimization Engineer, who shared insights from their research and experience helping customers apply optimization in finance. The session concluded with a live Q&A led by Senior Engineers David Torres Sanchez and Dan Steffy.
Dr. Luce began by revisiting the classical mean-variance portfolio optimization framework pioneered by Harry Markowitz in the 1950s. This model balances expected returns against risk, producing an “optimal” portfolio under simplified assumptions. It remains one of the most widely studied models in finance.
But while elegant, the mean-variance approach assumes a world without friction. In practice, portfolio managers face numerous discrete decisions and constraints:
These constraints can’t be modeled accurately using traditional continuous optimization techniques. However, with Gurobi’s mixed-integer optimization technology, they can be built directly into the model. That means the resulting strategies are not only mathematically optimal but also practical and executable in real markets.
Dr. Luce illustrated this with a simple example: adding a cardinality constraint (limiting the number of assets in a portfolio). By introducing binary decision variables, Gurobi makes it possible to restrict allocations to a manageable number of positions—something impossible in pure continuous models.
While designing one “optimal” portfolio is valuable, the real test is whether a strategy can stand up over time. That’s where backtesting comes in.
Dr. Horn explained that backtesting applies investment strategies to historical data to measure how they would have performed under actual market conditions. This process:
In the webinar, Dr. Horn and Dr. Luce used 10 years of S&P 500 data—covering 459 stocks that were part of the index throughout the decade—to demonstrate how backtesting works in practice. They showed how rebalancing, turnover constraints, transaction costs, and minimum trade sizes can be modeled to mirror the realities of portfolio management.
Backtesting isn’t just about avoiding mistakes. The faster and more extensively you can test, the more opportunities you must discover new alpha-generating strategies.
One of the biggest challenges in backtesting is performance. Running thousands of scenarios across long time horizons can be computationally intensive. Here’s where Gurobishines.
The presenters highlighted three techniques for dramatically improving backtesting speed and efficiency:
Together, these methods help firms scale their analysis—allowing them to test more strategies, uncover more insights, and ultimately, find more ways to unlock alpha.
The Q&A portion of the webinar highlighted the kinds of real-world questions practitioners face. Topics included:
The takeaway? Optimization isn’t just about mathematics—it’s about building models that reflect the realities of trading and can be solved efficiently with the right tools.
In an industry where fractions of a percent can mean the difference between success and underperformance, the ability to design, test, and refine strategies quickly is a critical edge. With Gurobi, firms can move beyond theory to create investment strategies that are both powerful and practical.
To learn more, watch the full webinar on demand or explore our portfolio optimization resources to see how Gurobi can help you unlock more alpha.

Marketing Manager
Marketing Manager
Kathleen Spalding builds and executes marketing strategies that bridge the gap between advanced technology and meaningful customer engagement. She’s driven by curiosity and a passion for turning analytical insights into creative, results-oriented campaigns. At Gurobi, Kathleen focuses on connecting audiences to the power of mathematical optimization and data-driven decision intelligence. She holds a B.B.A. in Marketing and enjoys exploring new ideas, traveling, and spending time with her family.
Kathleen Spalding builds and executes marketing strategies that bridge the gap between advanced technology and meaningful customer engagement. She’s driven by curiosity and a passion for turning analytical insights into creative, results-oriented campaigns. At Gurobi, Kathleen focuses on connecting audiences to the power of mathematical optimization and data-driven decision intelligence. She holds a B.B.A. in Marketing and enjoys exploring new ideas, traveling, and spending time with her family.
Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.
Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.