Thursday, August 29, 2024

Commodity Price Dynamics: A Structural Approach. Storage model for daily prices, focusing on higher moments of prices, covariation between prices of diff maturities, and implication of stochastic fundamental volatility, Electricity Price Model

Spreads between spot and futures prices as a measure of the return to storage, and to derive a “supply of storage” curve relating these spreads to the amount of commodity in store

Futures price = spot price + cost of carry inventory )cost of funds + warehousing fee + insurance) + convenience yield

commodity prices based on structural storage models

in this book I focus almost exclusively on the implications of storage models for high frequency– daily–prices, and use high frequency data to test these models

in this book I pay particular attention to the implications of storage models for higher moments of prices, covariation between prices of different maturities, the pricing of commodity options (including more exotic options), and the empirical behavior of stocks

I introduce a new feature into the fundamental shocks in the storage model. Specifically, I examine the implications of stochastic fundamental volatility

electricity.  2 approach dominates the electricity spot and forward market. first, jump diffusion-type processes for electricity prices. second, spot price of electricity depends on fundamental demand factors (e.g., weather, or “load”) and cost factors (e.g., fuel prices); specify stochastic processes for these fundamental factors; and then use standard derivatives pricing methods to solve for the prices of electricity forward contracts and options.

extensive use of numerical methods, with only a few close form solutions

How much does the price fluctuate over time, and what factors contribute to these fluctuations?










Electricity Price Model

- The model assumes that prices are determined by the intersection of a supply curve (that fluctuates randomly due to changes in fuel prices) and a (randomly fluctuating) demand curve
- In this approach, power prices in the physical measure are a function of two state variables.
- The first state variable is a demand variable, load. Load is the amount of electricity consumed. Since load depends heavily on temperature, it is also possible to use temperature as a state variable.
- Analysis of the dynamics of load from many markets reveals that this variable is very well behaved. Load is seasonal, with peaks in the summer and winter for most US power markets. Moreover, load for each of the various regions is nearly homoskedastic and there is little evidence of jumps in load. Finally, load exhibits strong mean reversion; random deviations of load from its seasonally-varying mean tend to reverse fairly rapidly







































Valuing Daily Strike and Monthly Strike Options


Wednesday, August 28, 2024

Learning Stochastics for Natural Gas Derivatives

Universities that offers courses related to energy derivative

- ETH Zurich


https://library.wbi.ac.id/repository/55.pdf

Commodity Option Pricing 343

343pg textbook


https://core.ac.uk/download/pdf/144484481.pdf

Spot Price Models for Natural Gas - Robustness of the Convenience Yield Approach

phd dissertation 214pg


https://www.bauer.uh.edu/spirrong/pirrong_commodity_book_110310.pdf

256pg textbook

Commodity Price Dynamics A Structural Approach

electricity options, forward curve, storage, 


https://repositorio.comillas.edu/jspui/bitstream/11531/1291/1/PFC000040.pdf

MODELING, PRICING AND HEDGING DERIVATIVES ON NATURAL GAS: AN ANALYSIS OF THE INFLUENCE OF THE UNDERLYING PHYSICAL MARKET

162 pg, masters thesis

numerical methods 20pg, spot model, forward model, PCA analysing forward model, case study on henry hub 2008-2013

many line graphs

heavy on teaching fundamental on natural gas trading

basic stochastics on derivative valuation

many accompanying python code 

comment: extremely good for junior natural gas quant, basic stochastics


https://ethz.ch/content/dam/ethz/special-interest/math/applied-mathematics/sam-dam/teaching-and-studies/theses/BarryThorntonMSC.pdf

Electricity Spot Price Modelling and Derivatives Pricing

masters thesis, 66pg    

spot modelling, levy process, risk neutral calibration to historical spot price, stochastics, pide derivation

comment: masters level thesis but with extensive high-level stochastics


https://essay.utwente.nl/67601/1/Roelofs_MA_BMS.pdf

