← Selected work

Hint: an optimizer for director pay

Abstract

How much should you pay yourself in salary, and how much in dividends? Simulators compute the outcome of the assumptions you feed them; Hint searches for the optimum. The director states their non-negotiable rules and priorities, and a multi-objective genetic algorithm explores around 100,000 scenarios over a full simulator of French taxation, returning a Pareto front of optimal trade-offs. Built for directors, accountants and wealth advisors. Designed, built and operated by Myelink.

01The problem

The salary-dividends trade-off has no analytical solution: progressive brackets, thresholds, contribution floors, binary levers such as deducting a home office. The function to optimize is non-convex and non-differentiable, and every situation (legal form, household, holding company, projects) moves the optimum. A classic simulator leaves the director guessing assumption by assumption; Hint turns the problem around: you describe the rules, the algorithm finds the strategy.

02The formulation

The problem is cast as constrained multi-objective optimization over mixed variables. Depending on the situation, the decision space has two to five dimensions: annual net salary and dividends (continuous), allocation to a holding company, CESU amount, and one binary variable, whether to deduct the home office. The proposed objectives, household income and wealth growth, can be pursued together: the result is then a true Pareto front, not a single imposed compromise.

Two modeling choices matter in particular. Constraints are expressed on the simulated outputs, not only the inputs: you can require positive end-of-year treasury or a minimum household income, and the optimizer honors it. And an equality constraint on salary or dividends is not penalized: it removes the variable from the search space, shrinking the problem's dimension instead of distorting it.

03Solving

The search is driven by a mixed-variable genetic algorithm (pymoo) with NSGA-II survival: non-dominated sorting and crowding distance to preserve the front's diversity. Around 100,000 evaluations per search, each being a full tax simulation; this is the scenario counter the user sees. The random seed is fixed: the same inputs give the same advice, which matters when an accountant has to justify a recommendation. The front is deduplicated before display, and an infeasible problem returns a clear message inviting the user to relax their rules rather than a silent failure.

regles + priorites + situation formes juridiques, foyer, leviers variables libres 2 a 5 dimensions, continues + binaire boucle evolutionnaire - environ 100 000 evaluations population candidats salaire/dividendes simulateur fiscal EURL (TNS) / SASU, IS, IRPP, PFU tri non domine survie NSGA-II selection, croisement, mutation front de Pareto dedoublonne arbitrages optimaux distincts, meme entree = meme conseil (graine fixee) restitution carrousel de solutions, Sankey des flux, liste d'actions, rapport IA, PDF
Fig. 1 - Every evaluation in the loop is a full tax simulation of the candidate scenario.

04The tax simulator

The object being optimized is a simulator of French director taxation, with two engines: EURL-like (self-employed TNS regime) and SASU-like (salaried-equivalent), covering eight legal forms. It models progressive corporate tax, income tax with the family quotient, the flat tax on dividends, the PUMA contribution, and carefully distinguishes take-home from taxable net. Arbitrage levers are simulated at their true net value: the parent-subsidiary regime for the holding, and home-office rent evaluated after the marginal income-tax effect, which is what justifies its binary decision variable.

Tax scales are not frozen in code: at startup, the service queries URSSAF's public rule engine (mon-entreprise) for income tax, corporate tax, the social security ceiling or the flat tax, with fallback values if unavailable. The PDF export attaches the annex of the rates actually used in the computation.

05Presenting the results

A strategy is only useful if understood. Hint renders each solution of the front in a comparable carousel, draws the money flows as a Sankey diagram, and translates the chosen solution into a list of concrete actions in plain language. An interpretation report, generated as structured output by an LLM from versioned prompts, adds the strategic reading, the points of caution and the fit with the director's stated projects. Everything exports to PDF.

06The stack

LayerChoice
Optimizationpymoo: mixed-variable GA, NSGA-II survival, fixed seed
Taxationtwo simulators (TNS, salaried-equivalent), eight legal forms
Tax scalesURSSAF rule engine loaded at startup, hardcoded fallbacks
APIstateless FastAPI, per-IP rate limiting
FrontendDjango, Plotly (Sankey), WeasyPrint (PDF)
AI reportLangGraph, structured outputs, versioned prompts (Langfuse)
PaymentsStripe, credits, idempotent webhooks
Quality208 tests (70 on the optimizer, 138 on the frontend), CI

07Status

Hint is in production, operated by Myelink, built for directors, accountants and wealth advisors.

@software{hint,
  author = {Vinceslas, Medhy},
  title  = {Hint: un optimiseur de remuneration},
  note   = {En production, Myelink EURL}
}
Visit Hint Get in touch