Mandi Arrival and Price Forecasting with Sell-or-Store Advice for Farmers
Farmers often sell right after harvest when wholesale market (mandi) prices are lowest. Build forecasts of arrivals and prices for a few crops at nearby markets from public government data, and turn them into simple advice: sell now, or store for a few weeks, after storage costs and losses. Test the advice by replaying past seasons and measuring how often it would have helped.
Intermediate
A small team, or one strong student willing to learn something new.1 semester · 2 students
7 to ship
4 optional extrasSuggested stack
What you should ship
- A data pipeline that collects and cleans daily or weekly market arrival and price data for 3 to 5 crops from a public source such as Agmarknet or official price bulletins
- Baselines: last week's price and the same week last year
- Forecasting models for price 1 to 8 weeks ahead, using arrivals, season and nearby markets
- Prediction intervals, not just point forecasts
- A sell-or-store rule that accounts for storage cost, weight loss and interest
- A backtest over several past seasons showing gain or loss from following the advice
- A simple dashboard and weekly message in a local language
If you have time left
- Spatial advice: whether a nearby market is worth the transport
- Using weather or sowing area data as extra inputs
- A farmer group view for collective selling
- Comparing forecasting accuracy across markets of different sizes
The problem: everyone sells in the same week
Potato, onion, tomato and wheat prices at wholesale markets swing widely through the year. At harvest, arrivals spike and prices fall. Farmers with debts, no storage and no information sell then anyway. Traders with storage and better information buy cheap and sell later. A farmer who knew whether prices were likely to rise enough to cover storage costs could make a better choice, or at least a more informed one.
What already exists and the gap
- Agmarknet, run by India's agriculture ministry, publishes daily arrivals and prices from thousands of markets, and the data is available through India's Open Government Data platform.
- eNAM, India's electronic national agriculture market, lets farmers sell across markets online.
- Pakistan's statistics bureau publishes weekly price indicators, and provincial market committees publish rates.
Data is available. The gap is turning it into honest forecasts for a specific crop and market, with uncertainty, and a decision the farmer can use.
Inspiration
The M5 forecasting competition (Makridakis, Spiliotis and Assimakopoulos, International Journal of Forecasting, 2022) compared many methods on real retail sales and found that simple baselines are hard to beat and that gradient boosted trees work well with good features. India's Operation Greens programme for tomato, onion and potato shows that price volatility for these crops is treated as a national problem.
What you build
- Farmers and farmer groups get a weekly message: expected price range in 4 weeks, and whether storing is likely to pay off.
- Extension workers and cooperatives see a dashboard by crop and market.
- Analysts get a clean, reproducible dataset and backtest.
The technically interesting part
- Dirty public data. Expect missing days, duplicate entries, unit changes and outliers. Document every cleaning step.
- Forecasting honestly. Use time-based splits and compare against naive baselines. A model that does not beat "same week last year" is not useful.
- From forecast to decision. Storage costs, weight loss and the farmer's need for cash all matter. Show how the advice changes with these inputs.
- Uncertainty. A forecast without an interval invites overconfidence.
How to evaluate it
- Forecast error at each horizon compared with naive baselines.
- Interval coverage: how often the actual price falls inside the predicted range.
- Backtest: average gain or loss per quintal from following the advice in past seasons, and the worst season.
- Readability: a short test of whether people understand the weekly message.
Suggested plan
- Weeks 1 to 3: choose crops and markets, collect and clean data.
- Weeks 4 to 7: baselines and forecasting models.
- Weeks 8 to 10: intervals and the sell-or-store rule.
- Weeks 11 to 13: backtest and dashboard.
- Weeks 14 to 15: report and demo.
Path to a product
Agritech startups, warehouse receipt providers and lenders that finance stored crops all need price outlooks. A tested forecasting service, sold to these businesses rather than directly to farmers, is a realistic route. The project is strong evidence for data science and analytics roles.
Scope warning
Do not present forecasts as guarantees. Use only published data, respect each site's terms and prefer official downloads or APIs. Keep to a few crops and markets.
Learn what you need on Sefism
- Data science roadmap: forecasting and evaluation.
- Data analytics roadmap: cleaning data and building the dashboard.
- Open Government Data Platform India: market price datasets.
- Pakistan Bureau of Statistics: official price data for Pakistan.
- statsmodels documentation: time series baselines.
- DuckDB documentation: fast local analysis of the price history.
Get help with this idea
It is easy to build a model that looks accurate because of leakage. Tauseef can help you set up time-based backtests and a decision rule you can defend. If you are new here, create a free account first.
Ideas and guidance, not finished projects
These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.
Not sure this one fits you?
I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.