Incorporating Seasonality and Volatility Updating in Gas Storage Valuation for the Purpose of Validation

masters thesis, 93 pg

forward curve analysis, garch, simulation

least square monte carlo method to optimize operation of gas storage


https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/4352/eth-29447-02.pdf

Modeling, Pricing and Risk Management of Power Derivatives

phd thesis

155 pg

modelling 

historical model calibration

swing options

comment: extensive stochastics


https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=f1ecedfc1f25436eac2063dc3da8f0af213b7e26

Stochastic Programming Models in Energy

41pg textbook like

little stochastics, focusing more on how to run the code (e.g. optimization for calibration to historical data)


https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=830cbba147c9b576e2db5169ed191b9a5c022e46

Valuation of Commodity-Based Swing Options

32pg research paper


https://edoc.hu-berlin.de/bitstream/handle/18452/14817/zolotko.pdf?sequence=1

Modelling interdependence in a pair of heating oil and natural gas futures curves

masters thesis

68pg


https://prism.ucalgary.ca/server/api/core/bitstreams/2a0915d8-944f-4df5-8cee-b7ea1118ffdd/content

Locational Spread Options for natural gas with Stochastic Correlation

78pg research paper




 











Tuesday, August 20, 2024

Summary of Research Papers, Factors for Forecasting,

Factors for Forecasting


Summary of Research Papers

https://www.sciencedirect.com/science/article/pii/S0140988317303869

  • More oil trading during crisis times; more calendar spread, natural gas and coal trading during non-crisis times
  • Prof. Dr. Marliese Uhrig-Homburg, chair for financial engineering and derivatives for dz bank
  • Matin Hain, quant analyst, https://www.linkedin.com/in/martin-hain-8191b8136/
  • Julian Hess, glencore energy analyst, https://www.linkedin.com/in/analyse/?locale=en_US

AlphaEvolve: A Learning Framework to Discover Novel Alphas in Quantitative Investment

  • Traditional ML alpha-mining model only involve +-*/, but AutoML-Zero also use vector/matrix operations
An Energy Market Modeling Approach for Valuing Real Options
  • Nils Unger, 10 years global macro PM, goldman commodity derivatives quant, https://www.linkedin.com/in/nils-unger-0480b293/
Modelling Jumps in Electricity Prices: Theory and Empirical Evidence
  • Jan Seifert, 16 years RWE energy trader

Sunday, August 18, 2024

Forecasting Electricity Prices Using Machine Learning, AlphaEvolve: A Learning Framework to Discover Novel Alphas in Quantitative Investment,

Forecasting Electricity Prices Using Machine Learning,  

A novel genetic programming approach. Forecasting electricity prices. Variables related to weather conditions, oil prices, and CO2 coupons and predicts energy prices 24 h ahead

The field of electricity price forecasting, similar to financial forecasting in stock market movements [7], is characterized by intensive data, noise, non-stationarity, a high degree of uncertainty, and hidden relationships

Forecasting near-future energy pricing considers, but is not limited to, the historical prices of gasoline, crude oil, and electricity, along with predicted weather patterns, locations, extreme weather events, the discovery of new fuel reserves, and increased energy demands.

Electricity prices, and particularly price spikes, are influenced heavily by a wide range of factors (e.g., transmission congestion, generation outages, and market participant behaviors)

GP stochastically transforms (by means of genetic operators) the populations of programs into new populations of possibly more applicable programs. Several different representations exist, but the one most commonly used encodes a solution as a LISP-like tree

Include a local searcher (LS) within the GSM mutation operator

Electricity prices have time-varying behavior, with periods of longer mean reversion during which there may be stronger associations with fuel and carbon prices.

Most of the proposed models of electricity employ temperature and wind as the key meteorological variables


