R Visualization of Statistical Properties of Future Prices

Future contracts have some particular properties that make them a special assets class. In this article, we will learn about these statistical properties by visualizing them in R. 

Futures Prices have High Volatility and Distribution with Leptokurtic Shape

First of all future contracts are well known for their higher volatility. The price distribution of future prices widely differs from a normal distribution, as it has a considerable number of extreme points that moves the prices beyond the limits of a normal distribution.

The distribution of future prices has a leptokurtic shape because there are too many observations beyond the limits given by the normal distribution. This distribution is characterized by fat tails and high peaks. 

Plot Quantiles and Histogram of Returns

As an exploratory task, we will use the futures prices of WTI Crude Oil and plot the quantiles and the histogram of the returns of the Last field column on the CME_CL_Data_ dataframe. We downloaded this data in the previous article.

# Compare returns quantiles to quantiles of a normal distribution using the qqnorm and qqline commands that plot the quantiles of the series and a quantiles of a normal distribution as a theoretical line

par(mfrow=c(2, 1))

# Define the returns vector with the values of the returns column from  CME_CL_DATA_ 

returns <- CME_CL_Data_$returns
qqnorm(returns, main="CL Returns")
qqline(returns, col="red")

# Generate a histogram with the returns 

ret_hist <- hist(returns, breaks=50,col='red')

CL returns Quantiles and Histogram

This content is for paid members only.

Join our membership for lifelong unlimited access to all our data science learning content and resources.

Related Downloads