Marketing Budget Reallocation Optimizer
By Adam Weinroth
Every quarter, your marketing team debates where to shift budget — but the decisions are driven by gut feel instead of data. You have channel performance data scattered across platforms, and building a proper budget optimization model in a spreadsheet would take your ops team a week. You need to quickly analyze spend vs. performance across all channels and generate data-backed reallocation recommendations.
Estimated Time Savings
8 hours
saved per use
Why this tool?
Claude Code can write and execute Python scripts that process your data, build optimization models, and generate professional visualizations — all in one conversation. No need to context-switch between an AI chat and a coding environment.
Step-by-step workflow
- 01
Export last quarter's spend and performance data from each marketing channel (Google Ads, Meta, LinkedIn, email, content, events, etc.) into a single CSV with columns for channel, spend, leads, opportunities, revenue, and conversion rates.
- 02
Ask Claude Code to write a Python script that calculates CAC, ROI, and cost-per-opportunity for each channel, then visualizes performance in a scatter plot.
- 03
Have Claude Code build a budget optimization model that simulates different allocation scenarios based on diminishing returns curves for each channel.
- 04
Run the script to generate a recommended reallocation plan with projected impact on pipeline and revenue.
- 05
Export the charts and recommendation summary as a presentation-ready report for your CFO or VP of Marketing.
Example prompts
I have a CSV with our Q4 marketing spend and performance data across 8 channels. Columns: channel, spend, impressions, clicks, leads, MQLs, opportunities, closed_won_revenue. Please write a Python script that: (1) Calculates CAC, ROAS, cost-per-lead, cost-per-opportunity, and lead-to-close rate for each channel, (2) Creates visualizations: a quadrant scatter plot (CAC vs. volume), a waterfall chart of current vs. recommended budget, and a channel efficiency ranking, (3) Builds a simple optimization model that reallocates our total budget to maximize projected pipeline, assuming diminishing returns, (4) Outputs a summary table showing current spend, recommended spend, delta, and projected impact for each channel.
What to expect
A working Python script that processes your channel data and produces: (1) Performance metrics table with CAC, ROAS, and conversion rates per channel, (2) Three publication-quality charts — efficiency quadrant, budget waterfall, and channel ranking, (3) An optimized budget allocation table showing where to increase and decrease spend, with projected pipeline lift. The script runs locally on your data and can be re-used each quarter.
Keep Exploring
Related recipes
Multi-Channel Campaign Planning Workshop
ABy Anthro Marketing
You're kicking off a product launch and need to coordinate messaging across email, paid social, organic content, webinars, and sales enablement.
The Pre-Meeting Intel Brief
By Adam Sandler
Most pre-call research is surface-level, you skim LinkedIn, maybe Google the company, and hope something useful comes up. This recipe gives you a structured briefing in under two minutes: who the person is, what the company is actually doing right now, likely priorities and pain points, and the questions worth asking. It's the difference between a cold conversation and one where you already know what matters to them.
Positioning Workshop
By Jennifer Prishtina
Many companies skip positioning entirely or cobble together a vague statement that could describe any product in their category. This prompt runs founders or marketers through a structured workshop that pressure-tests each component of the Gartner format individually — forcing specificity at every step — before assembling the final statement. The result is a positioning statement that's actually defensible and differentiating, not just a mad-lib filled with corporate filler.