Emery and Liu [11] studied the relationship between the prices of electricity futures and natural gas futures and found a cointegration between California–Oregon Border and Palo Verde electricity futures and natural gas futures. Mjelde and Bessler [12] used a vector error correction model to analyze the relationship between electricity spot prices and electricity-generating fuel sources (natural gas, crude oil, coal, and uranium) in the US. The authors found that the peak electricity price influences the natural gas price in contemporaneous time, while in the long term, apart from uranium, fuel source prices affect the electricity price. Based on the VECM model, Furió and Chuliá [13] analyzed the volatility and price linkages between the Spanish electricity market, Brent crude oil, and Zeebrugge (Belgium) natural gas. Natural gas and crude oil were seen to have an essential influence in the Spanish electricity market, with particular causality from the fossil fuel (Brent crude oil and Zeebrugge natural gas) markets to the Spanish electricity forward market.



Mosquera-López and Nursimulu [10] explored the drivers of German electricity prices in spot and futures markets and found that spot prices are determined by renewable energy infeed and electricity demand, while in futures markets prices are determined by the price of fossil fuels such as natural gas, coal, and carbon.

in short, changes in price of natural gas futures will have (1) large impact on "price" of electricity futures with maturity <7 days, and (2) will have larger impact on "volatility" of electricity futures with maturity >21 days

AlphaEvolve: A Learning Framework to Discover Novel Alphas in Quantitative Investment
Traditional ML alpha-mining model only involve +-*/, but AutoML-Zero also use vector/matrix operations. To make the alpha more understandable, used evolutionary algorithm. 






An Energy Market Modeling Approach for Valuing Real Options
- (Issue to tackle 1) Traditional stochastic modelling applies to spot contract (i.e. immediate buy/sell). But natural gas futures (e.g. at henry hub) is to delivery x amount of natural gas per day over the next month
- (Issue to tackle 2) Traditional one-factor stochastic model assume underlying spot price has a drift function (describes the expected rate of change in spot price) and volatility function (describes uncertainty/risk in spot price changes). In traditional multifactor stochastics function, there are other factors besides spot price, and you need to define the drift and volatility function for each factor. The issue is that the (1) spot price for each factor, (2) drift and volatility function for each factors, aren't readily observable. What natural gas traders observe is the (1) future prices, and (2) implied volatility of options on these futures
- (Issue to tackle 3) some modern models model more important futures contracts (e.g. monthly futures), but many real world pricing and hedging applications related to delivery agreements and storage contracts require the entire futures price curve

- Standard spot price models use (1) price dynamics of unobservable spot contract, and (2) latent risk factors (e.g. include a stochastic convenience yield when modeling spot commodity. Deciding whether to hold a commodity now then later is a "embedded timing option"), to capture time-varying spot-futures price relation. 
- Standard futures price models use (1) price dynamics of unobservable entire futures curve, and (2) reflect properties (e.g. convenience yield) indirectly via shape and volatility structure of the future curve
- (Model proposed) in comparison, the model proposed does not need to specify stochastic process for unobservables; Instead, it use a market model for futures contract. This research does not suggest new latent factors or new volatility functions; instead, it extends standard market models to value more complex real options in physical commodity market

Example of embedded natural gas storage option
- Imagine you are a natural gas storage operator, you have the option to store natural gas during summer when price is low, and sell during winter when price is high. This ability to store gas is like an "embedded storage option" within a larger contract (e.g. a long term contract for you to provide natural gas to another party)
- Suppose day-ahead price today is $2 per unit, but future price in 6 months is $4 per unit. you can do a calendar spread consisting of 2 legs: (Leg 1) buy day-ahead contract and store the gas now, while (Leg 2) selling futures contract and release gas later

