Model or dataset
AgriQuantAI/AgriQuant-AI avatar
AgriQuantAI/AgriQuant-AI

AgriQuant AI: A Weather-Signal Pipeline for Six Agricultural Futures Markets

AI-powered weather intelligence for agricultural commodity futures. Predicts price moves 48-72 hours early across OJ, Coffee, Cocoa, Sugar, Corn and Wheat using Claude Sonnet + satellite data

678 stars17 forksPythonLicense varies

At a glance

What is it?
AgriQuant AI wires NOAA feeds, satellite indices and a Claude Sonnet analysis step into a 15-minute monitoring loop that emits long and short signals for OJ, coffee, cocoa, sugar, corn and wheat. The architecture is legible and the README is unusually candid about what failed, but the headline backtest rests on assumptions the project itself flags.
Who is it for?
Adopt AgriQuant AI if you want a readable reference implementation of a weather-to-signal pipeline and you are willing to treat its output as research input rather than an execution system. Do not adopt it if you need a licence you can verify, a reproducible backtest, or a system that has been run outside the author's own environment.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 112 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap AgriQuant AI is trying to sit in

Agricultural futures move on weather before they move on reports. A freeze in Florida citrus groves or a dry spell in Minas Gerais shows up in station data and satellite indices days before it shows up in a USDA crop report. The README frames the whole project around that lag: the system claims to predict moves 48 to 72 hours before traditional analysts react, and it names six markets where the weather-to-price link is well established. Orange juice, arabica coffee, cocoa, sugar #11, corn and wheat each get a region and a primary risk in the market table, from freeze and hurricane in Florida to Harmattan winds in Ghana and Ivory Coast. That pairing of a specific geography with a specific physical risk is the most useful thing in the document. It tells you immediately whether the project covers a market you care about, and it makes the signal rules later in the README legible rather than hand-wavy. The intended user is someone who already trades or researches these contracts and wants a programmatic monitor, not a general-purpose forecasting library.

How the pipeline is wired, and where Claude Sonnet sits

The architecture diagram shows three boxes in a row: a Weather Collector, Claude Sonnet 4, and PostgreSQL, with a Main Orchestrator underneath running a 15-minute monitoring cycle across the six markets. Data flows left to right, so the collector feeds the model, and the model's output lands in the database. The orchestrator is described as handling prediction generation across eight ML models, signal alerts with position sizing, and performance tracking. The module table fills in the parts the diagram compresses. weather_collector.py handles NOAA and satellite ingestion. satellite_data_processor.py turns imagery into NDVI, thermal and moisture flux values. ensemble_predictor.py runs four models (random forest, gradient boosting, ridge and lasso) while lstm_predictor.py is a separate PyTorch LSTM with an attention mechanism. correlation_analyzer.py looks at cross-commodity lead-lag relationships, and volatility_forecaster.py applies GARCH. The list of external sources is long: NOAA National Weather Service at 15-minute cadence, GOES-16 and GOES-18 imagery, Sentinel-2 multispectral data, MODIS vegetation indices, INMET Brazilian stations, the Ghana Meteorological Agency, CME and ICE tick data, and USDA crop reports. What the README does not explain is how the Claude Sonnet step combines with the eight ML models. Whether the language model classifies weather narratives, generates features, or arbitrates between model outputs is not stated. That is a real gap for anyone trying to reason about failure modes, because an LLM in the loop introduces nondeterminism that the rest of the stack does not have.

Signal rules and the risk envelope

The signal logic is rule-based at the entry point. Long signals fire on a NOAA freeze watch or warning in a production zone, a hurricane forecast cone intersecting a commodity region, sustained warm or wet conditions crossing a disease-outbreak threshold, or a drought index crossing a critical level for coffee, cocoa or sugar. Short signals fire when a freeze warning is cancelled, a storm diverts, above-average rainfall ends a drought, or USDA weekly reports show crop condition upgrades. The risk block is explicit: maximum 5 percent of portfolio per signal, 2 percent stop-loss per position, maximum hold of 21 days, average hold of 4.7 days. Those numbers are tight enough to be meaningful. A 21-day cap means the system is not designed to sit through a full growing season, and the average hold of under five days suggests most signals resolve quickly or get stopped out. The README's own post-mortem supports that reading. Freeze warnings with 48 or more hours of lead time are listed at a 75 percent win rate and hurricane path divergence shorts at 85 percent, while holding through USDA report releases is listed under what did not work, on the grounds that the information is usually priced in by then.

Getting it running

The quick start is four environment variables and two commands. You export ANTHROPIC_API_KEY, and optionally NOAA_API_KEY, PLANET_API_KEY and DATABASE_URL pointing at a local PostgreSQL instance. Then pip install -r requirements.txt, followed by python demo.py for a no-live-data run or python main.py for the full system. Backtesting has its own entry point: python backtest.py --start 2023-01-01 --end 2025-12-31 --leverage 2.5, which the README says produces an equity curve, per-trade log, Sharpe ratio, max drawdown, and a comparison against the S&P 500 and buy-and-hold futures. Two things stand out. First, the README marks NOAA_API_KEY and PLANET_API_KEY as optional but the architecture lists NOAA and Sentinel-2 as core sources, so it is unclear what the system does without them. Second, demo.py is the only path that does not require live data or credentials, which makes it the sensible first command for anyone evaluating the repository. Note also that the badge row claims an MIT licence while the repository metadata supplied here lists the licence as unknown; the LICENSE file is the thing to check, not the badge.

