Matlab Based Stochastic Processes in Stochastic Asset Portfolio Optimization

Similar documents
Stochastic Programming in Gas Storage and Gas Portfolio Management. ÖGOR-Workshop, September 23rd, 2010 Dr. Georg Ostermaier

Notes. Cases on Static Optimization. Chapter 6 Algorithms Comparison: The Swing Case

Investigations on Factors Influencing the Operational Benefit of Stochastic Optimization in Generation and Trading Planning

King s College London

Market interest-rate models

arxiv: v1 [math.oc] 28 Jan 2019

On modelling of electricity spot price

Energy Systems under Uncertainty: Modeling and Computations

Counterparty Credit Risk Simulation

Calculating VaR. There are several approaches for calculating the Value at Risk figure. The most popular are the

Credit Valuation Adjustment and Funding Valuation Adjustment

The Use of Importance Sampling to Speed Up Stochastic Volatility Simulations

Term Structure Models with Negative Interest Rates

Resource Planning with Uncertainty for NorthWestern Energy

STOCHASTIC PROGRAMMING FOR ASSET ALLOCATION IN PENSION FUNDS

VOLATILITY EFFECTS AND VIRTUAL ASSETS: HOW TO PRICE AND HEDGE AN ENERGY PORTFOLIO

The Evaluation of Swing Contracts with Regime Switching. 6th World Congress of the Bachelier Finance Society Hilton, Toronto June

Stochastic Finance 2010 Summer School Ulm Lecture 1: Energy Derivatives

AMH4 - ADVANCED OPTION PRICING. Contents

Interest Rate Bermudan Swaption Valuation and Risk

Sanjeev Chowdhri - Senior Product Manager, Analytics Lu Liu - Analytics Consultant SunGard Energy Solutions

PHASE I.A. STOCHASTIC STUDY TESTIMONY OF DR. SHUCHENG LIU ON BEHALF OF THE CALIFORNIA INDEPENDENT SYSTEM OPERATOR CORPORATION

(FRED ESPEN BENTH, JAN KALLSEN, AND THILO MEYER-BRANDIS) UFITIMANA Jacqueline. Lappeenranta University Of Technology.

2.1 Mathematical Basis: Risk-Neutral Pricing

King s College London

ÖGOR - IHS Workshop und ÖGOR-Arbeitskreis

The Value of Storage Forecasting storage flows and gas prices

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

Market Risk: FROM VALUE AT RISK TO STRESS TESTING. Agenda. Agenda (Cont.) Traditional Measures of Market Risk

M5MF6. Advanced Methods in Derivatives Pricing

MSc in Financial Engineering

Puttable Bond and Vaulation

EE266 Homework 5 Solutions

1. In this exercise, we can easily employ the equations (13.66) (13.70), (13.79) (13.80) and

Credit Risk : Firm Value Model

Math 416/516: Stochastic Simulation

Credit Portfolio Simulation with MATLAB

Managing Temperature Driven Volume Risks

Risk Neutral Valuation

Computer Exercise 2 Simulation

hydro thermal portfolio management

Scenario reduction and scenario tree construction for power management problems

AD in Monte Carlo for finance

NEWCASTLE UNIVERSITY SCHOOL OF MATHEMATICS, STATISTICS & PHYSICS SEMESTER 1 SPECIMEN 2 MAS3904. Stochastic Financial Modelling. Time allowed: 2 hours

Chapter 15: Jump Processes and Incomplete Markets. 1 Jumps as One Explanation of Incomplete Markets

Interest Rate Cancelable Swap Valuation and Risk

Importance Sampling for Option Pricing. Steven R. Dunbar. Put Options. Monte Carlo Method. Importance. Sampling. Examples.

Gas storage: overview and static valuation

Final exam solutions

Implications of Spot Price Models on the Valuation of Gas Storages

Errata, Mahler Study Aids for Exam 3/M, Spring 2010 HCM, 1/26/13 Page 1

Valuation of Asian Option. Qi An Jingjing Guo

Numerical Methods for Pricing Energy Derivatives, including Swing Options, in the Presence of Jumps

Monte Carlo Simulations

Modeling spark spread option and power plant evaluation

arxiv: v1 [math.pr] 15 Dec 2011

Callable Bond and Vaulation

Math 623 (IOE 623), Winter 2008: Final exam