2 main requirements for pricing models of real options in energy markets
- existing stochastics modelling approach suffers from significant trade-offs between tractability and completeness. Currently, people have 2 choices: 
  • (1) tractable but incomplete market model
    • tractability: only look at observable prices of futures contracts, making it easier to calibrate models to market observables
    • incomplete: do not define entire futures curve, do not define how spot and futures prices interact over time
    • examples:
      • Libor Market Model (LMM): simulated evolution of forward LIBOR rates, rather than spot LIBOR rate. Many interest rate derivatives are priced using forward LIBOR rates, rather than spot LIBOR rates. 
      • BGM Model: same function as LMM
  • (2) complete but intractable spot and futures price models
    • complete: explicitly modeling entire spot and futures prices curve
    • intractible: involve complex SDE, difficult to calibrate to market observable, computationally slow
    • is a stochastics-based model using SDE to describe how spot and futures price evolve
    • examples:
      • schwartz model: models the spot commodity price as a mean-reverting process
      • HJM framework: models the entire forward interest rate curve, which is similar to modeling the entire futures curve in commodities
- (1 - tractability) a model that can be calibrated to market futures prices & option IV
- (2 - completeness) a model that has a complete futures curve that is arbitrage-free, this is need to value storage spot options

No-arbitrage relation between theoretical and real futures prices








Complications for the above stochastics formulas
- our final dft(tau_b, tau_e) equations incorporates tau_b and tau_e (which are the delivery period of futures contracts); but in reality, its not so easy to incorporate delivery periods.
  • (Issue  1 - multiple settlement dates over delivery periods) natural gas physical-settled contracts involve physical delivery spread out over a period from tau_b to tau_e. Contract value isn't tied to price at just one point in time, but rather a weighted average of prices over this entire period.
  • (Issue 2 -  unrealistic assumption) assumes that futures contract are only log-normal in the unrealistic case that volatility function does not depend on delivery date (i.e. d(sigma_t(u))(u)/du = 0). In reality, futures contracts are not log-normal

Workaround for the above
- It is common to fit models to observable current/historical market data 
  • (Step 1 - interpolating theoretical/unobservable prices) theoretical spot and futures prices are derived from the observed market prices using interpolation
  • (Step 2 - fitting model parameters) model parameters, e.g. volatility function, are fitted to interpolated theoretical/unobservable prices
  • (Issue - diff interpolated implied futures curve) the interpolated implied futures curve in step 1 and 2 may be different, hence the parameters estimated in step 2 do not reflect true market dynamics
- Workaround 1 - ignoring delivery periods, empirically shown that parameters estimated are good for first 4 months, but still not perfect. Also, many researches are for discrete payout cash-settled contracts, not perfectly suited for natural gas physical-settled futures contract
- Workaround 2 - trade off between diff stochastic process to model dynamics of natural gas physical-settled futures. 
  • additive stochastics (affine-linear model) process are tractable, computationally simpler but inflexible to capture all real market behaviors, non-additive stochastics models (e.g. BS model) captures real market behaviors (e.g. time-changing volatility, jumps in prices) 
  • stochastics summer-winter spread

Model Proposed
- Instead of modelling hypothetical spot prices, this article propose a new ap proach to model the price dynamics of actively traded futures contracts, and the full futures curve is completed by applying a well-known smooth interpolation function and making it arbitrage free
- (Pros 1) new approach accommodates physical delivery periods that are characteristic for physical natural gas trading and can range from a calendar day for short-term contracts up to more than a calendar year for long-term contracts
  • capture the stochastic behavior of traded futures contracts with fixed nonoverlapping delivery periods through a standard market model and to price all other instruments relative to them based on a smooth interpolation approach
- (Pros 2) new approach can be efficiently calibrated to market futures' price and IV
- (Pros 3) new approach models the dynamics of the complete future price curve
- (Pros 4) new approach is applicable to many real options

Objective of proposed model
- Develop a stochastic term structure model for the entire futures price curve from tau_s to tau_e.  - Assume a natural gas physical-settled futures contract that delivers fixed units of natural gas at fixed intervals
- No transaction cost
- Individual futures contract is traded until its first delivery date

