www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/ComputethePriceofaFixedLookbackOptionUsingtheConzeViswanExample.m
%% Compute the Price 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-2014'; Rates = 0.045; Compounding = -1; RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates,... 'EndDates', EndDates, 'Rates', Rates,'Compounding', Compounding) %% % Define the |StockSpec|. AssetPrice = 102; Sigma = 0.45; StockSpec = stockspec(Sigma, AssetPrice) %% % Define the fixed lookback options. Settle = 'Jan-1-2013'; Maturity = 'July-1-2013'; OptSpec = {'put';'call'}; Strike = [98;101]; %% % Price the European fixed lookback options. Price = lookbackbycvgsg(RateSpec, StockSpec, OptSpec, Strike, Settle, Maturity)