0. How to use these notes

  • Treat this as a chapter to print and annotate.
  • Anything labelled REMEMBER or CORE SENTENCE is something you should be ready to say in the interview.
  • If you can explain every section in your own words, you are roughly 80% prepared on the “power/commodities context” for a unified pricing & risk framework.

1. Why power and commodities are different from “vanilla finance”

Most quant libraries are written with equities, rates, FX in mind. Power, gas, and commodities add several twists:

  1. Non-storability (for power)
    • You cannot physically “store” electricity at scale like oil in a tank.
    • Value depends heavily on when and where delivery occurs.
    • Spot prices can spike massively for short periods.
  2. Strong seasonality and shape
    • Demand and supply depend on:
      • time of day (load profile),
      • day of week,
      • season of year,
      • weather.
    • Forward curves are not smooth lines. They have:
      • seasonal patterns (summer/winter, heating/cooling),
      • shape between base and peak periods.
  3. Physical constraints and real assets
    • Power plants, hydro reservoirs, storage, pipelines.
    • Operations constrained by:
      • capacity, ramping limits, minimum up/down time, efficiency.
    • These assets behave like options with complex constraints.
  4. Structured products and embedded optionality
    • Swing options, tolling agreements, take-or-pay contracts, virtual power plants.
    • Optionality often linked to:
      • volumes,
      • spreads (spark/dark),
      • availability of capacity,
      • load profiles.
  5. Risk is multi-dimensional
    • Curve shape risk (not just level).
    • Volume risk (actual consumption / production deviates from forecast).
    • Basis risk (location or benchmark vs physical delivery point).
    • Weather and inflow risk (for hydro, gas demand, renewables).

CORE SENTENCE: “Power and commodities force you to think in terms of delivery periods, physical constraints, seasonality, and volume risk, not just spot/forward and volatility.”


2. Term structure, seasonality, and shape

You must be able to talk about forward curves and shape in power/gas.

2.1 Forward and futures structure

Common traded tenors:

  • Day-ahead, weekend, week-ahead.
  • Month, quarter, season, calendar year.
  • Baseload vs peakload products (e.g. 24h vs business hours 8–20).
  • Different delivery zones (bidding areas, hubs, interconnectors).

Key idea

  • A “forward price” is usually the average price over a delivery period, not a single instant.
  • For example:
    • A baseload month product delivers 24 hours per day over that month.
    • A peakload product only for certain hours (e.g. weekdays, 8–20).

REMEMBER: “Power forwards are prices for time-blocks of delivery, not single instants.”

2.2 Seasonality

Seasonality comes from:

  • Weather-driven demand (heating vs cooling seasons).
  • Hydro inflows (snowmelt, rainfall).
  • Fuel prices (gas, coal, CO₂).
  • Regulatory and calendar patterns (holidays, weekends).

You often model power prices with:

  • Deterministic seasonal components:
    • annual, weekly, daily patterns,
    • plus stochastic deviations.

A simple structural way to say it:

spot(t) = seasonal_component(t) + stochastic_component(t)

You want to show in interview that you understand:

  • Term structure is shaped by:
    • predictable seasonal profiles,
    • structural costs (fuel, CO₂),
    • expected system constraints.

3. Shape effects and load profiles

3.1 Shape between base and peak

“Shape” is the relationship between:

  • baseload prices (full day),
  • peakload prices (high-demand hours),
  • possibly off-peak or other blocks.

If demand is very “peaky”:

  • peakload prices are much higher than baseload.
  • shape risk becomes important:
    • even if average level is unchanged, relative difference between peak and base can move.

REMEMBER: “Shape risk is the risk that the pattern of prices across hours changes, even if average levels do not.”

3.2 Load profiles and structured loads

End-users and structures often have profiled load:

  • Residential vs industrial consumption patterns.
  • Fixed vs flexible load (demand response).
  • Contracts may specify:
    • a base block + tolerance band,
    • flexible volumes within limits.

In a pricing library, this shows up as:

  • Instruments that refer to:
    • delivery periods,
    • hourly profiles,
    • volume bands.

You want to be able to say:

CORE SENTENCE: “Our instrument layer must understand delivery calendars and profiles. The same forward curve can generate very different cash flows for different load shapes.”


4. Optionality and structured products in power/commodities

This was in your Part 6 and is central.

4.1 Types of optionality

