Pricing · Economics · Data Science

From wholesale market signals to governed pricing decisions.

I designed and built an end-to-end Pricing Intelligence system from nine years of Chinese wholesale vegetable prices. It measures market position, forms price expectations, screens cost risk, and evaluates sourcing scenarios—while refusing to release claims that fail their evidence gate.

Data-free public view Historical cutoff: 2022-06-22 No automated pricing
8.68Mmarket price recordsauditable raw-to-gold lineage
117citiescity-day two-level medians
30vegetables10 in formal modeling scope
47.6%apparent relationships removedafter common-factor control

Frozen out-of-sample evidence

Performance is shown against the decision rule.

These visuals use model-card aggregates already disclosed in the repository. No city-, product-, or date-level price observations are included in the public package.

01

P2 · Forecast

Forecast release by horizon

Each bar contains ten frozen product–horizon decisions. The 14/28-day horizons are the formal MVP decision focus; 7 days remains a stress test.

Baseline fallback Point model Minimum + interval Target + interval

Reading: 7 days averaged −4.24% relative WAPE improvement and fell back for 8/10 products. At 14 and 28 days, 9/10 products released model points, supporting the 14/28-day product focus without hiding the failed short-horizon test.

02

P3 · Alert

Alert stability: validation → final

The action threshold was frozen on validation. Final test measures drift without selecting a new threshold.

Alert metric stability from validation to final test Average precision rises from 21.28 to 22.04 percent. Recall falls from 42.15 to 37.69 percent. False positive rate remains near its 10 percent budget, moving from 9.96 to 9.99 percent. 50% 25% 0% Validation Final test 10% FPR budget
Recall 42.15 → 37.69% Average precision 21.28 → 22.04% FPR 9.96 → 9.99%

Reading: ranking quality holds, recall softens, and the false-positive constraint remains reproducible.

03

P5 · Methodological win

How controls stopped 99.9% of candidates from becoming claims

The method wins when the product refuses a dense, non-replicating network. Two distinct checks prevent shared movement and multiple testing from masquerading as city-to-city information.

01 · Confound check Remove shared market movement
02 · Direction claim gate Require incremental, out-of-sample value
  1. 2,736predeclared geographic candidates
  2. 991estimable pairs
  3. 174raw train-significant
  4. 51after product BH-FDR
  5. 15validation + stability frozen
  6. 4positive final-test gains
26.7% positive vs 70% gate −1.39% median RMSE uplift vs +1% gate
Governance decisionWithhold the network

0directional edges released

common_shock_only · common movement and city exposure remain available for human review

Why it matters: without common-shock control and product-level multiple-testing discipline, more than a thousand apparent relationships could have looked like a successful network. The sealed final test showed they were not shippable directional evidence.

Visual evidence only · Frozen historical evaluation · No row-level price data

Decision chain

Every stage earns a product state.

The project starts with the user decision and available information set, then chooses the simplest method that can clear a predeclared evidence bar.

P0

Data release

Can these prices be compared?

Versioned market mapping, quality flags, coverage tiers, and two-level aggregation create auditable market and city facts.

P1

Historical

Where is price relative to peers and season?

Trends, rankings, dispersion, seasonality, and source reliability support historical market benchmarking.

P2

Partial release

Does forecasting beat a simple rule?

Rolling-origin 7/14/28-day tests improved overall WAPE by 6.30%. The product focuses on 14/28 days; 7 days remains a disclosed stress test with frozen fallbacks.

P3

Alert release

Is a price increase worth reviewing?

A validation-frozen threshold achieved 37.69% recall at 9.99% FPR. Alerts open a review queue; they never change prices.

P4

Scenario release

Does a low quote survive economic friction?

Risk-adjusted landed cost and 36 transport, loss, and risk scenarios identify cities worth requesting a quote from.

P5

Network no-go

Can an apparent network survive confound and replication tests?

Common-factor control removed 47.60% of contemporaneous FDR relationships; sealed final testing then rejected the directional claim. Withholding the network is the result.

Evidence before sophistication

The strongest result is knowing when not to release.

Statistical significance, an attractive chart, or average improvement does not automatically become a product feature. Baselines, false-action cost, uncertainty, and replication determine the release state.

Confound control1,481 → 776

47.6% of apparent synchrony removed

Replication gate15 → 4

only 26.7% showed positive final gain

0 shippedNetwork withheld; common-shock evidence retained.

Strong counterfactuals

Last price, weekly pattern, seasonality, and target-history baselines remain visible when the advanced model loses.

Asymmetric error cost

P3 freezes its action threshold under a 10% false-positive-rate budget and discloses precision of 21.31%.

Sensitivity over point estimates

P4 separates the cheapest modeled option from a source that remains stable across 36 parameter combinations.

Negative results are product results

P5 uses common-shock control, product-level BH-FDR and sealed final testing to stop an attractive but non-replicating network from shipping.

Economics in the implementation

Economic reasoning changes the product behavior.

This is not an economics label added after modeling. The mechanisms determine aggregation, baselines, constraints, uncertainty, and which actions the interface permits.

01

Price dispersion & measurement

Market composition and sparse observations can imitate economic differences, so quality and coverage enter before comparison.

02

Expectations & uncertainty

Forecasts are evaluated against what was knowable at the time; points, intervals, and baselines receive separate release decisions.

03

Transaction costs & risk

A lower observed price is actionable only after distance, transport, loss, reliability, and uncertainty are applied consistently.

04

Common shocks & identification

National supply and seasonal movement compete with propagation stories; without causal identification, the system makes no causal claim.

Pricing workflow interface

Complementary to a Pricing Engine—not a competing engine.

This project supplies governed evidence upstream. A production Pricing Engine still owns the executable decision.

Pricing Intelligence supplies

  • market benchmark and reliability
  • model, baseline, or no-go status
  • price-risk review trigger
  • risk-adjusted cost scenario
  • common-shock exposure

Pricing Engine combines

  • current cost and inventory
  • customer and contract terms
  • demand response and margin floor
  • commercial rules and approval

Then—and only then—produce an executable price.

What I built

Research discipline translated into product engineering.

One repository connects data lineage, temporal evaluation, model governance, decision interfaces, six web routes, career-ready documentation, and code-only continuous integration.

Data & analytics

Python · pandas · NumPy · PyArrow · SciPy · Parquet · versioned marts

Model evaluation

Rolling-origin backtests · conformal intervals · logistic risk ranking · BH-FDR · block bootstrap · sealed final tests

Product & quality

React · Vinext · TypeScript · Recharts · responsive UI · 178 tests · lint · GitHub Actions

Production boundary

What this evidence does—and does not—support.

Supported

  • Historical market benchmarking
  • Qualified out-of-sample forecast slices
  • Manual risk-review prioritization
  • Parameter-dependent sourcing inquiry
  • Common-shock exposure analysis

Not supported

  • Current or real-time recommendations
  • Demand elasticity or willingness to pay
  • Optimal retail price or realized savings
  • Supplier capacity or executable orders
  • Causal price propagation

中文摘要

这是 Pricing Engine 的上游情报层,而不是另一套自动定价引擎。

项目把批发市场数据转化为历史基准、价格预期、风险复核、采购成本情景和共同冲击证据。最终价格仍由现有 Pricing Engine 结合库存、客户、合同、利润和审批规则决定。数据截至 2022-06-22,所有公开页面均不包含原始或派生数据。

Portfolio takeaway

I build models that know when to become products—and when not to.

Explore the repository