Skip to content
JoaFin

Work

Selected case studies

Every case followed the same path: state the problem mathematically, choose the method for its properties rather than its popularity, and implement it with verification from day one.

Clients and specific figures are withheld for confidentiality. Methodological detail is available in conversation.

01 · Energy markets · Trading

Daily statistical arbitrage and heavy-tailed risk limits

Context

An energy desk was running with risk limits calibrated on Gaussian assumptions. In power markets the distribution of outcomes is nowhere near Gaussian: the episodes that define the year — severe congestion, scarcity, heat waves — live in the tail, and that is exactly where a badly set limit stops protecting anything.

Approach

We modeled the outcome distribution with extreme value tools: tail index estimated from the upper order statistics, and a daily limit expressed in CVaR rather than VaR. CVaR was posed in its Rockafellar–Uryasev variational form, which makes it a convex problem and therefore something you optimize jointly with position size rather than check afterwards. The difference is not cosmetic: at equal variance, a heavy tail moves VaR very little and CVaR a great deal.

Outcome

Daily limits that reflected the real cost of the tail rather than that of a comfortable assumption. On that basis an import and export strategy was run through a scarcity episode caused by a heat wave in northern Mexico; the strategy generated several million dollars in profit for the firm.

Methods

  • CVaR
  • Extreme value theory
  • Tail index
  • Convex optimization
  • Statistical arbitrage
CVaRα(L)  =  mintR{t+11αE[(Lt)+]}\mathrm{CVaR}_\alpha(L) \;=\; \min_{t \in \mathbb{R}} \left\{ t + \frac{1}{1-\alpha}\, \mathbf{E}\bigl[(L-t)_+\bigr] \right\}
P(X>x)=xα(x),E[Xp]=  for p>α\mathbf{P}(X > x) = x^{-\alpha} \ell(x), \qquad \mathbf{E}\bigl[X^{p}\bigr] = \infty \ \text{ for } p > \alpha
α^k,n1=1ki=1klogX(ni+1)X(nk)\hat{\alpha}_{k,n}^{-1} = \frac{1}{k} \sum_{i=1}^{k} \log \frac{X_{(n-i+1)}}{X_{(n-k)}}

L is the daily loss and α the confidence level. The first expression is the convex characterization of CVaR; the second defines a heavy tail through regular variation, with the consequence that moments above the index α do not exist — which is why a sample variance can mislead. The third is Hill's estimator of the tail index from the k largest order statistics.

Heavy tails and CVaR · Desk risk

1 − α = 0.01110⁻¹10⁻²10⁻³10⁻⁴123456P(L > x)VaR 2.62CVaR 4.04CVaR 2.67At equal variance: 99% CVaR is 1.52× the Gaussian one, while VaR rises only 1.13×. A limit set on VaR under a Gaussian assumption barely moves; the real cost of the tail does.
  • Normal (same variance)
  • Student-t, ν = 3
Two loss distributions with exactly the same variance: a normal, and a Student-t with 3 degrees of freedom rescaled to unit variance. On a log scale the difference is impossible to ignore: the normal decays like exp(−x²/2), the t like a power law. The numbers are closed form, not approximations.

02 · Derivatives · Analytics platform

Optimal-transport-based local volatility calibration

Context

A derivatives analytics platform needed local volatility calibration fast and stable enough to live inside the desk's decision cycle — not as an overnight batch — and surfaces that were arbitrage-free by construction rather than by later inspection.

Approach

Calibration is posed as an optimal transport problem: instead of fitting a surface and then checking it admits no arbitrage, the absence of arbitrage is imposed by the structure of the problem itself. The fine work was in the numerical scheme, the ill-conditioning and the error bounds — not in adding compute.

Outcome

Calibration in production: stable convergence, runtimes compatible with real-time use, and surfaces feeding pricing, volatility forecasting and Value-at-Risk for traders.

Methods

  • Optimal transport
  • Local volatility
  • Constrained optimization
  • No-arbitrage conditions
  • VaR
