Allocate with constraints. Decide with evidence.

CLAROOpen-source marketing budget optimisation and decision-support software

CLARO (Constrained Linear Allocation and Resource Optimiser) is free, open-source decision-support software that allocates a fixed marketing budget across advertising platforms and business objectives using linear programming. It turns historical KPI performance, business priorities and real operating constraints into a single auditable optimisation model, then explains which constraints shaped the result.

FreeMIT licence
243tests
12platforms
Optimisation path moving through a constrained feasible regionx₂x₁FEASIBLE REGIONBINDINGoptimal allocationz* = 147.82x₁ + x₂ ≤ 120x₁ + 2x₂ ≤ 100x₂ ≤ 60
What is CLARO?

An open-source tool for constrained marketing budget optimisation.

CLARO stands for Constrained Linear Allocation and Resource Optimiser. Given a fixed marketing budget, a set of business objectives and your historical platform performance, it solves a linear program that decides how much budget each platform-objective pair should receive — and then reports which constraints stopped the allocation going further.

It runs two ways. The hosted optimiser is a guided browser application that needs no installation. The Python engine installs from PyPI as claro-engine and can be used directly in notebooks or pipelines. Both are MIT-licensed and share the same solver.

Method
Linear programming (PuLP / CBC)
Install
pip install claro-engine
Licence
MIT, free for commercial use
Version
0.2.1, Python >=3.10
The decision problem

More data does not remove the need to make trade-offs.

Marketing budgets have competing objectives, uneven data quality and real operating limits. Those constraints are often applied informally, after the analysis.

CLARO makes the decision structure visible first. It then solves the allocation and explains why the result stopped where it did.

How CLARO works

One traceable path from assumptions to action.

Each layer is separate, reviewable and designed to be challenged.

01

Declare

Objectives, budget, floors, values and seasonality

02

Measure

Historical KPI productivity and data quality

03

Optimise

LP allocation under named constraints

04

Interpret

Robustness, trade-offs and recommendations

Core capabilities

Built for decisions that must be explained.

Not a black box and not an automated media buyer. CLARO is a structured planning framework.

01

Decision design

Make objectives, priorities, minimum spends, goal values, reserve and seasonality explicit before solving.

02

Constrained allocation

Allocate across platform-objective cells with diminishing returns and named, auditable LP constraints.

03

Honest uncertainty

Compare conservative, base and optimistic scenarios, with optional Monte Carlo stability testing.

04

Decision interpretation

Surface binding constraints, shadow prices, concentration, risks and a feasible risk-managed alternative.

Who uses CLARO

For anyone who has to defend a budget split.

The common thread is a fixed budget, competing objectives and a decision that will be questioned.

Marketing and media planners

Split a fixed quarterly or campaign budget across platforms and objectives, and produce a plan that survives being questioned by finance.

Analytics and marketing science teams

Replace spreadsheet heuristics with a reproducible LP model whose assumptions, constraints and shadow prices are all inspectable.

Agencies and consultants

Show a client not only the recommended allocation but the constraint that stopped it going further, and a risk-managed alternative plan.

Researchers and students

Use a documented, tested, citable operations-research application of linear programming to a real marketing decision problem.

Example use case

Allocating a £120,000 quarterly budget.

A B2B software company has £120,000 for one quarter, split across lead generation, website traffic and awareness. Sales need at least 400 qualified leads. Brand require a minimum of £15,000 on awareness. LinkedIn has only 21 days of history, so its cost-per-lead estimate is unreliable.

  1. 01

    Declare

    Enter the £120,000 budget, the three objectives, a £15,000 awareness floor, a 10% test-and-learn reserve, and a goal value of £200 per qualified lead.

  2. 02

    Measure

    Upload platform CSV exports. CLARO composes canonical KPI counts and shrinks LinkedIn's 21-day productivity toward the cross-platform mean rather than trusting it outright.

  3. 03

    Optimise

    The LP maximises weighted productivity subject to every declared constraint, with diminishing-returns brackets stopping any single cell from absorbing the plan.

  4. 04

    Interpret

    The awareness floor is reported as binding with a shadow price, showing exactly what the brand minimum costs in forecast leads — and a Plan B is produced with less concentration risk.

