%% Compute the Conversion Factors For a Bond Futures Contract
% This example shows how to calculate CF, given the following RefDate, Maturity, and CouponRate.

RefDate  = {'1-Dec-2002';
               '1-Mar-2003';
               '1-Jun-2003';
               '1-Sep-2003';
               '1-Dec-2003';
               '1-Sep-2003';
               '1-Dec-2002';
               '1-Jun-2003'};
 
Maturity = {'15-Nov-2012';
               '15-Aug-2012';
               '15-Feb-2012';
               '15-Feb-2011';
               '15-Aug-2011';
               '15-Aug-2010';
               '15-Aug-2009';
               '15-Feb-2010'};
 
CouponRate = [0.04; 0.04375; 0.04875; 0.05; 0.05; 0.0575; 0.06; 0.065];
 
CF = convfactor(RefDate, Maturity, CouponRate)

% Copyright 2015 The MathWorks, Inc.