The optimizer is a constrained allocation model. It first estimates a platform-level
utility score from performance signals, then converts those scores into target budget
shares. Execution is intentionally conservative: budget only moves when the target/current
drift is large enough, and every move is capped, friction-adjusted, and smoothed.
Algorithm Pipeline
1
Normalize Signals
Convert spend, revenue, CTR, CVR, CPA, and ROAS into comparable platform features.
2
Estimate Utility
Blend performance, confidence, priors, and exploration into a decision score.
3
Solve Target Mix
Transform scores into constrained budget shares using softmax, floors, and caps.
4
Execute Delta
Move only the bounded, capacity-safe fraction of the target/current allocation gap.
Performance Score
ROAS_p = revenue_p / spend_p
CVR_p = conversions_p / clicks_p
CTR_p = clicks_p / impressions_p
CPA_p = spend_p / conversions_p
score_p =
0.45 * norm(ROAS_p)
+ 0.25 * norm(CVR_p)
+ 0.15 * norm(CTR_p)
- 0.15 * norm(CPA_p)
Confidence Adjustment
confidence_p =
min(1, 0.12 * ln(1 + impressions_p)
+ 0.25 * ln(1 + conversions_p))
decision_score_p =
confidence_p * score_p
+ (1 - confidence_p) * prior
+ exploration_bonus_p
Target Allocation
raw_target_p = softmax(decision_score_p / temperature)
target_p = clamp(raw_target_p, min_allocation, max_allocation)
Execution Rule
delta_p = target_p - current_p
maxDrift = max(abs(delta_p))
if maxDrift < 5 percentage points:
hold current allocation
else:
move toward target with max-step cap,
friction, and smoothing
Delta-Style Rebalancing
Delta-style rebalancing treats the campaign budget as one unified pool with soft
platform partitions. Each platform has a current share, a performance-implied target
share, and a signed delta. Positive delta means the platform is under-allocated relative
to expected return; negative delta means the platform is over-allocated and should
contribute budget back to the shared pool.
delta_p = target_allocation_p - current_allocation_p
if max(abs(delta_p)) < threshold:
keep current allocation
else:
next_allocation_p =
current_allocation_p
+ smoothing * friction * capped(delta_p)
The important idea is not just thresholding. Delta-style execution separates allocation
intelligence from allocation movement: the scoring layer estimates where the next budget
equilibrium should be, while the execution layer determines how much of the deficit or
surplus can be safely resolved in the next cycle.
Capacity-Aware Movement
capacity_p =
f(spend_velocity_p,
delivery_stability_p,
audience_saturation_p,
creative_fatigue_p)
executed_delta_p =
capped(delta_p)
* smoothing
* friction(maxDrift)
* capacity_p
This prevents a high-scoring platform from receiving budget faster than its auction,
audience, and learning system can absorb. In other words, the optimizer maximizes
marginal return subject to delivery capacity, movement cost, and allocation bounds.
Academic Interpretation
Formally, each rebalance cycle solves a constrained stochastic allocation problem over
the platform set P. The objective is to maximize expected incremental utility while
controlling estimation uncertainty, pacing risk, and the market impact of budget changes.
maximize sum_p expected_utility_p(allocation_p)
subject to sum_p allocation_p = 1
min_p <= allocation_p <= max_p
|allocation_p(t+1) - allocation_p(t)| <= step_cap_p
maxDrift >= rebalance_threshold
U_p =
alpha * normalized_roas_p
+ beta * normalized_cvr_p
+ gamma * normalized_ctr_p
- eta * normalized_cpa_p
+ kappa * exploration_bonus_p
allocation*(t) =
argmax_allocation sum_p U_p * allocation_p
- lambda * movement_cost(allocation_p, allocation_p(t-1))
The model behaves like a constrained dynamic allocator: it searches for the target
distribution with the highest expected utility, then converges toward that distribution
through bounded, explainable budget transfers. This makes the demo more than a ranking
dashboard; it becomes a controlled allocation engine.