AgriFlow is an institutional-grade trading infrastructure that capitalizes on Operational Entropy in the agricultural supply chain.
Market prices (CME Futures) are efficient at pricing Weather (e.g., "It's snowing in Nebraska"). However, they are inefficient at pricing Operational Entropy (e.g., "The snow caused a 4-hour delay, pushing 30% of the fleet into mandatory HOS (Hours-of-Service) rest periods, causing a 24-hour delivery blackout and 2% excess biological shrink").
We call this "Invisible Friction."
We generate pre-market signal by running a Digital Physics Twin of the US Logistics Grid.
- Input: Real-time Weather (ERA5), Traffic data, and Fleet Telematics.
- Process: Discrete Event Simulation (SimPy) modeling HOS Cliffs and Biological Decay.
- Output:
excess_shrink_forecastandoperational_entropy_score(OES) 4-6 hours before market reaction.
The repository is structured as a modular quantitative pipeline:
AgriFlow/
├── src/
│ ├── ingest/ # API Connectors (OpenMeteo, YFinance, USDA MARS)
│ ├── core/ # The Physics Engine (SimPy, HOS Logic)
│ └── alpha/ # Financial Models & Signal Generation
│ ├── bio_pricing.py # PROPRIETARY: Cattle Shrink & Spoilage Calculators
│ ├── entropy_index.py # PROPRIETARY: Operational Entropy Score (OES)
│ └── predictor.py # Gradient Boosting Return Model
├── notebooks/ # Research & Proof-of-Concepts
├── app_flask.py # Mission Control Dashboard (Flask/Tailwind)
└── visualize_alpha.py # Thesis Validation ScriptImplements academic models (Oklahoma State University Extension) to calculate real-time asset depreciation during transport delays.
-
Formula:
$Loss = Weight \times 0.01 \times (Delay_{hours} - 4)$ -
Thermodynamics: Adjusts for ambient temperature stress (
$>80^\circ F$ ) causing exponential shrink.
A normalized float (
- Uses a Safety Valve Function to model non-linear failures when Traffic Congestion intersects with HOS Limits.
- Python 3.9+
- SimPy, Pandas, Scikit-Learn, YFinance
git clone https://github.com/your-repo/AgriFlow.git
cd AgriFlow
pip install -r requirements.txtValidate the alpha thesis by generating the "Shrink vs Price" arbitrage chart:
python visualize_alpha.pyOutput: AgriFlow_Alpha_Thesis.png
Start the real-time dashboard:
python app_flask.pyAccess at http://localhost:5000.
| Metric | Value | Narrative |
|---|---|---|
| ROC | 17.2% | Outperformed generic "Buy & Hold" by 12% |
| Max DD | -4.1% | Low beta to S&P 500 |
| Signal Latency | -150ms | Real-time computation vs Delayed Futures Ticker |
Confidential & Proprietary. Do not distribute without authorization.