Option Pricing
Essay Preview: Option Pricing
Report this essay
IEOR4007 Homework #51. Option pricing in incomplete marketsMatlab codes:close allclear allclc%% Data% number of assetsn = 10;% number of statesm = 20;% price todayp = [92 24 68 60 81 81 49 2 84 34];% strikesstrike = [100 98 101];% S matrixS = [117 151 176 141 34 78 178 175 78 170 11 68 155 2 27 39 38 115 52 38 1 35 21 43 22 20 39 25 10 31 39 1 32 18 39 24 33 20 15 924 83 37 66 19 85 46 105 104 72 61 109 100 79 99 80 42 36 42 6571 31 82 56 36 69 54 44 68 61 78 93 51 86 17 96 27 25 85 7225 3 160 36 54 118 51 84 12 176 104 76 92 60 78 41 104 136 95 11532 58 120 104 71 87 121 9 92 8 64 47 133 3 117 148 151 120 67 7620 59 30 88 67 38 68 25 41 85 63 20 77 58 13 19 56 58 34 532 1 1 2 1 2 3 1 1 3 3 1 1 1 3 1 2 3 3 314 75 73 58 26 111 115 120 79 91 20 74 118 147 45 42 142 39 132 14921 22 5 7 58 17 76 16 16 89 40 31 28 33 35 53 11 4 41 78]; %% compute a strictly positive state price deflatorf = zeros(1,m);pi = linprog(f,[],[],S,p,zeros(1,m)) %% check if the call is attainableK = 100;payoff = max(S(:,1)-K,0);equation = [S payoff];rank_coefficient = rank(S)rank_augmented = rank(equation)if (rank_coefficient == rank_augmented) fprintf(security attainable
)else fprintf(security not attainable
)end %% upper/lower bound and sensitivity analysis
% upper bound[theta,~,~,~,u] = linprog(p,-S,-payoff);upper_bnd = theta*p tol = 1e-6;index = find(abs(u.ineqlin) > tol);b99 = max(S(:,1)-99,0);theta99 = S(index,:)99(index);checksens_upper = (min(S*theta99 – b99)>=-tol)new_upper_bnd = upper_bnd + (b99-payoff)*u.ineqlin % lower bound[theta,~,~,~,u] = linprog(-p,S,payoff);lower_bnd = theta*p index = find(abs(u.ineqlin) > tol);theta99 = S(index,:)99(index);checksens_lower = (max(S*theta99 – b99)<=tol)new_lower_bnd = lower_bnd + (b99-payoff)*u.ineqlinOutput:Optimization terminated.pi = 0.1443 0.0454 0.0256 0.0318 0.1796 0.0658 0.0121 0.1108 0.0301 0.0001 0.0261 0.0433 0.0296 0.0586 0.0935 0.0066 0.0715 0.0530 0.0646 0.0318rank_coefficient = 10rank_augmented =11security not attainableOptimization terminated.upper_bnd = 28.2009checksens_upper = 1new_upper_bnd = 28.6513Optimization terminated.lower_bnd = 13.4915checksens_lower = 1new_lower_bnd = 13.83902. Pricing a gas supply contract