Code covered by the BSD License  

Highlights from
Energy Trading & Risk Management with MATLAB Webinar Case Study


5.0 | 9 ratings Rate this file 75 Downloads (last 30 days) File Size: 3.07 MB File ID: #28056
image thumbnail

Energy Trading & Risk Management with MATLAB Webinar Case Study



29 Jun 2010 (Updated )

MATLAB code for the generation asset risk analysis case study

| Watch this File

File Information

* Update: To see the recorded webinar please visit,

The case study presented here demonstrates using MATLAB to build an application for measuring the risks associated with a portfolio of gas-fired power plants operated in New England. The application has an interface implemented in Excel with all of the analytics performed by MATLAB. The application allows the user to specify the characteristics of the 7 plants including the capacity, heat rate, variable operation and maintenance costs and minimum run time. This portfolio can be backtested using a simple dispatch strategy on historical gas and electricity prices to compute historical profit and plant operation statistics. The risk measures are computed by simulating gas and electricity prices into the future using a hybrid model implemented in MATLAB, simulating the dispatch for each scenario of market prices and computing cash-flows arising from the operation of the plants. The distribution of the cash-flows is analyzed to produce a 90% and 95% cash-flow at risk measure for each plant as well as for the portfolio of generation assets. All of this functionality is presented with a succinct Excel front end.

The document titled "Introduction to ETRM Case Study" will guide you through the different components of the analysis.

Note: The data used in this application is not provided with the MATLAB Central File Exchange entry. The data can be obtained from the New England ISO at The Natural Gas spot price data can be obtained from the Wall Street Journal at You can still view the results of running each script on the data by viewing the MATLAB-published reports included in the archive and also linked below.


Intelligent Dynamic Date Ticks inspired this file.

Required Products Curve Fitting Toolbox
Database Toolbox
Econometrics Toolbox
MATLAB Compiler
Statistics Toolbox
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (14)
17 May 2014 Yoga Rajan  
14 May 2014 puqiao  
11 May 2014 sinlin ray  
08 Nov 2012 Szilárd Németh


22 Apr 2012 Ruhi Gupta

Thanks Chetan for the info...
But i managed to run it without the file; i guess, the saved models are sufficient to get things done, but i'll surely try to get the accdb file also, if possible...

anyway, thanks again!

20 Apr 2012 Chet

Hi Ruhi, you'll get it if you attend the actual seminar. Or you could contact Matlab directly, I'm sure they'll send it over to you.

17 Apr 2012 Ruhi Gupta

@Chetan, from whr did u get the energy.accdb file???

14 Apr 2012 Chet

I tried to open the energy.accdb in matlab and it asks me for a login. Does anyone have it?

19 Apr 2011 Laszlo Siller

I think this is a very good seminar,

Could somebody help me with the following error , ModelNGPrice.m ;

sata =

NaturalGas: [2676x1 double]
Info: [1x1 struct]
Date: [2676x1 double]

??? Undefined function or variable 'data'.

Error in ==> ModelNGPrice at 19
S = data.NaturalGas;

Thank you

22 Dec 2010 Pierluigi

I think this is a very good seminar, however I'm not able to find the data of the database on the websites amd
Could you kindly advise me how can I get energy.accdb file? or could you please give me the matlab workspace with all the data?
Thank you very much

king regards

22 Dec 2010 Pierluigi

I think this is a very good seminar, however I'm not able to find the data of the database on the website
Could you kindly advise me how can I get energy.accdb file?

03 Oct 2010 Mohd Reaz-us Salam Elias

An excellent webinar. I've learnt a lot within less than an hour. At the same time, I'm afraid - MATLAB is moving so fast that throws extra challenges to a novice researcher like me.

02 Aug 2010 Taiwo

This is top class webinar. How can i have a Powerpoint presentation of this as i need to listen to this over and over again...

22 Jul 2010 Andres Licona  
01 Jul 2010

Added link to recorded webinar

03 Jan 2011

Minor edit. Added MAT-file. No change to code.

Contact us