Common examples:

  1. Swing options (gas, power)
    • Buyer can vary offtake within min/max bounds over time.
    • Penalties or constraints if they over- or under-take.
    • Strongly path-dependent; decisions each period depend on past usage.
  2. Tolling / spark spread / dark spread
    • Right (or obligation) to convert gas or coal into power at a plant.
    • Value driven by:
      • spread between power price and fuel + CO₂ costs,
      • plant efficiency,
      • operational constraints.
  3. Take-or-pay contracts
    • Buyer must pay for a minimum quantity, regardless of actual offtake.
    • Optionality in excess volumes; penalties for shortfall.
  4. Storage options (gas storage, oil tanks)
    • Inject/withdraw decisions with capacity and rate limits.
    • Value is based on term structure and volatility of spreads.

REMEMBER: “Power and gas structured products are almost always operating decisions under price uncertainty with constraints: volume bands, spreads, ramps, storage levels.”

4.2 Why this matters for the analytics framework

For this role, key points:

  • Instruments must be able to represent:
    • volume constraints,
    • minimum/maximum offtake,
    • spread payoffs,
    • path-dependent exercise rules.
  • Models must produce:
    • correlated price paths across:
      • power, gas, CO₂, possibly FX,
    • capturing seasonality and spikes where relevant.
  • Pricers often rely on:
    • Monte Carlo simulation,
    • dynamic programming or stochastic optimisation,
    • approximations (e.g. “trigger price” heuristics).

You want to signal:

CORE SENTENCE: “I see structured power and gas products as constrained real options. Our library needs to expose payoff and constraint structure clearly so we can plug in both Monte Carlo and optimisation engines.”


5. Physical assets: hydro, thermal, storage

Your Part 6 explicitly mentions hydro. This is a very strong topic to talk about.

5.1 Hydro assets and water value

Hydro plants with reservoirs have:

  • inflows (rainfall, snowmelt),
  • storage capacity,
  • turbine capacity,
  • environmental/operating constraints.

Water in the reservoir is like an inventory:

  • Burning it now (producing power) vs saving it for later is a real option.
  • The water value is the shadow price of water in storage:
    • the marginal value of one extra unit of water today, given future price uncertainty and constraints.

REMEMBER: “Water value is the opportunity cost of using a unit of water now instead of later.”

5.2 Thermal plants and unit commitment

Thermal units (gas, coal, nuclear) have:

  • minimum stable generation levels,
  • ramping rates,
  • minimum up/down times,
  • startup costs and times,
  • efficiency (heat rates).

The operator solves unit commitment problems:

  • when to switch units on/off,
  • how to dispatch output across units,
  • under price uncertainty and demand obligations.

5.3 Storage assets

Gas storage and oil tanks:

  • capacity limits,
  • injection/withdrawal limits,
  • costs and losses.

They create flexibility to shift volume over time:

  • buy cheap, store, sell when expensive.

5.4 How this touches the analytics framework

For the library:

  • Instruments might represent:
    • physical contracts (plant tolls, PPAs, storage rights).
  • Models must encode:
    • price dynamics for relevant commodities and inputs.
  • Pricers may:
    • call into optimisation engines for assets (hydro scheduling, storage optimisation).
  • Risk must:
    • aggregate asset risks with financial trades,
    • stress the combined portfolio under fuel price, CO₂, and load scenarios.

You want to show:

CORE SENTENCE: “Physical power and gas assets are portfolios of options with operational constraints. The central library must treat their optimization outputs as first-class valuation artefacts, consistent with the financial book.”


6. Risk in power/commodities: what’s special

You want to speak about risk in a way that shows you understand power/gas specifics, not generic VaR.

6.1 Key risk types

  1. Price and curve risk
    • Level and shape of forward curves.
    • Cross-commodity spreads (spark/dark, gas/oil).
  2. Volume risk
    • Actual consumption or production differs from forecasts.
    • Hydro inflows or wind/solar output deviate from expectations.
    • Swing contracts exercised differently than expected.
  3. Basis and location risk
    • Differences between:
      • hub prices and local prices,
      • reference index vs specific delivery point.
  4. Weather risk
    • Temperature (heating/cooling degree days).
    • Precipitation and inflows (hydro).
    • Wind and solar conditions.
  5. Operational risk and outages
    • Plant failures, maintenance overruns, grid constraints.

REMEMBER: “In power/gas, volume and basis risk are as important as pure price volatility.”

6.2 Risk measures and consistency

You still use:

  • VaR / CVaR (Expected Shortfall),
  • stress tests,
  • scenario analysis,
  • P&L explain.

