Comparing Futures vs Spot Prices for WTI Crude Oil
Premium
In this post, we will be comparing the Futures vs Spot Prices for WTI Crude Oil, i.e., the WTI Futures series with the WTI Spot series. The futures prices generally show high volatility and they are more volatile than the underlying spot price. For this purpose, it would be interesting to compare future and spot prices on the same asset and see some metrics of volatility. First we will plot both series for the same period and then will implement a function to get some volatility metrics for each series.
WTI Crude Oil Spot and Future Prices
WTI Crude Oil Spot and Future Prices
The pattern for the two series is similar, but strictly it will be good to have volatility measures for both series. We will make an R function that compares series from spot and future prices WTI for the same period and then calculates the Interquartile Range (difference between 75th and 25th percentiles) and Standard Deviation for both series. With this procedure we can compare volatility measures for the two series.
The future series is the one that we have been using along this tutorial which is the CME_CL_Data_ dataset and we will load oil spot data for WTI from a csv file. The function spotVsFutures will implement this task:
1spotVsFutures <- function(file1,cl_future){23 oilSpot <- read.csv(file1,stringsAsFactors = FALSE)4 oilFuture <- cl_future
5# Retrieve the first and last date from oilSpot dataframe6 first_date <- oilSpot$date[1]7 last_date <- tail(oilSpot$date,1)89# Subset the CME_CL_Data_ by the first date and last date of oilSpot data in order 10# to have both series with same dates11 CL <- subset(CME_CL_Data_,Date >= first_date & Date <= last_date)12# Calculate returns of both series13 future_returns <- diff(log(CL$Last))14 spot_returns <- diff(log(oil_spot$value))15# Make a dataframe with the returns of both series16 df <- data.frame(cbind(spot_returns,future_returns))17# Obtain the standard deviation and the Interquartile Range for both returns series.18 IQRSpot <-round(IQR(df$spot_returns),6)19 IQRFuture <-round(IQR(df$future_returns),6)20 SDFuture <-round(sd(df$future_returns),6)21 SDSpot <-round(sd(df$spot_returns),6)22 cat('Interquartile Range for spot and future returns of WTI are', c(IQRSpot,IQRFuture))23 cat('\n')24 cat('Standard Deviation for spot and future returns of WTI are', c(SDSpot,SDFuture))2526}27
We can now execute the function with our data.
1file1 <-"C:/Users/Nicolas/Documents/Derivatives with R/OilSpot/wti-crude-oil-prices-10-year-daily-chart.csv"23spotVsFutures(file1,CME_CL_Data_)4
By running the function we have the data that the Interquartile Range for the spot and future WTI Crude are 0.021679 and 0.022157 respectively. The Standard Deviations are 0.02039 and 0.0205. We conclude that for both metrics the WTI Future prices have higher values than the WTI spot prices.
Unlock Premium Content
Upgrade your account to access the full article, downloads, and exercises.