AI for Energy Trading & Demand Forecasting
Power Demand Prediction, IEX Price Forecasting, and Gas Contract Optimization
Power Demand Forecasting: India's Unique Complexity
India's power demand has characteristics that make forecasting genuinely harder than in OECD countries: extreme temperature sensitivity (air conditioning load doubles between 35°C and 45°C), agricultural pump load that varies with monsoon timing, festival-driven demand spikes (Diwali, Eid, Pongal), and rapid structural growth (5-7% annual demand increase means last year's model is wrong this year).
Open data/power-demand-data.csv — 15-minute interval demand data for a state grid with temperature, humidity, day type classification, and agricultural feeder status.
Feature Engineering for Indian Demand
The standard features (temperature, hour-of-day, day-of-week) explain 70% of demand variation. The India-specific features close the gap:
Standard features:
temperature (dry bulb, wet bulb), humidity, wind_speed
hour_of_day, day_of_week, month
is_weekend, is_holiday
lagged_demand (1h, 24h, 168h)
India-specific features:
festival_flag (Diwali, Holi, Eid, Pongal, Navratri — each has distinct load shape)
agricultural_load_proxy (monsoon status, reservoir levels, pump energization data)
IPL_match_flag (evening demand spike in urban areas — measurable effect)
exam_season_flag (May-June board exams — reduced industrial, increased residential)
heat_wave_flag (IMD declaration — triggers emergency demand response)
Structural growth features:
trend_component (linear or exponential growth)
industrial_production_index (monthly, lagged 1 month)
new_connection_count (cumulative, quarterly update)Model Architecture
| Forecast Horizon | Model | Key Features | MAPE Target |
|---|---|---|---|
| Intra-day (0-4h) | LSTM + attention | Recent demand + temperature forecast | 1.5-2.5% |
| Day-ahead (24-48h) | Gradient boosted ensemble | All features, NWP temperature | 2.5-4% |
| Week-ahead | Similar ensemble + trend | All features + trend component | 4-6% |
| Seasonal (3-6 months) | Regression + weather scenarios | GDP, industrial index, weather climatology | 6-10% |
For state load dispatch centres (SLDCs), the day-ahead forecast is the most critical — it determines unit commitment, power purchase from exchanges, and interstate scheduling. The difference between 3% and 5% MAPE on a 20 GW system is 400-1,000 MW of scheduling error — worth ₹5-15 crore/day in real-time balancing costs.
Agricultural Load: The Monsoon Effect
Agricultural pump load constitutes 20-30% of total demand in states like Maharashtra, Punjab, Haryana, and Andhra Pradesh. This load appears and disappears based on:
ML models trained on satellite-derived soil moisture, reservoir levels from CWC (Central Water Commission), and agricultural feeder energization schedules predict agricultural demand within 8-12% — a major improvement over the 20-30% error in traditional methods that rely on historical averages.
IEX Price Prediction: Merit Order and Demand-Supply Balance
India Energy Exchange (IEX) day-ahead market (DAM) prices determine the marginal cost of power for discoms, open-access consumers, and IPPs. Prices range from ₹1-2/kWh during off-peak to ₹6-10/kWh during peak summer — a 5-10x spread that creates significant trading opportunities and hedging requirements.
Merit Order Modeling
IEX clearing price is determined by the intersection of supply and demand bid curves. The supply curve (merit order) is roughly:
Merit order (approximate variable cost, ₹/kWh):
1. Run-of-river hydro: 0.50-1.00
2. Nuclear: 1.50-2.00
3. Pithead coal (NTPC Singrauli, Korba): 1.80-2.50
4. Solar/wind (must-run, zero variable cost but intermittent): 0
5. Imported coal: 3.00-5.00
6. Gas (RLNG): 4.00-8.00 (depends on spot LNG price)
7. Diesel (peaking): 12.00-18.00
Demand side:
Distribution companies (discoms) with day-ahead scheduling
Open access consumers (>1 MW industrial)
Captive plant operators (buy/sell based on own generation cost)An ML model predicts IEX DAM clearing price by modeling both supply and demand:
Supply-side features:
coal_plant_availability_mw (from NLDC daily reports)
hydro_reservoir_levels (CWC data, weekly)
gas_price_mmbtu (Henry Hub, JKM spot, long-term contract price)
renewable_generation_forecast (from wind/solar forecasting models)
nuclear_availability (scheduled outage calendar)
transmission_corridor_availability (congestion flag per region)
Demand-side features:
national_demand_forecast (all-India, from previous section)
regional_demand_distribution (NR/WR/SR/ER/NER split)
discom_scheduling_patterns (historical bid behavior)
Model: LightGBM regression
Target: DAM clearing price (₹/MWh) per time block (15-min)
MAPE: 12-18% at 24-hour horizonThe forecast accuracy is sufficient for portfolio optimization — a generating company with 5,000 MW can increase DAM revenue by 3-5% by shifting scheduling between bilateral contracts and exchange, guided by price forecasts.
Gas Contract Optimization: Oil-Linked vs Spot
India's natural gas market operates with three pricing tiers: APM gas (domestically produced, government-notified price — $6-8/MMBTU), spot RLNG (imported LNG at JKM-linked pricing — $8-15/MMBTU), and long-term RLNG (oil-linked formula with take-or-pay obligations — Brent/slope formula).
Open data/gas-trading-data.json — historical gas procurement data: APM allocation, RLNG spot purchases, long-term contract deliveries, prices, and demand by sector (fertilizer, power, CGD, industrial).
Portfolio Optimization
GAIL, as India's largest gas marketing company, manages a portfolio of:
The optimization problem: how much spot LNG to procure given long-term contract positions, demand forecasts, and price forecasts.
Decision variables:
spot_cargo_nominations (per month, 30-day horizon)
long_term_delivery_scheduling (within ACQ tolerance band)
customer_allocation_by_sector (fertilizer gets APM priority)
Objective: minimize total gas procurement cost
Constraints:
meet sectoral demand obligations
respect take-or-pay in long-term contracts
LNG terminal slot availability (Dahej, Hazira, Dabhol, Kochi, Ennore)
regasification capacity constraints (MMSCMD per terminal)
pipeline hydraulic constraints (transmission capacity)An ML model predicts JKM (Japan Korea Marker) spot LNG price at 30 and 60-day horizons using:
Forecast MAPE of 10-15% at 30-day horizon enables GAIL to save ₹100-300 crore/year on spot procurement timing versus fixed procurement schedules.
Carbon Credit Valuation and PAT Scheme Compliance
PAT (Perform, Achieve, Trade) Scheme
India's PAT scheme — the closest thing to a carbon trading mechanism for industry — sets energy consumption targets (Specific Energy Consumption, SEC) for designated consumers (DCs) in 13 sectors. Over-achievers earn ESCerts (Energy Saving Certificates); under-achievers must buy ESCerts or pay penalties.
Open data/carbon-credit-data.json — PAT cycle data: target SEC, actual SEC, ESCert issuance/purchase, and penalty calculations for power, refinery, and fertilizer DCs.
PAT compliance model:
For each designated consumer:
target_sec (set by BEE for each PAT cycle, 3 years)
actual_sec (monitored annually)
production_normalization (capacity utilization adjustment)
Decision: invest in efficiency vs buy ESCerts
efficiency_investment_cost (₹/toe saved)
escert_market_price (₹/toe, traded on IEX)
penalty_rate (if neither achieved nor purchased)
ML contribution:
predict ESCert price trajectory (supply-demand model)
predict own SEC under different investment scenarios
optimize: minimize (investment_cost + escert_purchase_cost + penalty_risk)India Carbon Market (ICM)
The Carbon Credit Trading Scheme (CCTS) notified in June 2023 is India's emerging carbon market. Initially covering obligated entities under PAT, it will expand to include voluntary carbon markets.
ML models for ICM participation:
For Indian energy companies (NTPC, GAIL, Reliance, Adani), the transition from PAT ESCerts to carbon credits represents a strategic shift. Companies that can accurately predict their compliance position and credit prices will optimize the timing of investments and credit transactions.
Key Takeaways
This is chapter 5 of AI for Oil & Gas / Energy.
Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.
View course details