But:

  • Scenarios must reflect joint movements in:
    • power, gas, CO₂, FX, weather.
  • Risk factors must include:
    • curve buckets,
    • shape factors (peak vs base),
    • volume factors (load forecasts, inflow forecasts).

CORE SENTENCE: “Risk measures must be coherent across physical and financial positions. The same curves, factors, and scenarios should drive both plant risk and derivative risk.”


7. What this means for the analytics framework design

Tie it back to the job: unified analytics framework for pricing and risk.

7.1 Instrument layer in power/commodities

Must support:

  • Delivery periods:
    • hourly, blocks, days, months, seasons, years.
  • Profiles:
    • baseload, peakload, custom shapes.
  • Volume flexibility:
    • min/max offtake, swing bands, storage decisions.
  • Multi-commodity structures:
    • power vs gas vs CO₂ vs FX.

REMEMBER:

“Instruments encode delivery schedules, volumes, and payoffs. They must be flexible enough for structured deals and physical rights.”

7.2 Market layer

Must include:

  • Forward curves for:
    • power (per zone, per product type),
    • gas hubs, coal, CO₂.
  • Shape information:
    • mapping from block prices to hourly curves.
  • Weather and inflow scenarios:
    • forecast curves and distributions.
  • Possibly:
    • capacity prices, imbalance prices, ancillary services.

All of this in versioned snapshots, as we already discussed.

7.3 Model layer

Typical model types:

  • Spot/forward price models:
    • mean-reverting with jumps and seasonality,
    • multi-factor for shape and spreads.
  • Cross-commodity models:
    • gas–power–CO₂ correlations.
  • Structural models:
    • supply stack / merit-order models linking fuel prices to power prices.
  • Weather/inflow models:
    • stochastic processes for temperature, inflows.

You do not need to derive SDEs in the interview, but you should be able to say:

“We use mean-reverting, seasonally adjusted models for power and gas, with explicit cross-commodity dependence and weather/inflow factors where needed.”

7.4 Pricer and optimisation engines

For this role, show that you understand different regimes:

  • Simple forwards:
    • discounted expectation of average price over the delivery period.
  • Vanilla options:
    • models similar to other asset classes, but with seasonal and spike structure.
  • Structured contracts and physical assets:
    • Monte Carlo + dynamic programming,
    • stochastic programming,
    • decomposition methods (e.g. Lagrangian, Benders) for large hydro or storage portfolios.

Important:

“The central library provides the contract representation and model interface; heavy optimisation engines can be plugged in as pricers for specific instruments/assets.”

7.5 Risk and portfolio layers

Power/gas portfolio view must:

  • aggregate:
    • physical assets,
    • financial forwards/futures,
    • options and structured deals,
    • fuel and CO₂ hedges.
  • support:
    • scenario P&L for fuel/CO₂/FX/weather shocks,
    • VaR/ES across curves and shape factors,
    • P&L explain that distinguishes:
      • curve moves,
      • shape changes,
      • volume changes.

8. Interview checklist – commodities/power focus

You are in good shape if you can:

  1. Explain in 2–3 sentences:
    • why power is special (non-storability, seasonality, shape, physical constraints).
  2. Describe:
    • what shape risk and load profiles are,
    • how baseload vs peakload differ.
  3. Give examples of structured products:
    • swing, tolling, storage, take-or-pay,
    • and explain what makes them optional.
  4. Explain hydro and water value:
    • what it is,
    • why it is “opportunity cost of water”.
  5. List key risk types:
    • price, curve, shape, volume, basis, weather.
  6. Tie everything to the framework:
    • what instruments, market data, models, and pricers must support in a power/gas environment.

Python Simulation

The following Python snippet is a small, self-contained example for this topic. It is not a production pricer. It is a didactic toy that isolates the core mechanism we just discussed, so you can see the inputs, the transformation, and the resulting output in one place. Treat it as a sanity check and a template: the structure mirrors how we would implement the same idea in a real library, but with simplified assumptions and minimal plumbing.


import numpy as np
from math import log, sqrt, exp, erf

# --- 1. Black–Scholes helper for intuition (no dividends, European options) ---

def norm_cdf(x: float) -> float:
    """Standard normal CDF via erf (no external dependencies)."""
    return 0.5 * (1.0 + erf(x / sqrt(2.0)))

