Marketing Investment Optimization Platform
Built an enterprise marketing investment planning platform that generates optimized investment recommendationsacross configurable market hierarchies, promotion channels, and time. The solution supports both market-level annual allocation and granular weekly portfolio optimization, enabling planners to design activity-driven campaigns and automatically compute constraint-compliant, analytics-ready investment outputs.
Problem Context
Marketing investment planning requires balancing limited budgets across multiple dimensions such as:
-
Markets: defined as product × region, with client-specific hierarchies
(e.g., brand/sub-brand/category and country/region/continent) -
Channels: TV, radio, print, news, and similar promotion channels
-
Time: week-level planning where investment timing impacts results
-
Planning entities: activities spanning multiple weeks and campaigns combining multiple activities
-
Business rules: constraint bounds and budget policies across levels
​
Manual planning does not scale across these combinations and often results in inconsistent allocations, inefficient ROI, and difficulty enforcing constraints. The platform was designed to provide an explainable, repeatable, and constraint-aware optimization workflow that integrates directly into a user-facing planning application.
My Role
-
Owned implementation of the optimization services powering market-level and portfolio-level planning workflows
-
Worked with engineering and product stakeholders to support configurability across client-specific market structures and constraint requirements
-
Contributed to improving optimization runtime characteristics for practical usage within an application workflow
Architecture & Implementation
The platform was deployed on AWS using a microservice-based architecture, with each service independently hosted on EC2 and integrated via backend APIs.

Market-level optimization executed synchronously via API for fast allocation workloads

Portfolio optimization executed asynchronously using SQS to control throughput for compute-heavy runs
Core components
-
Optimization services (EC2): independent services supporting annual allocation and weekly optimization workflows
-
Service-owned databases (RDS – PostgreSQL): each service maintained an independent database for inputs, constraints, and computed outputs
-
Backend APIs: used by the application to submit planning requests and retrieve results
-
Amazon SQS: used to control throughput for compute-heavy optimization workloads
Service-owned databases helped reduce coupling and prevented interference from concurrent updates across services, improving operational stability.
Execution patterns (sync vs async)
-
Synchronous execution was used for lightweight allocation workflows where results could be returned quickly within an API request-response cycle
-
Asynchronous execution was used for compute-heavy portfolio optimization runs, with SQS enabling controlled request processing and limiting concurrent executions
For asynchronous workflows, the optimization service processed queued requests and called a backend API to persist the results, enabling the application to surface computed outputs through visualizations.
Market-Level Optimization (Annual Allocation)
Objective
​Generate a high-level annual investment allocation across configurable market hierarchies using performance-driven ratios while enforcing planning constraints.
Inputs
-
Markets: product × region definitions (client-configurable, multi-level)
-
Historical financial signals: sales, cost, share, and related performance indicators
-
Historical investments: investment into promotions and events
-
Constraint configuration: minimum and maximum bounds at multiple hierarchy levels
-
Total annual budget: investment to distribute across eligible markets
Approach
The allocator uses a performance-driven ratio method based on a Market Performance Index, producing explainable market-level splits suitable for annual planning.
Constraint behavior was designed for realistic planning workflows:
-
Minimum constraints (where configured) were applied first to ensure baseline commitments
-
Remaining budget was distributed using ratio-based allocation driven by market performance signals
-
Markets were not forced into additional investment unless implied by the allocation logic and constraint configuration
Budget caps and redistribution
If allocation to a market exceeded a configured budget cap, the excess was redistributed to other eligible markets while maintaining fairness and respecting min/max bounds across the hierarchy.
Output
A constraint-compliant annual allocation plan returned to the application for visualization and planning workflows, including:
-
recommended market-wise investment split
-
allocation shares (%) across market hierarchy levels
-
constraint-adjusted distribution results
Portfolio Optimization (Weekly Planning)
Objective
Produce a weekly investment portfolio optimized for either revenue or profit, spanning multiple markets, channels, activities, and campaigns—while enforcing constraints and accounting for timing effects.
Data & planning structure
The portfolio optimizer works on weekly inputs across markets and channels such as TV/radio/print/news. Planning is performed through:
-
Activities: individual investments spanning multiple weeks for a given channel
-
Campaigns: combinations of activities across channels
-
Markets: multiple client-defined market hierarchies planned simultaneously
Response modeling and timing effects
The optimizer relies on analytics-generated response functions that estimate sales as a function of weekly investment for each market-channel. Profit is derived from predicted sales.
Key characteristics:
-
Response curve followed an ADBUG curve shape with a single maximum, enabling stable marginal ROI behavior
-
Carryover effects were included, where investment in a week impacts subsequent weeks—making the timing of spend a critical decision factor
Constraints supported
Constraints were enforced across multiple planning levels:
-
activity-level min/max
-
channel-level min/max
-
campaign-level min/max
-
market-level min/max
-
total portfolio budget bounds
These constraints ensured outputs remained feasible and directly usable within the planning application.

Workflow where a user-defined planning portfolio and constraints are processed through an iterative optimization loop and returned as an optimized weekly investment plan
Optimization approach (ROI-driven incremental allocation)
At its core, the optimizer distributes budget across market × channel × week decision points derived from activity and campaign planning definitions.
The approach follows an incremental ROI-driven loop:
-
Begin from a minimum feasible plan (based on configured minimums)
-
Compute marginal ROI across eligible decision points
-
Allocate a small budget increment to the highest-ROI point
-
Recalculate ROI and iterate until:
-
maximum bounds are reached, or
-
additional investment provides no marginal improvement (local maxima across candidates)
-
This produces a constraint-compliant optimized portfolio spanning all weeks, markets, and channels.
Output
The optimizer returns an optimized weekly portfolio suitable for application visualization, including:
-
optimal weekly investments across markets and channels
-
aggregated campaign-level and channel-level allocations
-
constraint-compliant final investment plan for downstream planning workflows
Outcome
-
Enabled end-to-end investment planning across both annual market allocation and weekly portfolio optimization
-
Supported configurable planning across client-defined product and region hierarchies
-
Implemented architecture patterns (sync vs async) appropriate for workload characteristics
-
Improved practical usability of weekly optimization through performance-aware design decisions
Key Technologies
-
Cloud: AWS (EC2, SQS)
-
Database: PostgreSQL (RDS)
-
Optimization / Analytics: Python (NumPy), R
-
Architecture: Microservices, backend API integration