## Commodity Markets and Trade Finance

Energy代写 Your assignment is to build a model of historical volatility for the WTI crude oil and Henry Hub natural gas futures curves

Part I: Energy

First Half of Spring 2019 Term

§c 2019 Gary L. Schultz, PhD

February 22, 2019

### Homework #2: Modeling Forward Oil and Gas Curves with Principal Components Energy代写

30 points. Due Monday, March 4.

Your assignment is to build a model of historical volatility for the WTI crude oil and Henry Hub natural gas futures curves and use it to answer certain  questions.  Please produce a quality report giving insight into the business problems given below. Do not simply run a Jupyter notebook containing the calculations.   Instead you should explain     the analysis to your readers in a way that makes them understand the situation and your conclusions.Energy代写

(You may use any computing tools you like – Matlab and R are very useful. However,there are sample Jupyter notebooks using python included with this assignment. The most useful python packages for working with data in python are “pandas” and “numpy”. You should be able to find all you need by searching for “python pandas” in your favorite search engine.)

#### 1 Data Energy代写

Get all of the files from the PC Homework on the course blackboard site. You should have

• ho.csv containing heating oil prices,
• cl.csv containing crude oil prices (WTI),
• ng.csv containing natural gas prices (Henry Hub), and
• 200 PCA.ipynb containing python code to munge data and do computations for an n-factor heating oil model.

#### 2 Build and Analyze an Oil Forward Price Model Energy代写

Plot the WTI forward curve for the earliest trade date in the dataset and the most recent trade date in the dataset. Based on these plots, describe what kinds of changes the WTI curve has undergone over the period of time covered by this dataset.

##### Clean the data:

The data given has a rather silly looking spike in the log return some time in 2017. Things like this almost always indicate bad data. Please remove the offending days’ data before building the model below.Energy代写

Use the principal components technique described in class to build volatility functions (columns of L) for a 60 month oil model. You need not worry about seasonality for the oil curve.

##### How many factors (columns of L) do you need in order to explain at least 99% of the variance?Energy代写

Show a plot of the three most significant volatility functions. (It should show a clear “shift”, “twist”, “bend” pattern discussed in the lecture.)

#### 3 BuildandAnalyzeaNaturalGasForwardPriceModel

Plot the gas forward curve for the earliest trade date in the dataset and the most recent    trade date in the dataset. Based on these plots, describe what kinds of changes the henry hub curve has undergone over the period of time covered by this dataset.

##### Natural gas markets are very seasonal. Energy代写

Please compute the de-seasonalized annualized log returns and the seasonal factors as shown in the lectures. Recall that seasonal factors should average to 1. Again, assume 250 trading days per year. You should consider using the first 12 months of maturities for the de-seasonalization. Show a plot of the seasonal factors. Which parts of the year are associated with increased volatility?

Next, compute the deseasonalized log returns from the seasonality factor and the log returns. How many maturities do you have data enough to build a model (with no missing data)?Energy代写

##### Based on the de-seasonalized annual log returns, compute a principal components model for 60 maturities of gas.

Use all of these return data (every trading date given in the data file). How many factors are needed to explain at least 98% of the variance? Plot those volatility functions (that explain 98% of the variance), showing the “shift”, “twist”, and “bend”, etc. as applicable.Energy代写

##### Finally,  consider the de-seasonalized log return data for the first 36 maturities.

That is, we wish to restrict the model to the first three years instead of all possible maturities as given above. How many factors do you now need to explain 98% of the variance? Please plot those volatility functions as above (showing “shift” etc.).Energy代写

QQ在线咨询

QQ:3554475127

QQ:3042439236