def bs_call_put(S, K, r, sigma, T):
    """
    Returns (call, put) prices under Black–Scholes.
    This is only to illustrate parity and monotonicity numerically.
    """
    if T <= 0 or sigma <= 0:
        # Immediate expiry: pure intrinsic value
        call = max(S - K, 0.0)
        put = max(K - S, 0.0)
        return call, put

    d1 = (log(S / K) + (r + 0.5 * sigma**2) * T) / (sigma * sqrt(T))
    d2 = d1 - sigma * sqrt(T)

    Nd1 = norm_cdf(d1)
    Nd2 = norm_cdf(d2)
    Nd1_m = norm_cdf(-d1)
    Nd2_m = norm_cdf(-d2)

    df = exp(-r * T)
    call = S * Nd1 - K * df * Nd2
    put = K * df * Nd2_m - S * Nd1_m
    return call, put

S0 = 100.0
K  = 100.0
r  = 0.05
T  = 1.0
sigma = 0.3

C, P = bs_call_put(S0, K, r, sigma, T)
df = exp(-r * T)

print(f"S0={S0}, K={K}, r={r}, T={T}, sigma={sigma}")
print(f"Call (C): {C:.4f}")
print(f"Put  (P): {P:.4f}")

# --- 2. Check put–call parity numerically ---

lhs = C - P
rhs = S0 - K * df
print("\nPut–call parity check:")
print(f"  C - P = {lhs:.6f}")
print(f"  S0 - K*df = {rhs:.6f}")
print(f"  Difference = {lhs - rhs:.6e}")


# --- 3. Check no-arbitrage bounds for this option ---

lower_C = max(0.0, S0 - K * df)
upper_C = S0
lower_P = max(0.0, K * df - S0)
upper_P = K * df

print("\nCall bounds:")
print(f"  Lower bound: {lower_C:.4f}")
print(f"  Actual C:    {C:.4f}")
print(f"  Upper bound: {upper_C:.4f}")

print("\nPut bounds:")
print(f"  Lower bound: {lower_P:.4f}")
print(f"  Actual P:    {P:.4f}")
print(f"  Upper bound: {upper_P:.4f}")


# --- 4. Monotonicity in strike: C(K) should decrease, P(K) should increase ---

Ks = np.linspace(60, 140, 9)
calls = []
puts = []
for K_i in Ks:
    C_i, P_i = bs_call_put(S0, K_i, r, sigma, T)
    calls.append(C_i)
    puts.append(P_i)

calls = np.array(calls)
puts = np.array(puts)

print("\nStrike grid:", Ks)
print("Calls C(K): ", np.round(calls, 4))
print("Puts  P(K): ", np.round(puts, 4))

print("\nDifferences C(K_{i+1}) - C(K_i) (should be <= 0):")
print(np.round(np.diff(calls), 4))

print("Differences P(K_{i+1}) - P(K_i) (should be >= 0):")
print(np.round(np.diff(puts), 4))


# --- 5. Example: introduce a fake market violation of parity and compute arbitrage payoff ---

C_mkt = C + 2.0   # artificially expensive call
P_mkt = P         # fair put (for illustration)

lhs_mkt = C_mkt - P_mkt
rhs_true = S0 - K * df
print("\nFAKE MARKET:")
print(f"  C_mkt - P_mkt = {lhs_mkt:.4f} vs theoretical {rhs_true:.4f}")

# Standard arbitrage combo when C - P is TOO HIGH:
# Short call, long put, long bond PV(K), short stock.
# We'll show initial CF and payoff at maturity as a function of S_T.

def arbitrage_payoff(ST):
    # At t=0: cash in = C_mkt (short call), cash out = P_mkt (long put),
    #         + pay PV(K) for the bond, + receive S0 from short stock.
    # We just look at *payoff at T*; initial cash we compute separately.
    # At T: payoff from each leg:
    call_payoff = -max(ST - K, 0.0)      # short call
    put_payoff  = max(K - ST, 0.0)       # long put
    bond_payoff = K                      # long bond
    stock_payoff = -ST                   # short stock
    return call_payoff + put_payoff + bond_payoff + stock_payoff

cf0 = -C_mkt + P_mkt + K * df - S0  # this is negative if we RECEIVE money (our sign convention)
print(f"\nInitial CF (our P&L at t=0, positive = we receive): {-cf0:.4f}")

ST_grid = np.linspace(40, 160, 7)
payoffs_T = [arbitrage_payoff(ST) for ST in ST_grid]
print("Arbitrage payoff at T for different S_T (should be ~0 everywhere):")
for ST, pf in zip(ST_grid, payoffs_T):
    print(f"  S_T={ST:6.1f} -> payoff at T = {pf:6.4f}")