All on the Line · Mathematics
Exploring local versus global maxima in training, business, and investing, and the mathematics of optimizing entire systems.
Optimization
20 February 2026
6 minutes

A few days before my half marathon, my legs felt better than they had any right to feel. The long runs were behind me, the intervals had gone well, and my confidence was rising in a way that is both energizing and dangerous. With the race close enough to see, I began doing the arithmetic that every endurance runner eventually does. If I ran fifteen kilometers that morning, I would reinforce my conditioning, strengthen my aerobic base, and enter race day with the reassurance that I had done more than required. It is seductive to add one more long effort before the clock runs out, as if squeezing in extra work can compensate for any lingering doubt. More mileage, in my mind, translated into more preparation. The equation seemed straightforward, and it felt rational because the variable I was increasing was the one I could measure: distance.
The problem is that distance is not the variable that determines performance on race day. Endurance physiology models performance as the difference between two competing forces: fitness and fatigue. Fitness rises gradually with training stress, but fatigue rises faster and decays more slowly. Every additional kilometer adds both. If fatigue accumulates too close to race day, the body carries that weight to the starting line. Performance, then, is not the product of maximal effort in the final week, but of the correct balance between accumulated fitness and dissipated fatigue. The discipline to taper, reducing mileage before competition, has been studied for decades. Research in sports science consistently shows that reducing training volume by roughly 40 to 60 percent in the final one to three weeks before an endurance event can improve race performance by several percentage points. For a half marathoner targeting 1 hour and 40 minutes, a three percent improvement is nearly three minutes. Three minutes is the difference between satisfaction and regret.
In that moment, the fifteen kilometers I wanted to run represented what mathematicians would call a local maximum. It felt like the highest point available within the narrow frame of the week. More distance meant more effort, and more effort felt like progress. Yet the global maximum, peak performance on race day, required restraint. To reach a higher summit, I had to descend in the visible metric. I had to run less.
A local maximum is a peak that appears highest from your immediate vantage point, but is not the highest point in the entire landscape. Imagine hiking in a mountainous region. You climb steadily and eventually reach a summit. The view expands, and from that perspective, it feels like the top of the world. But when the clouds clear, you see a taller mountain across a valley. The only path to that higher summit requires descending first, surrendering altitude before regaining it. Many people stop at the first peak because going down feels like failure, even when it is structurally necessary to climb higher. The discomfort is not mathematical; it is psychological. Descending requires admitting that the metric you have been climbing may not be the one that ultimately matters.
Optimization in mathematics rarely involves a single variable. Real systems are multivariable and constrained. In calculus, maximizing a function subject to constraints requires acknowledging that pushing one variable upward changes the behavior of the others. The highest value of one coordinate does not guarantee the highest value of the entire function. When we ignore constraints, we maximize in the wrong dimension.
In training, mileage is a single coordinate. Recovery capacity is another. Hormonal balance, muscular repair, sleep quality, and glycogen replenishment are part of the same system. Maximizing mileage while ignoring recovery is equivalent to increasing one input without accounting for the feedback loop it triggers. The body is not impressed by your cumulative distance in a given week; it responds to cumulative stress. The highest weekly mileage is not necessarily the highest race-day output if both are close together.
The same logic applies in business, where the most visible metric often becomes the one that is maximized. Revenue is reported quarterly, celebrated in headlines, and displayed prominently in investor presentations. It is tangible and easy to compare. Yet revenue is only one component of a much larger system that includes margins, operating leverage, cash flow, financing costs, employee retention, and competitive positioning.
Consider the trajectory of WeWork in the years leading up to its failed initial public offering. Revenue grew from approximately $886 million in 2017 to roughly $3.4 billion in 2018. Growth rates of that magnitude command attention. At the same time, operating losses expanded dramatically, and long-term lease obligations accumulated on the balance sheet. The company signed fixed, multi-year leases while offering customers flexible, short-term memberships. In mathematical terms, the firm increased its exposure to fixed costs while maintaining revenue streams that could contract quickly in a downturn. The visible variable, top-line growth, rose sharply, but the constraint of sustainable cash flow tightened. The system was being pushed toward instability.
Contrast this with early Amazon. For years after going public in 1997, Amazon reported minimal profits and occasionally net losses. At first glance, this resembled reckless expansion. The distinction lay in the structure of the system. Amazon invested heavily in fulfillment infrastructure, technology, and scale efficiencies that improved unit economics over time. Network effects strengthened with each additional customer and third-party seller. Over time, gross margins expanded and operating leverage improved as fixed infrastructure costs were spread across a larger base of transactions. What appeared to be structural weakness in the early years was, in fact, an investment in a system whose economics improved with scale. The objective function was not short-term profit maximization; it was long-term net present value under competitive dynamics characterized by increasing returns. The losses were financed by capital markets that believed in the scalability of the model. Under those specific conditions, access to capital, improving marginal economics, and structural barriers to entry, temporary losses represented a descent necessary to reach a higher summit.
The lesson is not that losing money is virtuous. It is that the rationality of a strategy depends on the structure of the system. If increasing scale does not improve margins or create defensible advantages, sustained losses compound toward collapse rather than dominance. Maximizing revenue without understanding constraints is not boldness; it is miscalculation.
Investing provides another illustration of the local maximum trap. The most celebrated metric in finance is return. Investors compare annual performance, rank funds, and allocate capital based on recent gains. Yet return, when viewed in isolation, obscures the impact of volatility on long-term wealth accumulation. Arithmetic averages can be deceptive. If a portfolio gains 50 percent one year and loses 50 percent the next, the arithmetic average return is zero percent. The actual capital, however, rises from 100 to 150 and then falls to 75, which means the geometric return is negative.
Volatility imposes a mathematical drag that is not obvious in headline numbers. Two portfolios can both report an average annual return of 10 percent over a decade, yet the one with higher volatility will end with materially less wealth. The difference is not philosophical; it is embedded in the mathematics of compounding.
Between 2000 and 2002, the NASDAQ Composite declined by roughly 78 percent from its peak. Investors who maximized exposure to high-flying technology stocks in 1999 experienced extraordinary short-term gains. They reached what appeared to be a summit of performance. When the cycle turned, the descent erased years of progress. Recovering from a 78 percent drawdown requires a gain of more than 350 percent. The arithmetic of compounding is unforgiving. The visible peak of short-term return was a local maximum that masked systemic fragility.
Even broader indices such as the S&P 500 have experienced drawdowns of 30 to 50 percent multiple times over the past several decades. The long-term average return often cited conceals the reality that survival through volatility is a prerequisite for compounding. Maximizing return without regard to risk tolerance and drawdown capacity can push an investor to abandon a strategy at precisely the wrong moment. The system fails not because the average return was incorrect, but because the constraint of psychological and financial endurance was ignored.
In each of these domains, training, business, investing, the visible metric is seductive because it is measurable and immediate. Mileage is logged daily, revenue is reported quarterly, and returns are calculated annually. The objective function, however, is rarely identical to the visible metric. The runner’s objective is peak performance on race day, not maximal mileage in the final week. The entrepreneur’s objective may be durable cash flow or long-term enterprise value, not the highest possible revenue this quarter. The investor’s objective is sustainable wealth accumulation, not the highest trailing twelve-month return.
Optimization requires clarity about what is being optimized and what constraints bind the system. In mathematical terms, we are always solving a constrained optimization problem, even if we do not articulate it explicitly. We have to take into account that resources are limited, recovery capacity is finite, capital is costly, and competition is dynamic. When we maximize a single variable without modeling its interaction with others, we risk climbing the wrong hill.
On the morning I decided not to run fifteen kilometers, the choice felt conservative. It felt like doing less. On race day, my legs were fresh, my pace steady, and my performance stronger than it would have been had I indulged the impulse to accumulate one more long run. The descent in mileage felt like unfinished business, but it respected the structure of the system more than my impulse did.
The local maximum trap does not announce itself with warning signs. It rewards visible effort and immediate gains, which is precisely why it is difficult to recognize. Escaping it requires stepping back from the most flattering metric and asking a harder question: what am I actually trying to optimize, and what constraints govern this system? That inquiry is mathematical in the deepest sense, because it forces us to respect the architecture of reality rather than the comfort of a single number. And that discipline, the willingness to question the peak in front of us, is often what separates effort from enduring performance.
— Carlos E. Mora
I wake up, I build, I repeat. No guarantees.
I work like it’s all on the line, because it is.
Family is the only true legacy.
Your name is your currency, and it must be earned daily.
The arithmetic in these essays is the arithmetic the practice runs on a mandate.
Discuss a mandate →