Practical example of an Economic Scenario Generator

Combined Accumulation- and Decumulation-Plans with Risk-Controlled Capital Protection

Simulation of delta hedging of an option with volume uncertainty. Marc LE DU, Clémence ALASSEUR EDF R&D - OSIRIS

JDEP 384H: Numerical Methods in Business

Introducing Uncertainty in Brazil's Oil Supply Chain

Robust Optimization Applied to a Currency Portfolio

Energy Price Processes

MASM006 UNIVERSITY OF EXETER SCHOOL OF ENGINEERING, COMPUTER SCIENCE AND MATHEMATICS MATHEMATICAL SCIENCES FINANCIAL MATHEMATICS.

Risk Neutral Pricing Black-Scholes Formula Lecture 19. Dr. Vasily Strela (Morgan Stanley and MIT)

Interest Rate Curves Calibration with Monte-Carlo Simulatio

The Pennsylvania State University. The Graduate School. Department of Industrial Engineering AMERICAN-ASIAN OPTION PRICING BASED ON MONTE CARLO

Stochastic Loss of Load Study for the 2011 Integrated Resource Plan

3.1 Itô s Lemma for Continuous Stochastic Variables

Trading of Pumped Hydro Storages in ID Markets

Exact Sampling of Jump-Diffusion Processes

Two and Three factor models for Spread Options Pricing

Asian Option Pricing: Monte Carlo Control Variate. A discrete arithmetic Asian call option has the payoff. S T i N N + 1

Conditional Density Method in the Computation of the Delta with Application to Power Market

Interest rate models and Solvency II

A Moment Matching Approach To The Valuation Of A Volume Weighted Average Price Option

Continous time models and realized variance: Simulations

From Discrete Time to Continuous Time Modeling

Option Pricing Using Monte Carlo Methods. A Directed Research Project. Submitted to the Faculty of the WORCESTER POLYTECHNIC INSTITUTE

Portfolio-based Contract Selection in Commodity Futures Markets

Quantitative Trading System For The E-mini S&P

Volatility Trading Strategies: Dynamic Hedging via A Simulation

Assicurazioni Generali: An Option Pricing Case with NAGARCH

Advanced Topics in Derivative Pricing Models. Topic 4 - Variance products and volatility derivatives

ESGs: Spoilt for choice or no alternatives?

Simulating Stochastic Differential Equations

Project exam for STK Computational statistics

Bandit Problems with Lévy Payoff Processes

Yield to maturity modelling and a Monte Carlo Technique for pricing Derivatives on Constant Maturity Treasury (CMT) and Derivatives on forward Bonds

(A note) on co-integration in commodity markets

Competition in Electricity Markets with Renewable Sources

The stochastic calculus

MFIN 7003 Module 2. Mathematical Techniques in Finance. Sessions B&C: Oct 12, 2015 Nov 28, 2015

Calibration of Ornstein-Uhlenbeck Mean Reverting Process

Calibration and Simulation of Interest Rate Models in MATLAB Kevin Shea, CFA Principal Software Engineer MathWorks

Market Risk Analysis Volume I

Dynamic Risk Management in Electricity Portfolio Optimization via Polyhedral Risk Functionals

Financial Engineering

Transcription:

Matlab Based Stochastic Processes in Stochastic Asset Portfolio Optimization Workshop OR und Statistische Analyse mit Mathematischen Tools, May 13th, 2014 Dr. Georg Ostermaier, Ömer Kuzugüden

Agenda Introduction of Decision Trees Workflows of Stochastic Optimization in different problem settings Stochastic Processes Gas Asset Optimization Thermal Power Portfolio Optimization Hydro System Optimization Parameter Estimation for Stochastic Processes Outperformance of Stochastic over Deterministic Optimization 2

3 Introdcuction Decision Trees GmbH

Decision Trees Founded by Georg Ostermaier in 2006 Spin Off from the Institute for Operations Research und Computational Finance at the university of St.Gallen Cooperation with the IOR/CF (Prof. Dr. Karl Frauendorfer) Cooperation with EPFL (Lausanne, Prof. Dr. Daniel Kuhn) Currently six employees + student workers Main office: Munich, Germany Software and Consulting for the introduction of advanced Stochastic Optimization into the Energy Industry Added value of Stochastic over Deterministic Optimization Two major types of model application: Valuation of assets and asset portfolios (intrinsic/extrinsic) Advanced decision support in daily operation of asset portfolios based on deterministic/stochastic optimization 4

