File Exchange

image thumbnail

Natural Gas Storage Valuation

version 1.1.0.1 (2.16 MB) by Ameya Deoras
Demos and files from the webinar

5 Downloads

Updated 01 Sep 2016

View License

This example demonstrates using MATLAB to analyze and value a natural gas storage contract. Such valuations are typically done when financing/purchasing storage facilities, structuring contracts to lease storage facilities or marking to market the value of these assets. In this example, we implement some of the most common approaches including Intrinsic Valuation, Spread-Option Valuation & Rolling Intrinsic Valuation. To view the webinar, please visit http://www.mathworks.com/videos/natural-gas-storage-valuation-with-matlab-94575.html
The example demonstrates the complete MATLAB modeling workflow from accessing data, building analytics and sharing results as reports and an Excel deployed application.
Highlights include:
* Realistic storage constraints including ratchets on injection/withdrawal limits
* Linear & integer linear programming
* Downloading & processing data from Quandl using tables
* Spread option pricing
* Monte Carlo simulation of multi-factor forward models calibrated to historical futures and option data with PCA
* 3-D & heatmap visualizations
* Rolling position viewer app

For more information on gas storage valuation, see the included PDF document.

Comments and Ratings (13)

I too changed and ran but somehow still getting error as Error using Quandl.api (line 46)
code,message
QECx02,You have submitted an incorrect Quandl code. Please check your Quandl codes and try again.

quer = ['CME/' future alpha(j) yrsa{i}]

I tried to change the Line 25 Yet it isnt downloading NGQuandl

NaturalGas Forward Curve.xls is missing as well as the Fwd Curve mat can you include them please

Chet Sharma

Thanks Ray - I got in touch with Quandl and they suggested the same. I've modified the files and let Matlab know....they should be updating the zip folder here soon.

Ray

This file was written pointing to an older data source that has since been deprecated. Please change line 25 of downloadNGQuandl.m to

quer = ['CME/' future alpha(j) yrsa{i}]

Chet Sharma

@I Alvarez V - I'm getting the same error as you. Looks like something is wrong with the authenticateQuandl.txt file. Were you able to get this thing to run?

The data are not accesible, in command window this message is appeared: "QECx06","API requests for OFDP has been deprecated. Do you have an altenative data?, please share.

Jiri Kracik

Pls, may i ask you about mathematical formulation of maximum withdrawal or injection constraints? I was not able to find it in the description :)

Anybody else not even able to get this model setup? Something wrong with Quandl interface?

Lu Liu

hi, I read through the description of the valuation model. It seems that you work on a gas storage facility that has 0 working gas volume and returned empty. Have you run your model on a storage facility that has non-zero working gas and be left with gas at the end of contract? How do you value the gas inventory at the beginning and gas left in storage in the end? especially from the PFE/cpty risk point of view?

I couldn't find the excel file 'NGFuturesPriceHistory.xlsx' in the zip files. Can someone help?

kobe

Can we upload the slides for the webinar as well?

Updates

1.1.0.1

Updated license

1.1.0.0

Minor

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Data/

StorageApp/

Utilities/