当前位置:天才代写 > 作业代写 > Oil Forward Price Model代写 calculations代写 oil model代写

Oil Forward Price Model代写 calculations代写 oil model代写

2020-09-06 12:14 星期日 所属: 作业代写 浏览:10

Oil Forward Price Model代写

Oil Forward Price Model

Oil Forward Price Model代写
Oil Forward Price Model代写

Oil Forward Price Model代写 To plot the forward curve for the earliest trade date and the most recent trade date in the WTI dataset

  1. To plot the forward curve for the earliest trade date and the most recent trade date in the WTI dataset, the first step is to do some calculations on columns: the TRADEDATE column needs to be replaced with an actual date, and a maturity column is added to the dataset.Oil Forward Price Model代写

The WTI forward curve for the earliest market date:

The forward curve for the last market date:Oil Forward Price Model代写

The plots indicate that the WTI curve had dropped significantly, from above 90 to around 53, during 2013 to 2019. While there was a small rebound to 55 in 2019, it decreased quickly and tended to be relatively stable later. In addition, there is no seasonality shown in the oil curve.

  1. To clean the data, the first step is to remove all columns with missing values. Then, compute the log return of SETTLE column and annualize the results, plot the results:
Oil Forward Price Model代写
Oil Forward Price Model代写

There is an obvious outlier data some time in 2017. In order to eliminate its potential adverse effect on the model, remove this offending data from the dataset.

  1. To build volatility functions by using PCA for a 60-month oil model, the first step is to calculate covariance from log returns obtained in Q2 by formula:

 

Next, compute the eigenvector decomposition by formula:

 

And get the amount of variance for the independent Wiener factors:

Oil Forward Price Model代写
Oil Forward Price Model代写

After this, define the percentage of variance explained with n factors:

  1. 2 factors are needed in order to explain at least 99% of the variance.
  2. Use 3 factors to show the three most significant volatility functions. About 99% of variance is explained by these factors. Compute the three volatility functions by formula:
Oil Forward Price Model代写
Oil Forward Price Model代写

Plot the three most significant volatility functions:

The plot shows a clear “shift”, “twist”, “bend” pattern. Values on “shift” curve have the same sign; The front end of the “twist” curve is of the opposite sign as those at the end; The “bend” curve makes the middle contracts move in a different direction than the front.

 

Natural Gas Forward Price ModelOil Forward Price Model代写

  1. Same as what have been initially done to WTI dataset, replace an actual date with TRADEDATE, and compute the maturity column before plotting the gas forward curve.

The gas forward curve for the earliest trade date:

The forward curve for the last trade date:

The plot shows that the gas curve had a general increasing trend with a clear seasonal pattern in 2013. Between 2013 and 2019, the gas price dropped from the range of 4 to 7.5 to the range of 2.4 to 3.8. In 2019, the gas price still had the seasonally increasing pattern, and its variance for each period is clearly larger than 2013.

  1. As the previous plots show clear seasonality in the gas price, the maturities data needs to be de-seasonalized before using them to build a model. Using the first 12 months of maturities for the de-seasonalization. Compute the de-seasonalized annualized log returns by formula:

A snip of the result:Oil Forward Price Model代写

Oil Forward Price Model代写
Oil Forward Price Model代写

. .

. .

. .

 

Then, compute the seasonal factors and plot the result:

The seasonal factors show that, Nov, Dec, Jan, Feb are associated with increased volatility. This is probably beacuse that people using more gas for heat and cars during cold winter times.

  1. Compute the deseasonalized log returns from the seasonality factor and the log returens.

A snip of the reuslt table:

Oil Forward Price Model代写
Oil Forward Price Model代写

The result table indiactes that there are 144 maturities can be used to build the model

  1. In order to compute a PCA model for 60 maturities of gas by using the de-seasonalized annual log returns data, the first step is to define the percentage of variance explained with n factors as what have been done in WTI dataset:

The result of variances shows that 5 factors are needed to explain at least 98% of the variance. Next, using the same technique in WTI dataset, plot the three most significant volatility functions when factor=5:

The “shift”, “twist”, and “bend” curve show expected patterns.

  1. Instead of using 60 maturities of gas data, de-seasonalize the log return data for the first 36 maturities. Same as the step in Q4, compute the percentage of variance explained with n factors:

This time, only 4 factors are needed to explain at least 98% of the variance.

Plot the three most significant volatility functions when factor=4:

Oil Forward Price Model代写
Oil Forward Price Model代写

Comparing the plots for using 60 and 36 maturities data, there is no obvious difference on “shift” and “twist” curve. On the other hand, “bend” curve is smoother when using 36 maturities.

Oil Forward Price Model代写
Oil Forward Price Model代写

更多其他: 统计作业代写 编程代写  计算机代写 金融代写 app代写 作业代写 物理代写 数学代写

合作平台:天才代写 幽灵代写  写手招聘 Essay代写

 


天才代写-代写联系方式