PART 5 DYNAMIC PROGRAMMING

Similar documents
Option Valuation. Chapter 21

Consider a European call option maturing at time T

Scheduling Single Machine Scheduling. Tim Nieberg

Scheduling Shop Scheduling. Tim Nieberg

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Chapter 21: Options and Corporate Finance

Reinforcement Learning

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

10 Binomial Trees One-step model. 1. Model structure. ECG590I Asset Pricing. Lecture 10: Binomial Trees 1

FAIR VALUATION OF THE SURRENDER OPTION EMBEDDED IN A GUARANTEED LIFE INSURANCE PARTICIPATING POLICY. Anna Rita Bacinello

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

The Goldberg Rao Algorithm for the Maximum Flow Problem

Buy a number of shares,, and invest B in bonds. Outlay for portfolio today is S + B. Tree shows possible values one period later.

Reinforcement Learning

Binomial lattice model for stock prices

Warshall s Algorithm: Transitive Closure

GRAPH THEORY LECTURE 4: TREES

Institutional Finance 08: Dynamic Arbitrage to Replicate Non-linear Payoffs. Binomial Option Pricing: Basics (Chapter 10 of McDonald)

CS 522 Computational Tools and Methods in Finance Robert Jarrow Lecture 1: Equity Options

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Solutions to Homework 6

The Black-Scholes Formula

Minimum cost maximum flow, Minimum cost circulation, Cost/Capacity scaling

Approximation Algorithms

American and European. Put Option

American Options. An Undergraduate Introduction to Financial Mathematics. J. Robert Buchanan. J. Robert Buchanan American Options

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

7: The CRR Market Model

n(n + 1) n = 1 r (iii) infinite geometric series: if r < 1 then 1 + 2r + 3r 2 1 e x = 1 + x + x2 3! + for x < 1 ln(1 + x) = x x2 2 + x3 3

6.231 Dynamic Programming and Stochastic Control Fall 2008

Discrete Optimization

Problem Set 7 Solutions

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Single machine parallel batch scheduling with unbounded capacity

Monte Carlo Methods in Finance

9.2 Summation Notation

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS

Chapter 1: Financial Markets and Financial Derivatives

Options: Valuation and (No) Arbitrage

Numerical Methods for Option Pricing

Call and Put. Options. American and European Options. Option Terminology. Payoffs of European Options. Different Types of Options

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015

FINANCIAL OPTION ANALYSIS HANDOUTS

Option Values. Determinants of Call Option Values. CHAPTER 16 Option Valuation. Figure 16.1 Call Option Value Before Expiration

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

Lecture 3: Put Options and Distribution-Free Results

Hull, Chapter 11 + Sections 17.1 and 17.2 Additional reference: John Cox and Mark Rubinstein, Options Markets, Chapter 5

Lecture 6: Option Pricing Using a One-step Binomial Tree. Friday, September 14, 12

3 Introduction to Assessing Risk

How To Price A Call Option

EC3070 FINANCIAL DERIVATIVES

Mathematical Finance

One Period Binomial Model

Optimal Index Codes for a Class of Multicast Networks with Receiver Side Information

2. Exercising the option - buying or selling asset by using option. 3. Strike (or exercise) price - price at which asset may be bought or sold

Lecture 1: Course overview, circuits, and formulas

6.852: Distributed Algorithms Fall, Class 2

Hedging. An Undergraduate Introduction to Financial Mathematics. J. Robert Buchanan. J. Robert Buchanan Hedging

Lecture 11. Sergei Fedotov Introduction to Financial Mathematics. Sergei Fedotov (University of Manchester) / 7

Lecture 9. Sergei Fedotov Introduction to Financial Mathematics. Sergei Fedotov (University of Manchester) / 8

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Multi-layer Structure of Data Center Based on Steiner Triple System

Forward Price. The payoff of a forward contract at maturity is S T X. Forward contracts do not involve any initial cash flow.

1 Introduction to Option Pricing

Introduction to Binomial Trees

Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

Modeling and Performance Evaluation of Computer Systems Security Operation 1

Optimization Modeling for Mining Engineers

5.1 Bipartite Matching

Welcome to the course Algorithm Design

Overview. Option Basics. Options and Derivatives. Professor Lasse H. Pedersen. Option basics and option strategies

Chapter 21 Valuing Options