σloc2(K,T)=CT+(rq)KCK+qC12K22CK2\sigma_{\mathrm{loc}}^{2}(K,T) = \frac{\dfrac{\partial C}{\partial T} + (r-q)K \dfrac{\partial C}{\partial K} + qC}{\tfrac{1}{2} K^{2} \dfrac{\partial^{2} C}{\partial K^{2}}}
CT0,2CK20\frac{\partial C}{\partial T} \geq 0, \qquad \frac{\partial^{2} C}{\partial K^{2}} \geq 0

C(K,T) is the call price at strike K and maturity T; r and q the rate and dividend. Dupire's formula recovers local volatility from the price surface; the two inequalities are the static no-arbitrage conditions the calibrated surface must satisfy, and which here are imposed rather than checked at the end.

03 · Power market · Mexico

Locational marginal pricing models

Context

Participants in the Mexican power market needed to anticipate nodal prices to size positions and evaluate hedges, in a market with abundant but irregular public data where congestion dominates the variation between nodes.

Approach

We modeled the nodal price through its components — energy, losses and congestion — rather than treating price as a single series. That separates the system-wide regime from local network effects, attributes error to the component that causes it, and keeps the model interpretable for whoever makes the decision.

Outcome

Forecasts with error characterized by node and by hour, with a diagnostic of the conditions under which the model stops being trustworthy, wired into a data flow that updates without manual intervention.

Methods

  • Nodal price decomposition
  • Multiple-seasonality time series
  • Regularization
  • Out-of-sample validation

04 · Data · Backend for desks

From raw source to the model the desk queries

Context

Analysis that depended on data scattered across public portals, files and email, and models that lived in one person's notebook. Every query was a favor and every result was irreproducible.

Approach

We designed the whole system: automated acquisition from source, validation and transformation in pipelines with quality controls, a database schema built for time series, and the model exposed behind an API with scheduled jobs and monitoring. The proof that it is built properly is that nobody has to ask us anything to use it.

Outcome

Data available and auditable with no manual work, alerts when a source changes or fails, and internal applications on top so the desk and the team query without an intermediary.

Methods

  • Scraping and APIs
  • Pipelines and orchestration
  • Schema design
  • Models in production
  • Monitoring and alerting

05 · Power market · Mexico

Load and consumption forecasting

Context

Procurement, hedging and planning decisions that depend on anticipating electricity demand across horizons, from day-ahead to annual planning.

Approach

We built models with explicit structure for the effects that govern load: daily and weekly seasonality, calendar and holiday effects, and nonlinear temperature response. Models were evaluated per horizon, because a method that wins at one day can lose at one year.

Outcome

Load curves by horizon with prediction intervals usable for decisions, and a reproducible process that retrains and revalidates as new data arrives.

Methods

  • Regression with calendar effects
  • Nonlinear temperature response
  • Seasonal decomposition
  • Backtesting by horizon

06 · Litigation · Expert analysis

Valuation of an annuity in court dispute

Context

A court had to rule on the value of a periodic payment obligation. The central question was not discounting cash flows, but quantifying the probability that the counterparty would stop paying over the life of the contract.

Approach

We split the problem into two defensible parts: the term structure of discounting, and a payment survival model with explicit assumptions and a sensitivity range. Each assumption was documented with its source and its effect on the result, so the court could weigh the full range rather than a single number.

Outcome

A report with a central valuation, bounds and sensitivity analysis, written for non-technical readers and able to withstand challenge from the opposing side.

Methods

  • Survival analysis
  • Term structure of rates
  • Contingent cash flow valuation
  • Sensitivity analysis

07 · Insurance · Actuarial

Actuarial valuation projects

Context

Valuation of long-dated liabilities and projection of obligations where the result is highly sensitive to decrement, rate and persistency assumptions.

Approach

We fitted tables and assumptions to the available experience instead of adopting standard tables unexamined, and projected stochastically to show the dispersion of the result rather than only its expected value.

Outcome

Valuations with traceable assumptions, adequacy testing and documentation in a form fit for audit or regulatory review.

Methods

  • Decrement tables
  • Stochastic projection
  • Adequacy testing
  • Fitting to experience

Have a problem that spreadsheets won't settle?

Get in touch