Skip to main content

What is pricing simulation? How does it help?

Problem: Businesses struggle to find optimal pricing that maximizes revenue. Traditional methods rely on gut feeling, often leading to suboptimal pricing that either leaves money on the table or drives away customers. Our approach: We show how businesses can use Synthefy’s AI-powered forecasting to simulate different price points and automatically identify the optimal pricing strategy. Outcome: In this example, our models show a potential revenue increase of 9% by finding the optimal price point that balances demand and profitability.

1. Load Historical Sales Data

This dataset comes from a Fortune 500 company that sells a popular health product in a pharmacy. We’ll use their real sales and pricing history to uncover how data can drive smarter, more profitable pricing decisions.
Data Format: Your CSV should have columns like date, unit_price, and sales. The future_df represents the time periods you want to forecast for (without the sales column filled in yet).

2: Visualize Historical Data

Before running simulations, it’s important to understand your historical data. Let’s create visualizations to see how price and sales have changed over time, and whether there’s a correlation.
The time series plot shows trends over time, while the correlation plot reveals if there’s a linear relationship between price and demand. A negative correlation suggests demand decreases as price increases (price sensitivity).

Example Output: Historical Data Analysis

Historical Pricing Data Analysis The visualizations above show:
  • Top panels: How unit price and sales volume have varied over 2 years of weekly data
  • Bottom panel: A clear negative correlation (-0.64) between price and sales, confirming price sensitivity

Step 3: Set Up Pricing Simulation

Now, let’s define the range of prices we want to test. We’ll create a range of 11 price points ranging from 85% to 115% of your historical average price. We’ll call this the “base” price, and use it as a basline for comparison.
Adjust the range: You can modify the 0.85 and 1.15 multipliers to test a wider or narrower price range. For example, use 0.7 and 1.3 to test 70% to 130% of the base price.

Step 4: Prepare Data for Forecasting

For each price point, we need to create a separate forecast scenario. We’ll duplicate the future DataFrame and modify the unit_price column for each scenario.

Step 5: Run AI Forecasts

Key parameters:
  • metadata_cols=["unit_price"]: Features the model can use
  • leak_cols=["unit_price"]: Features that are known in advance (price is controllable)

Step 6: Create Time Series Forecast Visualization

First, let’s create a comprehensive time series visualization that shows all forecast scenarios overlaid on the historical data.

Example Output: Time Series Forecast Visualization

Time Series Forecast Visualization This comprehensive visualization shows:
  • Black line: Historical sales data (last 50% for focus)
  • Orange gradient lines: All forecast scenarios for different prices
  • Light blue background: Highlights the forecast region
  • Optimal & Base prices: Thicker lines for key scenarios

Step 7: Analyze Results

Extract the forecasts and calculate revenue for each price point. Then identify the optimal price that maximizes revenue.

Step 8: Visualize Pricing Insights

Finally, let’s create comprehensive visualizations to understand the price-demand relationship and identify the optimal pricing strategy.

Example Output: Pricing Simulation Results

Plot 1: Price vs Sales Analysis

Price vs Sales Analysis

Plot 2: Price vs Revenue Optimization

Price vs Revenue Optimization

Plot 3: Revenue Comparison

Revenue Comparison Now you can answer critical business questions:
  1. How price-sensitive are my customers? → Look at Plot 1 (steeper slope = more sensitivity)
  2. What’s my optimal price? → Look at Plot 2 (green marker)
  3. How much revenue am I leaving on the table? → Look at Plot 3 (red vs green bars)

Complete Code

Here’s the full working example you can run:

Next Steps

  1. Prepare your own data with historical prices and transactions
  2. Run the simulation with different price ranges
  3. Analyze the results to find your optimal price point
Pro tip: Run pricing simulations regularly (monthly or quarterly) as market conditions change. Your optimal price today might not be optimal tomorrow!