Options Pricing. This is sometimes referred to as the intrinsic value of the option.

UCLA Anderson School of Management Daniel Andrei, Derivative Markets 237D, Winter MFE Midterm. February Date:

Lecture 5: Put - Call Parity

BINOMIAL OPTIONS PRICING MODEL. Mark Ioffe. Abstract

Chapter 2: Binomial Methods and the Black-Scholes Formula

Discrete Applied Mathematics. The firefighter problem with more than one firefighter on trees

Near Optimal Solutions

Lecture 4: Properties of stock options

Offline sorting buffers on Line

Direct Methods for Solving Linear Systems. Matrix Factorization

Part V: Option Pricing Basics

FIN Investments Option Pricing. Options: Definitions. Arbitrage Restrictions on Call Prices. Arbitrage Restrictions on Call Prices

Lecture 21 Options Pricing

Max Flow, Min Cut, and Matchings (Solution)

Dynamic Programming 11.1 AN ELEMENTARY EXAMPLE

1 Interest rates, and risk-free investments

FIN FINANCIAL INSTRUMENTS SPRING 2008

ECE302 Spring 2006 HW3 Solutions February 2,

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

The Trip Scheduling Problem

Algorithm Design and Analysis

Social Media Mining. Graph Essentials

Review of Basic Options Concepts and Terminology

S 1 S 2. Options and Other Derivatives

Additional questions for chapter 4

Transcription:

PART 5 DYNAMIC PROGRAMMING 13

Shortest paths in directed graphs Directed graph Tuple G= (V,A), where V is finite set of nodes and A V V is set of arcs (also called edges); arc from u to v is denoted by uv c : A R weights on arcs Path is sequence P= v,v 1,...,v k of nodes such that v i 1 v i A for i=1,...,k. Length of path c(p)= k i=1 c(v i 1v i ) Path v,v 1,...,v k with v = v k is called cycle Shortest path problem Let s V. Determine for each v V a shortest path from s to v. 131

Bellman s Equations Suppose G does not contain cycle of negative length Let l(v) be length of shortest path from s to v (possibly ) Clearly l(s) = (no neg. cycles!) For uv A one has l(v) l(u)+c(uv) If v s, there must be a node u on shortest path from s to v immediately preceding v. For this u one has l(v)=l(u)+c(uv) (principle of optimality) The shortest path distances l(v) satisfy Bellman s equations x s =, x v = min{x u + c(uv): uv A}, v V. 132

Sufficiency Theorem: If G does not contain cycles of length and if one has a path from s to each other node v, then there is unique solution to Bellman s equations, where x u = l(u) for each u V. 133

Proof Let x be solution to Bellman s equations Let v V, v s. There exists uv A with x v = x u + c(uv). Likewise, there exists w V with x u = x w + c(wu). If, repeating, this process, we come back to v again, we have found a cycle of length which is excluded Consequently, we arrive at s and we have constructed a path P= (s=v,v 1,...,v k = v) with x v = c(p)+x s = c(p). This shows x v l(v). Suppose x l. Then there exists node v with x v > l(v) such that the node u preceding v on shortest path from s to v has x u = l(u). Bellman s equations imply x v x u + c(uv)=l(u)+c(uv)=l(v) 134

Acyclic Graphs G = (V, A) is acyclic if G does not contain cycles In this case, G has an ordering < of nodes, such that uv A implies u<v (depth first search) Assume nodes are set {1,...,n}. Bellman s equations acyclic graphs x 1 = x j = min k<j (x k + c kj ) j=2,3,...,n. Easily solved by substitution x 2 is determined from x 1, x 3 determined from x 1 and x 2 etc. Running time: O( A + V ) 135