5 Solid customer base

DT.Energy Suite DT.Analytics Stochastic Processes for Power, Gas and CO2, demands Parameter Estimation for Stochastic processes Monte Carlo Scenario Generation Scenario Tree Generation DT.PFC Calculation of Daily Price Forward Curves for gas markets Calculation of Hourly Price Forward Curves for power markets 100% Matlab 50% Matlab DT.Plant Stochastic and deterministic valuation and operation planning of thermal power plants Stochastic and deterministic asset portfolio optimization (power plants, gas storages, steam generators, gas supply contracts, combined heat and power generation portfolios etc.) DT.Storage Stochastic and deterministic valuation and operation planning for Gas storages, gas contracts Gas procurement portfolios, gas trading portfolios DT.Hydro 10% Matlab 10% Matlab 10% Matlab Stochastic and deterministic valuation and operation planning of hydro power systems (pumped storage systems) 6

7 Workflows in Stochastic Optimization

Stochastic Optimization Workflow (Thermal generation portfolio) Stochastic impacts: Fuel Prices (e.g. TTF) Power Spot prices price (e.g. EPEX) EUA price (optional) Outages (optional) Historic TTF spot price Estimation VolatilityMean Reversion (TTF price) Stochastic Optimization 1) Scenario Trees Historic EPEX spot price Estimation Volatilität/Mean Reversion (EEX price) (Spot price, Demand etc.) 2) max Objective P&L Distributions Historic EUA price Estimation Volatilität/Mean Reversion (CO2 price) Actual PFCs 3) Solving of mathematical model Solver (CPLEX ) Constraints Marginal prices (shadow prices) Distributions of fuel consumptions Schedules 8

800 700 600 500 400 300 200 100 0 1 3 5 7 9 calendar week 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 Stochastic Optimization Workflow (Hydro Power Systems) Stochastic impacts Power price (spot EPEX) Reservoir inflows Historic infows monthly m^3 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 Estimation of process parameters (Reservoir inflows) daily Historic EEX Estimation of process parameters (spot price) DT Hydro Profit&Loss Distributions Historic EEX Calculation of HPFC (Fleten) Current HPFC, Inflow Forecasts Mean of distribution = Extrinsic value 9

Stochastic Optimization Workflow (Natural Gas Portfolio) Stochastic Impacts: gas Spot prices (single or multiple hubs), gas forward prices ((single or multiple hubs) gas retail demand, oil prices, FX rates Historic Gas prices (spot, forward) Historic Demand Estimation of stochastic proess parameters (Volas, Mean reversions, Correlations) Stochastic Optimization: 1) Scenario trees (Spot price, demand, oil indices) Historic Oil Indices Historic FX Rates Price Forward Curves, Demand Forecasts 2) max Objective function 3) Solving math model Solver (CPLEX ) Constraints Profit&Loss- Distribution Value of Asset Shadow prices Delta Positions Operational decisions 10

System Overview Market Data System Physical Asset Data Trading System (ETRM) DT. Energy PFC s. Matlab- Routines (Stochsatic Processes) Shadow prices Database Hist. prices Asset data Opt. results operational asset data operational trading data Marked data, PFC s asset data Stoch. parameters Cplex, Gurobi Output Shadow prices Portfoliomanagement System 11

Tool Building Blocks Contract Constraints 12

Price Pathing The current forward quotations are the baseline for the scenario generation. The scenarios are generated in such a way that for every day the average over all scenarios is equal the forward curve, thus satisfying the arbitrage free condition Stochastic Price Model Monte Carlo Scenario Generation Scenario Tree Generation Stochastic price models aim to model (scenario) deviation from forward curve using following logic For a given day, forward settlement prices are known and fixed, and thus the mean value to which the spot price scenario is supposed to revert to is also fixed Tomorrow however the expected value of the forward curve will have changed and thus the spot prices will be affected by the uncertainty of this mean-value as well Purpose of Monte Carlo scenario generation is to produce sufficiently many scenarios of joint (correlated) evolutions of forward products quotes in future 13

14 Stochastic Price Processes

