knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Futures trading strategies for price risk management, for commercial hedgers with long or short exposure. All models below aim to achieve a favorable unit price for the energy portfolio, while preventing it from breaching a pre defined cap (floor).

The functions

implement alternative approaches to achieve this goal. They return S4 objects of type CPPI, DPPI, OBPI, SHPI and SLPI respectively, with methods plot(), summary() and show().

We will illustrate with some examples using the synthetic powcal data set, which is included in etrm. The data set contains daily closing prices for a set of yearly baseload power futures contracts:

library(etrm)
data(powcal)

# the first five contracts
head(powcal[1:6])

In our example, we will consider the CAL-06 contract, and start trading 500 days prior to the contract expiry.

day06 <- powcal$Date[!is.na(powcal$`CAL-06`)]
cal06 <- powcal$`CAL-06`[!is.na(powcal$`CAL-06`)]
dat06 <- data.frame(Date = day06, CAL06 = cal06)
dat06 <- tail(dat06, 500)

We will use the obpi() function to implement option-based portfolio insurance, e.g. we synthesize an option via a delta hedging scheme. For the OBPIstrategy, the target price is calculated as an expected cap (floor) given by the option premium-adjusted strike price selected for the delta hedging scheme within a standard Black-76 option pricing framework. The default strike price is set at-the-money. The user may express a view regarding future market development by deviating from this level.

cal06_obpi_b <- obpi(q = 30,               # volume 30 MW (buyer)
                     tdate = dat06$Date,   # vector with trading days until expiry
                     f = dat06$CAL06,      # vector with futures price
                     k = dat06$CAL06[1],   # default option strike price at-the-money
                     vol = 0.2,            # annualized volatility, for the Black-76 delta hedging
                     r = 0,                # default assumed risk free rate of interest
                     tdays = 250,          # assumed trading days per year
                     daysleft = 500,       # number of days to expiry
                     tcost = 0,            # transaction cost
                     int = TRUE            # integer restriction, smallest transacted unit = 1
                   )

plot(cal06_obpi_b, legend = "bottom", title = "OBPI strategy buyer CAL-06")

The summary() method:

summary(cal06_obpi_b)

The show()method provide details regarding daily values for market price, transactions, exposed volume, futures contract position, the target price and the calculated portfolio price. Further details for a specific instance of a trading strategy can be found in the slots, see for example:

slotNames(cal06_obpi_b)

The strategy CAL-06 OBPI strategy from a sellers point of view:

cal06_obpi_s <- obpi(q = - 30,             # volume -30 MW (seller)
                     tdate = dat06$Date,   # vector with trading days until expiry
                     f = dat06$CAL06,      # vector with futures price
                     k = dat06$CAL06[1],   # default option strike price at-the-money
                     vol = 0.2,            # annualized volatility, for the Black-76 delta hedging
                     r = 0,                # default assumed risk free rate of interest
                     tdays = 250,          # assumed trading days per year
                     daysleft = 500,       # number of days to expiry
                     tcost = 0,            # transaction cost
                     int = TRUE            # integer restriction, smallest transacted unit = 1
                   )

plot(cal06_obpi_s, legend = "bottom", title = "OBPI strategy seller CAL-06")


sleire/etrm documentation built on Feb. 5, 2023, 9:02 a.m.