Bellman-Ford algorithm Bellman-Ford algorithm x j v length of shortest path from s to v using at most j arcs Initialization: x 1 s =, x1 v = { c(sv) for i=2,...,n for v V Running time x i v = min{xi 1 v Iterations outer loop: V if sv A otherwise.,min uv A {xu i 1+ c(uv)}} Each arc is considered exactly once in inner loop: O( A ) Complexity: O( V A ). 136

Negative cycles If network does not contain negative cycles and v is reachable from s, then a shortest path uses at most n 1 arcs. Bellman-Ford is correct if no negative cycles are present. Exercise Design a polynomial-time algorithm which detects whether G = (V, A) together with arc-weights c has a negative cycle. 137

Dynamic programming A capital budgeting problem 4 million to be invested in projects in three different regions At most one project can be run in each region Region 1 Region 2 Region 3 Project cost/profit cost/profit cost/profit 1 / / / 2 1/2 1/3 1/2 3 2/4 3/9 2/5 4 4/1 - - Enumeration 4 3 3 possibilities 138

Integer program x ij = 1 if project i is run in region j max ij p ij x ij i x ij 1, j= 1,...,3 ij c ij x ij 4 x ij {,1}. 139

Dynamic program States (i, j) represents optimal choice for first i {, 1, 2, 3} regions having still j {, 1, 2, 3, 4} mio. left to invest. Construct graph with nodes being states and arcs from stages (i,j) to (i+ 1,j ) having cost p if the investment of j j reflects an implementation of a project of cost j j and profit p in region i+ 1 Longest path in this directed acyclic graph is optimal strategy Number of states: 4 5 If we had x N regions with at least two possible projects per region and an amount of y N to invest, where each project would have integral costs, one would have (x + 1) (y + 1) states, whereas enumeration would require at least 2 x decisions to be compared. 14

Example cont. (,4) (1,4) (1,3) (1,2) (1,1) (1,) (2,4) (2,3) (2,2) (2,1) (2,) (3,4) (3,3) (3,2) (3,1) (3,) 2 4 1 3 9 3 9 3 2 5 2 5 2 5 2 2 4 1 3 5 9 11 3 5 9 11 141

Forward and backward recursion Forward recursion: Label each state which is reachable from starting state with the longest path distance from starting state using profits as edge costs. Process starts from starting node Backward recursion: Label each state with largest profit that can be collected from this state. 142

The Knapsack Problem Knapsack n items of weight w i N and profit p i N, i=1,...,n Knapsack of capacity K N Task: Compute subset of items which still fit into knapsack and maximizes the profit Integer Program max n i=1 p ix i n i=1 w ix i K x i {,1}. 143

Dynamic program for Knapsack W i (p) least possible weight that has to be accumulated in order to have total profit p using only items from {1,...,i} W i+1 (p)=min{w i (p),w i (p p i+1 )+w i+1 } States: {(i,p): i {1,...,n}, p {,...,n p max }}, where p max = max{p i : i=1,...,n}. There is an edge from (i,p) to (i+ 1,p) of weight and there is an edge from (i,p) to (i+ 1,p+p i+1 ) of weight w i+1. Compute shortest path distances from (,) to all nodes in directed graph Number of nodes: p max n 2 Number of arcs: 2 p max n 2 Theorem The knapsack problem can be solved in time O(n 2 p max ). 144

Alternative dynamic program P i (w): Maximum profit which can be accumulated choosing items out of {1,..., i} having total weight w. P i+1 (w)=max{p i (w),p i (w w i+1 )+p i+1 } States: {(i,w): i {1,...,n}, w {,...,K }} There is an edge from (i,w) to (i+ 1,w) of weight and an edge from (i,w) to (i+ 1,w+ w i+1 ) of weight p i+1. Number of states: n K Number of arcs: 2 n K Find longest paths from (,) to other states Running time: O(n K) 145

Approximation algorithm ε-approximation algorithm Let ε> be a number The algorithm A computes an ε-approximation to the knapsack problem, if it computes a feasible solution x ε with p T x ε (1 ε)p T x OPT, where x OPT is an optimal solution of the Knapsack problem A is fully polynomial time approximation scheme if the running time of A is polynomial in n and 1/ε. 146

Designing A Set last t bits of each p i to obtaining profits p i Let x {,1} n be feasible knapsack solution. Clearly p T x p T x p T x n 2 t Let x 1,x 2 be opt. sol w.r.t. p and p respectively One has p T x 1 p T x 2 p T x 2 p T x 1 p T x 1 n 2 t from which we conclude p T x 1 p T x 2 n 2 t We want (p T x 1 p T x 2 )/p T x 1 ε We have (p T x 1 p T x 2 )/p T x 1 n 2 t /p max If n/p max > ε solve problem with exact algorithm which takes time O(n 2 p max )=O(n 3 /ε). Else find t with ε/2< n 2 t /p max ε Apply algorithm to instance defined by p=p/2 t. p max 2 t p max < 2 n 2t ε 2 t = 2 n/ε. Running time: O(n 2 p max )=O(n 3 /ε) 147

Fully polynomial time approximation scheme for Knapsack Theorem There exists an algorithm which, given a knapsack instance and ε> computes a feasible solution x with OPT(1 ε) p T x Where OPT denotes the value of an optimal solution. The running time of the algorithm is O(n 3 /ε). 148

PART 5.1 OPTION PRICING 149

American call options Gives the holder right to purchase underlying security for prescribed amount strike price Valid until certain expiration date Pricing derivative security S current price of underlying security Two possible outcomes up and down at time 1: S u 1 = S u S d 1 = S d How to price the derivative security? 15

Replication Consider portfolio of shares of the underlying and B cash Up-state: S u+b R, (R is risk-less interest rate) Down-state: S d+ B R For what values of and B will portfolio have same payoff C1 u and C1 d of derivate? S u+b R = C1 u S d+ B R = C1 d One obtains = Cu 1 Cd 1 S (u d) B= ucd 1 dcu 1 R(u d) 151

Since portfolio is worth S +B today, this should also be price for derivate security C = Cu 1 Cd 1 u d + ucd 1 dcu 1 R(u d) = 1 [ R d R u d Cu 1 + u R ] u d Cd 1 Risk-neutral probabilities p u = R d u d, p d = u R u d Remark There is arbitrage opportunity if u>r>d is not satisfied. Consequently p u,p d > and since p u + p d = 1 one can interpret p u and p d as probabilities. 152

n time steps Basic period length (day or week... ) Price of asset in period being S there is the up event (price us) with probability p and down event (price ds) with probability 1 p Starting from price S in period, in period k it is u j d k j S if there are j up- and k j down moves. Probability is ( k j) p j (1 p) k j (binomial distribution). 153

n time steps Determining u, d and p S k : Price in periods k=,...,n Assume to know : Mean value µ and volatility σ of ln(s n /S ) Let =1/n be length between two consecutive periods Mean and volatility of ln(s 1 /S ) are µ and σ respectively Direct computation yields µ =p lnu+(1 p)ln d and σ 2 =p (1 p)(ln u lnd) 2. Set d= 1/u then equations simplify µ = (2p 1)ln u σ 2 = 4p(1 p)(ln u) 2 Squaring first and adding it to second equation yields (ln u) 2 = σ 2 +(µ ) 2. 154

Determining u, d and p cont. u = e σ 2 +(µ ) 2 d = e σ 2 +(µ ) 2 ( ) p = 1 1 1+ 2 1+(σ 2 /µ 2 ) For small this is approximately u = e σ d = e σ p = 1 ( 1+ µ ) 2 σ 155

Example 52 periods S known and random price S 52 with mean and standard deviation of ln(s 52 /S ) being 1% and 3% respectively. Since =1/52 is small one has u=e.3/ 52 = 1.425, d=.9592 and p=1/2+(1+.1.3 52 ) 156

Dynamic program to determine value of option Suppose strike price is c Work backwards from time N to time Nodes at time N are terminal nodes Option value v(j,n) of terminal nodes at height j is max{u j d N j S c,} Compute v(k,j) from v(k+ 1,j) and v(k+ 1,j+ 1) using formula with risk-neutral probabilities p u = R d u d, p d = u R u d : { } 1 v(k,j)= max R (p uv(k+ 1,j+ 1)+p d v(k+ 1,j)),u j d k j S c Output v(, ) 157

Example Stock with Volatility of logarithm σ=.2 Current price is 62 What is price of American call option with expiration date in 5 months from now? Strike price c is 6 Rate of interest is 1% compounded monthly Compute values =1/12, u=1.5943, d=.9439, R=1+.1/12= 1.833 p u =.5577 Fill table entries at the end of period. Example (upper right): S u 5 c= 22.75 158

Example cont. 62 5.85 65.68 8.21 58.52 2.97 69.59 11.19 62 4.61 55.24.96 73.72 14.71 65.68 6.96 58.52 1.74 52.14 78.11 18.6 69.59 1.8 62 3.14 55.24 49.21 82.75 22.75 73.72 13.72 65.68 5.68 58.52 52.14 46.45 159