Deep Learning That Respects the Theorems: Arbitrage-Free Neural Networks for Commodity Futures
Summary
CARRY-Net, a novel deep learning model for commodity futures, integrates fundamental economic theory directly into its architecture to overcome the limitations of generic machine learning models that often violate arbitrage theorems. This model incorporates three structural components: a Working curve layer ensuring decreasing, convex convenience yield; a projection layer enforcing cost-of-carry arbitrage; and structured dynamics where the neural network models only inventory flows. Implemented in pure NumPy, CARRY-Net runs in under ten minutes on one CPU core. It utilizes a two-stage estimator, combining exact linear algebra for pricing map inversion (Stage A) with a dynamics training stage (Stage B) featuring anchoring and a curve forecast loss. Tested on a synthetic corn-like market, CARRY-Net achieved best-or-tied RMSE at all horizons (h=1, 5, 20) and zero arbitrage violations, outperforming an unstructured GRU-Seq2Seq by 43% and a linear twin by 19% at h=20.
Key takeaway
For AI Scientists building commodity futures models, integrating economic theory directly into your neural network architecture, as CARRY-Net does, ensures arbitrage-free outputs and interpretability. This approach, which enforces constraints like the Working curve and full-carry projection, prevents catastrophic failures seen in unstructured models. You should prioritize architectural constraints over penalty terms and anchor structural channels to real variance to achieve robust, accurate, and legally compliant forecasts.
Key insights
CARRY-Net embeds economic theory into neural network architecture to achieve arbitrage-free, interpretable, and accurate commodity futures forecasting.
Principles
- Economic theory can be compiled into architecture.
- Arbitrage bounds are best enforced via projection.
- Identification analysis is critical for neural models.
Method
CARRY-Net uses a two-stage estimator: Stage A inverts the pricing map via sparse linear least-squares, and Stage B trains dynamics with an anchored Working layer and a curve forecast loss, using 44-day teacher-forced windows.
In practice
- Implement decreasing-convex functions with softplus bases.
- Use "min(a,b) = b - relu(b-a)" for projections.
Topics
- Commodity Futures
- Arbitrage-Free Models
- Neural Network Architecture
- Financial Econometrics
- Deep Learning
- Futures Pricing
Code references
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, Data Scientist
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning on Medium.