www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/ComputethePriceandDeltaofaFixedLookbackOptionUsingtheConExample.m
%% Compute the Price and Delta of a Fixed Lookback Option Using the Conze-Viswanathan Model % Copyright 2015 The MathWorks, Inc. %% % Define the |RateSpec|. StartDates = 'Jan-1-2013'; EndDates = 'Jan-1-2015'; Rates = 0.1; Compounding = -1; RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,... 'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding) %% % Define the |StockSpec|. AssetPrice = 103; Sigma = 0.30; StockSpec = stockspec(Sigma, AssetPrice) %% % Define the fixed lookback option. Settle = 'Jan-1-2013'; Maturity = 'July-1-2013'; OptSpec = 'call'; Strike = 99; %% % Price and delta for the European fixed lookback option. OutSpec = {'price', 'delta'}; [Price, Delta] = lookbacksensbyls(RateSpec, StockSpec, OptSpec,... Strike, Settle, Maturity,'OutSpec', OutSpec)