Stochastic Pilipovic Process G = Simulated Deviation of Spot Price Mean Reversion ( s/ w) t ( s/ w) G ( s/ w) ( s/ w) dgt ( Yt Gt ) dt G dy dw ( G) ( G) G t T 2 Short Term Volatility dw ( s/ w) t Long Term Evolution G( t) G(0) exp( G ( t)) G = Simulated Deviation of Spot Price t Equation is referred to as a 2-risk Factor Stochastic Pilipovic Process because the simulated deviation of the Spot Price depends on a mean reversion and a short term volatility (G) dyt s w dg ( / ) t t Deviation form Long Term Price Simulated Deviation of Spot Price 15

Parameter Estimation for gas price Pilipovic Process Aims to provide parameters that enter into stochastic differential equations (Pilipovic equation) describing natural gas prices on different hubs, oil and other commodity prices Assuming that future is not much unlike the past, parameters can be extracted from historical prices Parameters to be estimated Short Term Mean Reversion α s/w Spot Volatility σ G s/w Long Term Mean Reversion ν G Input curves required for Parameter Estimation Historic spot price curve (red line) Historic Price Forward Curve (blue line) Historic quote of a selected forward product (green line) 16

Korrelation der Commodity-Preise System of stochastic differential equations for power, gas and CO2-prices Mean- Reversion Power spot price process (two factor): Fuel price process (two factor): Langzeit-Trend Volatilität CO2 price process: 17

System of stochastic differential equations for power prices, run of river and high mountain hydro inflows Spot price process: Long term process of EEX forwards: run of river inflows: high mountain inflows: Stochastic inflow process: Brownian motion with mean reversion, log normal distribution 18

Correlation of Commodity Prices Model of 4 Correlated Stochastic Price Processes for Oil, Power, Gas and CO2 (two factor models for oil and power) 19

Preprocessing of time series for the parameter estimation Gap Filling becomes importance due to different granularities in the commodity time series! 1. Check the historic time interval whether all needed time series data are available 2. Generation of logarithmic time series X(t) based on the historic spot prices S(t) and the historic PFCs F(t), for gas and power prices (Historic PFCs F(t) must be re-calculated, if not available anymore) 3. Assignment of price bands to the historic time series of power and gas prices 4. Filtering jumps out of the historic power price time series S(t) by means of 6-Sigma-Method (otherwise over-estimation of the volatility) 5. Gap filling in the historic time series utilizing Brownian Bridge or Ohrnstein-Uhlenbeck Bridges 6. Estimation of jump terms for power price process Jump height, jump intensity (separately for up and down jumps) Identification of jumps: 6-sigma-method 20

Kalman-Filtering: Iterative Max-Log-Likelihood-Estimation Start: Initial Set of Parameters,, r etc... Loop Generate a prediction for the next (multidimensional) value (time step by time step) Kalman Filter Prediction Calculate the error (difference) between prediction and real observation (time step by time step) Cumulate the error terms with respect to the parameters => Numeric Max Likelihood-Function Search for new parameters, which maximize the likelihoodfunction and thereby minimize the prediction error. Eventually the improved parameters are determined. Next loop Stopping criteria: if the improvements of the parameters falls below a defined value of e Correction 21

MC Scenario Generation Forward - example Exemplary result of a MC generation of 10 single path scenarios of German NCG gas forward prices Individual scenario generation for each tradable product considering all correlations Based on multidimensional stochastic process, VaR/Covar-Matrix estimated from past price quotations 22

23 Outperformance of Stochastic over Deterministic Optimization

Gasteinertal-Cascade (modeled in DT.Hydro) 24

Rolling Optimization, Gasteinertal hydro cascade 01.07.2011 to 30.06.2012 Scenario Trees of EPEX-Prices and reservoir inflows 01.07.2011 01.10.2006 366 stochastische Optimierungen 02.07.2011 30.06.2012 PFCs/Forecasts of EPEX-Prices and reservoir inflows 01.07.2011 02.07.2011 366 deterministische Optimierungen 30.06.2012 25

Cumulated revenues 26

27

Contact Dr. Georg Ostermaier M.Sc. Ömer Kuzugüden Decision Trees GmbH Ludwigstraße 8 D-80539 München Tel: +49 89 20 60 21 150 Mobile: ++49 172 9039456 email: georg.ostermaier@dtrees.com oemer.kuzugueden@dtrees.com Web: www.dtrees.com 28