www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/BarrierOptionEQPEquityExample.m
%% Price a Barrier Option Using an EQP Equity Tree % This example shows how to price a barrier option using an EQP equity % tree by loading the file deriv.mat, which provides EQPTree. The EQPTree % structure contains the stock specification and time information needed to % price the option. %% % Copyright 2015 The MathWorks, Inc. load deriv.mat; OptSpec = 'Call'; Strike = 105; Settle = '01-Jan-2003'; ExerciseDates = '01-Jan-2006'; AmericanOpt = 1; BarrierSpec = 'UI'; Barrier = 102; Price = barrierbyeqp(EQPTree, OptSpec, Strike, Settle, ... ExerciseDates, AmericanOpt, BarrierSpec, Barrier)