Organizational Setting
The Markets and Trade Division (EST) monitors and analyses developments and trends in international, regional and national agricultural commodity markets and the factors affecting them, collecting and disseminating up-to-date and comprehensive market and policy information for the major traded commodities and those important to food security. It also undertakes forward-looking outlook studies. The Division analyses issues that affect global food and agricultural markets and trade, including analysis of trade policies and agreements, and provides technical support and capacity development to FAO Members in all these areas. Through its Global Information and Early Warning System on Food and Agriculture (GIEWS), the Division is responsible for FAO's early warnings on food shortfalls and food security problems. EST is also responsible for the production of FAO flagship publication The State of Agricultural Commodity Markets (SOCO) and the OECD-FAO Agricultural Outlook. The Division houses the secretariats of the Committee on Commodity Problems (CCP) and its subsidiary Intergovernmental Groups (IGGs), the G20 Agricultural Market Information System (AMIS) and the World Banana Forum (WBF).
The Medium‑term Outlook and Market Analyses Team (MTO) of FAO’s Markets and Trade Division (EST) is responsible for producing forward‑looking assessments of global agricultural markets, with a focus on medium‑term supply, demand, trade and price developments. The team develops and applies quantitative modelling frameworks—most notably the COSIMO economic model—to generate consistent market outlooks and scenario analyses that inform publications such as the OECD‑FAO Agricultural Outlook, and policy‑relevant analytical work. Through close collaboration with internal FAO units and external partners, MTO supports evidence‑based policy dialogue by analysing structural trends, market risks and uncertainties, and the implications of policy, macroeconomic and demographic drivers for global and regional agri‑food systems.
Reporting Lines
The Consultant/PSA will report directly to the Senior Economist/Team Leader of the Medium‑term Outlook and Market Analyses Team (MTO) in EST.
Technical Focus
Specific areas of technical support include: model architecture review & redesign; codebase migration (TROLL → GAMS); computational glue & workflow orchestration (Python), analytics; visualization & reporting (R / Python); data governance & metadata; scenario engine & uncertainty; documentation & knowledge transfer; governance & quality assurance.
Tasks and responsibilities
The generic functions for the profile include, but are not limited to, the following:
• Review the current structure of EST’s and NFI’s TROLL-based forward-looking simulation models (blocks, behavioural equations, closures, data flows) and identify technical debt, redundancies, and inefficiencies.
• Propose a modular architecture for these models that is optimized for GAMS and separates data, parameters, equations, solution strategy, and reporting.
• Translate TROLL syntax and procedures into GAMS models (core equilibrium/partial equilibrium blocks, calibration routines, closure rules).
• Standardize sets, mappings, aliases, and equation naming conventions; implement robust solve sequences and scenario switches.
• Optimize for performance (domain restriction, sparse sets, conditional execution) and numerical stability (scaling, bounds, initial levels).
• Build Python utilities to orchestrate end‑to‑end runs: environment setup, scenario queueing, parameter sweeps, batch execution, and job monitoring (local/HPC).
• Implement data ingestion and validation pipelines (CSV/Excel/DB → tidy model input), and post‑processing (solution parsing, consistency checks, generation of standardized outputs).
• Package utilities with CLI entry points, config files (YAML/JSON), and logging; design for reproducibility and portability (conda/venv, pip‑tools).
• Develop R (and/or Python) notebooks and functions for time‑series diagnostics, decomposition (e.g., contributions to growth), policy shocks vs counterfactuals, and publication‑quality charts/tables consistent with FAO styles.
• Provide scripted pipelines to generate standard outputs for the OECD‑FAO Agricultural Outlook, and ad‑hoc scenario studies.
• Create a scenario manager to vary macro paths (GDP, population, exchange rates), policies (tariffs, TRQs, biofuel mandates), technology trends, and shocks (weather, animal disease).
• Profile and optimize hot spots (GAMS model size, equation density, I/O bottlenecks).
• Set up CI/CD for models and utilities (GitHub/GitLab CI), including unit tests for data, parameters, and equation blocks.
• Prepare containerized environments (Docker) and optional HPC submission templates (SLURM/LSF), ensuring reproducible builds.
• Produce a Developer Guide (architecture, coding standards, runbook), User Guide (how to configure and run scenarios), and Methodological Note (theory, equations, closures, calibration).
• Deliver hands on training sessions for FAO staff on GAMS modeling, Python orchestration, and R/Python analytics workflows.
• Define a change control process (versioning, peer review, release tags), a model registry (baselines, scenarios, result bundles), and a ticketing workflow for bugs/features.
• Establish KPIs for the modernized system: runtime targets, convergence rates, reproducibility scores, documentation coverage, and automated test pass rates.
• Carry out any technical work as required by the MTO team.
CANDIDATES WILL BE ASSESSED AGAINST THE FOLLOWING
Minimum Requirements
• For Consultants:
Advanced university degree from an institution recognized by the International Association of Universities (IAU)/UNESCO in Economics, Applied Econometrics, Agricultural Economics, Operations Research, Industrial Engineering, Computer Science, Data Science, or closely related field. Consultants with a bachelor's degree need two additional years of relevant professional experience.
For PSAs:
University degree from an institution recognized by the International Association of Universities (IAU)/UNESCO in Economics, Applied Econometrics, Agricultural Economics, Operations Research, Industrial Engineering, Computer Science, Data Science, or closely related field.
• At least 5 years of professional experience with large quantitative models used for market/outlook or policy analysis
• Working knowledge of English
FAO Core Competencies
• Results Focus
• Teamwork
• Communication
• Building Effective Relationships
• Knowledge Sharing and Continuous Improvement
Technical/Functional Skills
• Migration: projects migrating models or analytics pipelines from legacy languages/platforms into modern, modular stacks (e.g., GAMS Python; Python R).
• GAMS experience: building and solving medium‑to‑large models with modular set/alias structures, scenario switching, and calibration routines.
• Python/R experience: for workflow orchestration, data engineering, packaging, analytics and publication‑grade visualization (ggplot2, seaborn, matplotlib, plotnine).
• Practical experience in designing data schemas, metadata, and validation (e.g., pydantic, Great Expectations, frictionless data), building versioned datasets/parameters for modelling.
• Setting up GitHub/GitLab CI, unit/regression tests for data, parameters, and equation blocks, and artifact storage.
• Proven ability to package workloads in Docker/Singularity, and to submit jobs on SLURM/LSF with resource requests, array jobs, and logs/exit‑code handling.
• Demonstrated record of producing Developer/User/Methods guides and delivering hands‑on training to non‑developer analysts.
Selection Criteria
• Advanced GAMS modelling (large scale economic or energy/agri market models).
• Strong Python for workflow engineering; R/Python for analytics & visualization.
• Experience with model migration and legacy code refactoring.
• Familiarity with agricultural market economics, partial/recursive dynamic equilibrium, and policy scenario analysis.
• Solid software engineering practices (Git, testing, packaging, CI/CD, containers).
• Extent of experience in migrating legacy modelling systems (e.g., TROLL or similar) to modern stacks using GAMS, Python, and R for orchestration and reporting
• Experience in economic market modelling, including partial/recursive dynamic equilibrium, closures, elasticities, and calibration/validation
• Hands-on GAMS expertise in developing and optimizing large-scale models, implementing modular architecture, solve sequences, and scenario management.
• Python/R skills for workflow automation, data pipelines, reproducible environments, and analytics/reporting aligned with FAO standards.