The backtest numbers and why they need scrutiny

The headline figures are +223 percent total return on a 2.5x leveraged futures strategy from 2023 to 2025, a 70 percent win rate, a 2.6:1 win/loss ratio, a 1.8 Sharpe ratio and a -21 percent maximum drawdown. The project's own disclaimer undercuts them more than any outside critic could. It states that the backtest assumes perfect fills, no slippage, and hindsight signal construction. Hindsight signal construction is the serious one. If the signals were defined after looking at which weather events preceded which price moves, the win rate measures the author's ability to describe the past, not to predict the future. The trade count compounds the problem: 70 percent across 23 trades means roughly 16 winners. That is a small sample for a strategy with a 21-day maximum hold, and it spans a period short enough that a single freeze season or hurricane landfall can dominate the result. None of this means the pipeline is wrong. It means the performance table should be read as a description of a historical exercise, not as evidence about forward returns, and the repository does not ship a walk-forward or out-of-sample protocol that would settle the question.

Where the design breaks down

The clearest limitation is the one the README volunteers: preliminary model runs more than 72 hours out are described as too early and too noisy to trade, and minor cold fronts below 28 degrees Fahrenheit are dismissed as having insufficient crop impact. So the usable window is narrow, roughly the 48 to 72 hours the project claims as its edge. Outside that band the system is either guessing or ignoring the event. A second constraint is data dependency. The pipeline leans on INMET Brazilian stations, the Ghana Meteorological Agency, GOES imagery, Sentinel-2 and MODIS, plus CME and ICE tick data. Any interruption in those feeds degrades the signal without necessarily raising an error, since the system can still produce a prediction from stale inputs. A third is the licence ambiguity already noted. A fourth is the Claude dependency: the analysis step requires an Anthropic API key and a paid model, so the running cost scales with how often the 15-minute cycle actually calls the model, and the README does not say whether every cycle does. Anyone expecting a self-contained offline system will be disappointed, because demo.py is the only path that avoids external services.

How it differs from a general quant stack

The obvious comparison is to a conventional Python quant workflow built on pandas, scikit-learn and a broker API, where you assemble your own feature pipeline and your own execution layer. AgriQuant AI's difference is that it ships the domain layer already assembled: the commodity-to-region-to-risk mapping, the NOAA and satellite ingestion, the NDVI and thermal processing, the GARCH volatility step and the correlation analyzer all arrive wired together, with a rule set that translates weather events into long and short entries. A general stack gives you more control and no opinion about agriculture. AgriQuant AI gives you a specific opinion and less room to change it, since the signal rules are hard-coded around freeze warnings, hurricane cones and drought indices rather than learned end to end. The trade-off is between flexibility and time to first signal. If your interest is in coffee or cocoa specifically, the pre-built regional coverage is worth more than a blank pandas notebook. If your interest is in a market the six-commodity table does not list, the project offers you nothing beyond the satellite processing code.

Maintenance cost and who should pick it up

Maintenance here is mostly external. The dependency surface includes PyTorch for the LSTM, an Anthropic SDK for the Claude step, PostgreSQL, and whatever client libraries the satellite and NOAA feeds require. Each of those moves on its own schedule, and the README does not state pinned versions, so a fresh pip install -r requirements.txt at some future date may resolve to incompatible releases. The data sources are the second ongoing cost: NOAA endpoints, INMET and the Ghana Meteorological Agency are not under the project's control, and any change to their formats lands on you. On licensing, the badge says MIT but the supplied repository metadata does not confirm a licence, so treat the LICENSE file as the authority and read it before you build anything commercial on top. The honest summary is that this is a research scaffold with a candid post-mortem attached. The what-worked and what-did-not section is more valuable than the performance table, because it tells you where the author found the edge and where it disappeared. Start with demo.py, read backtest.py before trusting its output, and treat the -21 percent drawdown figure as the realistic floor rather than the worst case.

Editorial conclusion

Adopt AgriQuant AI if you want a readable reference implementation of a weather-to-signal pipeline and you are willing to treat its output as research input rather than an execution system. Do not adopt it if you need a licence you can verify, a reproducible backtest, or a system that has been run outside the author's own environment. Before anything else, confirm the LICENSE file matches the MIT badge in the README, then check whether requirements.txt pins the Anthropic SDK and PyTorch versions, because claude_engine.py and lstm_predictor.py will not run against arbitrary releases of either.

Official sources

  1. AgriQuantAI/AgriQuant-AI on GitHub
  2. Issues
  3. Project website
  4. README
Community notes

Community notes