Step 1 - smooth interpolation function
- Use observable futures prices to interpolate arbitrage-free unobservable futures prices. 

Cubic spline: use cubic polynomials to create a smooth curve between points
Natural spline: second derivative = 0 at end points, hence curve is straight at end points
Clamped spline: first derivative = 0 at end points, controlling the slope at end points

Step 1a, static no-arbitrage condition
Two portfolios with same physical delivery flows have same market value at all times


Step 2b, dynamic no-arbitrage condition

Step 2c, maximum smoothness condition









Defining the interpolation function - Lemma 1 - future price curve























Defining the interpolation function - Lemma 2  - risk-neutral spot and futures price dynamics for delivery contracts with theoretical delivery dates and delivery periods








Natural gas storage options
- (part 1 - intrinsic real option value) intrinsic storage value originates from the seasonal pattern of the natural gas futures price curve. E.g. store cheap gas during summer, release expensive gas during winter. Valuing this riskless strategy depends on summer-winter spread implied by futures market, and does not require stochastics model.
- (part 2 - extrinsic storage value) arise from temporary price shocks, which can have a large impact on day-ahead prices without changing the remaining futures price curve
- (temporary price movement) caused by specific events such as extreme weather conditions or temporary supply disruptions. Affects spot prices but not futures prices
- (permanent price movement) long-term change in both spot and futures prices, e.g. 2008 financial crisis

Step 1- consider historical day-ahead and futures return data to select relevant risk factors, while considering their relevance for the storage valuation problem
- Henry Hub natural gas day-ahead contracts traded over-the-counter and Henry Hub natural gas futures contracts for the next 12 calendar months, traded at the Chicago Mercantile Exchange (CME)
- Daily settlement prices are obtained from the Bloomberg database from January 1, 1997 through December 31, 2015. 
-These futures contracts refer to nonoverlapping (i.e. if one delivers in Jan 24, then no other delivers on Jan 24) short delivery periods that span the whole contract period (if storage is for 1 year, then futures also delivers for 1 year) of the underlying storage contract. 
- rolling day-ahead contract

Step 2- calibrate storage-contract model to futures and option market data

Risk factor 1 - perfect parallel shift
Start with a statistical analysis of the common stochastic behavior of natural gas futures price dynamics by principal component analysis (PCA). We first sort the absolute return data by delivery month and then apply a zero-mean and unit-variance normalization. The PCA shows that the first two PCA factors explain 94% of the total variation in the futures price curve. The first risk factor is by far the most important, explaining 90% of the total variation of the futures price dynamics

First risk factor has nearly the same price impact on all futures contracts. Which means it is like a perfect parallel shift of all futures price, which does not impact calendar spread on storage. For simplicity, we substitute the first PCA with a perfect parallel shift. 

Risk factor 2 - monthly seaonality

When the 2nd PCA factor increase, futures price for Nov - Mar increase, others decrease. Suspect this 2nd PCA factor is monthly seasonality. Winter months have higher natural gas demand, summer months (Jun, July) have lower natural gas demand. 2nd PCA factor captures winter-summer spread

Risk factor 3 - Short-term risk factor
Create a short-term risk factor to reflect temporary demand and supply shocks. Model it using exponentially decaying volatility function in the market model. Empirically, less than 10% of total variation of day-ahead price dynamics in captured by price level (e.g. price showing a trend/mean reversion pattern) 



The specification is primarily motivated by the PCA results and the fact that the stochastic summer–winter spread is the decisive factor in the intrinsic storage value, and the short-term factor allows exploitation of the extrinsic storage value using a dynamic trading strategy built upon truly tradable day-ahead contracts.








Commodity Price Dynamics: A Structural Approach. Storage model for daily prices, focusing on higher moments of prices, covariation between prices of diff maturities, and implication of stochastic fundamental volatility, Electricity Price Model

Spreads between spot and futures prices as a measure of the return to storage, and to derive a “supply of storage” curve relating these spre...