Crop price intelligence and sell-timing advisory for Ghanaian smallholder farmers - Ghana AI Innovation Challenge 2026
# FarmSmart Ghana
Crop **price intelligence and sell-timing advisory** for Ghanaian smallholder
farmers, built on real Ghanaian market data for the
Ghana AI Innovation Challenge 2026.
**Live demo:**
farmsmart-ghana.streamlit.a…
Smallholders lose income two ways: they sell at the **wrong time** (dumping at
harvest when prices bottom) and in the **wrong market** (selling locally when a
nearby market pays far more). FarmSmart answers two questions in plain language
(and, in the full build, over USSD/SMS/WhatsApp in local languages):
- **When should I sell?** Seasonal forecasting of storable-staple prices.
- **Where should I sell?** Cross-market price-gap (arbitrage) detection.
## Primary Ghanaian dataset
World Food Programme **Ghana Food Prices**, published on the Humanitarian Data
Exchange (HDX): monthly retail/wholesale prices across Ghanaian markets, in GHS.
The pipeline downloads it automatically via the HDX CKAN API. See
docs/DATA.md for full source disclosure and complementary sources
(MoFA SRID, GSS, FSNMS).
## Results so far (real backtest, fully reproducible)
Data after cleaning: **33,369** per-kg price records, **16 storable staples**,
**19 markets**, **2007-2023**. Backtest = strict time split, test on the last 18
months. Prices normalised to **GHS per kg**; perishables excluded (sell-timing
only helps crops a farmer can store).
Forecast accuracy by horizon (median APE, lower is better):
| Horizon | Naive (random walk) | FarmSmart (LightGBM) |
| --- | --- | --- |
| 1 month | **6.3%** | 12.3% |
| 3 months | **17.1%** | 21.3% |
| 6 months | 28.8% | **27.5%** |
Honest reading: at short horizons the random walk is a strong baseline (prices
are persistent). At the **6-month horizon - the one that matters for storage and
sell-timing decisions - FarmSmart beats both naive baselines on every error
metric** (MdAPE, MAPE, MAE, RMSE) and beats naive on 53% of individual forecasts.
Full metrics and the insight tables are in results/
(`metrics.csv …