Back to guides
5
8 min

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 HorizonModelKey FeaturesMAPE Target
Intra-day (0-4h)LSTM + attentionRecent demand + temperature forecast1.5-2.5%
Day-ahead (24-48h)Gradient boosted ensembleAll features, NWP temperature2.5-4%
Week-aheadSimilar ensemble + trendAll features + trend component4-6%
Seasonal (3-6 months)Regression + weather scenariosGDP, industrial index, weather climatology6-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:

  • Monsoon onset and withdrawal dates (varies by 2-3 weeks year to year)
  • Reservoir and groundwater levels (determines pumping hours needed)
  • State government free/subsidized electricity policies (timing of feeder energization)
  • 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 horizon

    The 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:

  • APM gas: fixed allocation, fixed price — no optimization needed
  • Long-term RLNG contracts: take-or-pay obligations (typically 85-90% of ACQ). Under-lift penalties are expensive. Over-lift beyond 110% ACQ incurs premium pricing.
  • Spot RLNG: flexible but volatile pricing. Delivery lead time: 30-45 days for cargo.
  • 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:

  • Global LNG supply indicators (US LNG cargo tracking, Qatar/Australia loading schedules)
  • Asian demand indicators (Japan/Korea utility inventory, China import trends)
  • European TTF price (arbitrage linkage between Atlantic and Pacific LNG basins)
  • Oil price (Brent) and slope formula economics
  • Seasonal patterns (Asian winter premium, Indian summer demand)
  • 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:

  • Emission baseline estimation: predict BAU emissions for each facility from production data, fuel mix, and process parameters
  • Abatement cost curve construction: rank emission reduction opportunities by ₹/tCO2e
  • Credit price forecasting: as the market develops, predict credit prices from policy signals, compliance demand, and voluntary demand indicators
  • 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

  • India-specific demand features (agriculture, festivals, structural growth) improve forecasting by 2-4% MAPE — this translates to hundreds of crores in reduced balancing costs for state grids.
  • IEX price prediction enables portfolio optimization for generators — the 5-10x daily price spread creates significant value from even modest forecast accuracy.
  • Gas contract optimization is a portfolio problem — the interaction between take-or-pay obligations, spot procurement, and terminal constraints makes this a natural AI optimization problem with ₹100+ crore annual impact for large marketers.
  • Carbon market preparation is urgent — the ICM will create compliance obligations and trading opportunities. Companies building emission prediction and abatement cost models now will have a first-mover advantage.
  • 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