About StockMind

Inventory Markdown Recommendation Engine

What is StockMind?

StockMind is an intelligent promotion recommendation engine that analyzes your inventory to identify distressed SKUs and suggests optimal markdown strategies. It balances the need to move inventory quickly while protecting profit margins.

🎯

Smart Targeting

Identifies non-moving, aging, and at-risk inventory

📊

Data-Driven

Uses sales velocity, storage costs, and decay risk

💰

Margin Protection

Recommends minimum discount needed to move stock

How It Works

1

Distress Scoring

Each SKU receives a distress score (0-1) based on 6 weighted factors:

Non-Moving (25%): Days since last sale
Overstock (20%): Days of cover vs threshold
Aging (20%): Inventory age in days
Decay (15%): Age vs shelf life ratio
Storage (10%): Physical storage burden
Demand Weak (10%): Recent velocity decline
2

Baseline Forecast

Estimates expected 30-day demand without promotion using weighted moving average of recent sales history.

3

Promotion Simulation

For each distressed SKU, tests all discount levels and calculates:

  • Expected units sold (baseline × uplift factor)
  • Expected margin (discounted price - cost) × units
  • Holding cost avoided (saved storage fees)
  • Waste avoided (prevented decay/spoilage)
  • Leftover penalty (remaining stock risk)
4

Business Guard Rails

Before recommending, applies safety checks:

  • Skip SKUs below distress threshold
  • Don't promote low-stock items
  • Respect minimum margin floor
  • Cap discount at 20%
5

Final Recommendation

Selects the discount level with the highest action score (maximizes margin while moving inventory).

🔄 Returns Management

StockMind treats returned inventory as liability requiring urgent action. The principle: "No product back to attic" — returns must move fast.

⚠️ Return Economics

  • Sunk Costs: Processing ($2-15/unit) already paid
  • Lower Natural Demand: 30-90% reduced baseline (customer stigma)
  • Higher Holding Risk: 2× leftover penalty vs. new items
  • No Reverse Logistics: Can't return to warehouse

Multi-Path Promotion Strategy

Inventory Type Distress Threshold Discount Range Strategy
NEW 0.55 (standard) 0%, 5%, 10%, 15%, 20% Standard clearance
RETURN: GOOD 0.45 (lower) 5%, 10%, 15%, 20%, 25% Aggressive pricing
RETURN: OPENED 0.35 (aggressive) 10%, 15%, 20%, 25%, 30% Fast clearance
RETURN: DAMAGED 0.25 (urgent) 15%, 20%, 25%, 30%, 35% Emergency clearance

📊 Typical Results

New Items:
~7% promotion rate
Returned Items:
100% promotion rate
Avg Discount (New):
1-5%
Avg Discount (Damaged):
15-25%

Discount Ladder (New Items)

For new inventory, StockMind tests 5 fixed discount levels:

Discount Expected Uplift Use Case
0% 1.00x (baseline) Healthy inventory, no action needed
5% 1.08x (+8%) Gentle nudge for slow movers
10% 1.18x (+18%) Moderate promotion for at-risk stock
15% 1.32x (+32%) Aggressive clearance for aging inventory
20% 1.50x (+50%) Maximum discount for urgent clearance

Configurable Parameters

Tune the engine to match your business requirements:

Distress Threshold (default: 0.55)

Minimum distress score to consider for promotion. Higher = more selective.

Minimum Margin (default: 0.15)

Minimum acceptable gross margin percentage. Prevents unprofitable discounts.

Low Stock Threshold (default: 0.75)

Don't promote if inventory is below this multiple of baseline demand.

Distress Weight Sliders

Adjust relative importance of each distress factor. Must sum to 1.0.

Technology Stack

FastAPI
Web Framework
HTMX
Dynamic UI
DuckDB
Analytics Database
Polars
Data Processing
Chart.js
Visualizations
Alpine.js
Interactivity
Tailwind CSS
Styling
Python 3.12
Runtime

Process Flow Diagram

Inventory Data
Distress Scoring
6 weighted factors
Baseline Forecast
30-day demand estimate
Promotion Simulation
Test 5 discount levels
Guard Rails
Business rules validation
Optimal Recommendation

Note: This is a proof-of-concept (POC) deployment optimized for a 1GB server. The engine analyzes up to 200 SKUs per run. For production use with larger datasets, consider upgrading to at least a 2GB server.