Try this in the optimiser

What you get

A recommendation, its logic and its limits.

CLARO preserves the distinction between model output and managerial judgement. Every result carries the assumptions and caveats needed to assess it.

Read the project wiki
01

Platform-objective allocation

02

Three-scenario comparison

03

Data-driven forecast bands

04

Binding constraints and shadow prices

05

Diagnostic index and classification

06

Plan A and risk-managed Plan B

07

PDF and Excel decision artefacts

Frequently asked questions

Common questions about CLARO.

Is there an open-source tool for constrained marketing budget optimisation?

Yes. CLARO is a free, MIT-licensed, open-source decision-support tool that allocates a limited marketing budget across platforms and objectives under explicit constraints, using linear programming. The Python engine installs with pip install claro-engine, the source is on GitHub, and a hosted browser version runs with no installation.

How does CLARO decide how much budget each platform gets?

CLARO builds a linear program over platform-objective cells. It maximises weighted KPI productivity subject to the constraints you declare — total budget, per-platform minimum spend, per-objective minimums, a test-and-learn reserve and seasonality multipliers — with diminishing-returns brackets so no single cell absorbs the entire plan. The solver is PuLP with the CBC backend.

What data does CLARO need to run?

Historical performance exports from your advertising platforms as CSV files, plus your budget, objectives and constraints. CLARO parses the standard exports from twelve platforms, detects encoding and delimiter automatically, and composes each platform's raw columns into canonical KPI counts with a documented rationale for what is included and excluded.

Does CLARO connect directly to advertising platform APIs?

No. CLARO works from CSV exports and does not operate campaigns, place bids or connect to advertising APIs. It also does not estimate causal incrementality — it optimises against the KPI data you supply and inherits that data's strengths and biases. These boundaries are stated deliberately as part of the method.

Can I use CLARO without writing code?

Yes. The hosted Streamlit application provides a guided wizard covering every input the optimiser needs, and returns the allocation, scenario comparison, binding constraints and downloadable PDF and Excel artefacts. Python users can instead install the engine directly with pip install claro-engine.

Is CLARO free for commercial use?

Yes. CLARO is released under the MIT licence, which permits commercial use, modification and redistribution, subject to retaining the copyright and licence notice.

How do I cite CLARO?

Cite the peer-reviewed SoftwareX paper: Rezvanjoo, H. (2026). CLARO: Constrained budget allocation with rule-based decision interpretation. SoftwareX, 35, 102935. DOI 10.1016/j.softx.2026.102935. For a specific software release, use the corresponding Zenodo DOI.

Evidence and reproducibility

Open enough to inspect. Tested enough to challenge.

How to cite CLARO

Peer-reviewed paper
Rezvanjoo, H. (2026). CLARO: Constrained budget allocation with rule-based decision interpretation. SoftwareX, 35, 102935. doi:10.1016/j.softx.2026.102935

Software release
Hoda Rezvanjoo. CLARO: Constrained Linear Allocation and Resource Optimiser — a Decision-Support Framework for Marketing Budget Allocation. Version 0.2.1. Zenodo. doi:10.5281/zenodo.21230206

Scope matters

Decision support, without pretending the model knows more than it does.

CLARO allocates at platform-objective level. It does not operate campaigns, connect directly to advertising APIs or estimate causal incrementality.

It inherits the strengths and biases in the KPI data supplied. That boundary is stated because a useful model should make its limits as visible as its outputs.

Start with the decision structure

Make the trade-offs visible.

Run the guided optimiser in your browser, or install the engine and inspect the full open-source method.