В этом примере показано, как использовать базовый пул ценной бумаги, обеспеченной закладной, (MBS) для 30-летней ипотеки с фиксированной процентной ставкой 6%, чтобы задать связь PAC, и затем задать последовательный CMO от связи PAC. Анализируйте CMO путем сравнения распространения CMO с кривой нулевого уровня для 30-летней Казначейской облигации и затем вычислите средневзвешенную жизнь (WAL) для связи PAC.
principal = 100000000; grossrate = 0.06; coupon = 0.05; originalTerm = 360; termRemaining = 360; speed = 100; delay = 14; Settle = datenum('1-Jan-2011'); IssueDate = datenum('1-Jan-2011'); Maturity = addtodate(IssueDate, 360, 'month');
[CFlowAmounts, CFlowDates, ~, ~, ~, UnitPrincipal, UnitInterest, ... UnitPrepayment] = mbscfamounts(Settle, Maturity, IssueDate, grossrate, ... coupon, delay, speed, []);
principalPayments = UnitPrincipal * principal; netInterest = UnitInterest * principal; prepayments = UnitPrepayment * principal; dates = CFlowDates' + delay;
area([principalPayments'+prepayments', netInterest']) title('Underlying MBS Payments'); legend('Principal Payments (incl. Prepayments)', 'Interest Payments')
pacSpeed = [80 300]; [balanceSchedule, pacInitBalance] = ... cmosched(principal, grossrate, originalTerm, termRemaining, ... pacSpeed, []);
figure; area([pacInitBalance'; balanceSchedule']) title('PAC Principal Balance Schedule'); legend('Principal Balance Schedule');
pacTranchePrincipals = [pacInitBalance; principal-pacInitBalance]; pacTrancheCoupons = [0.05; 0.05]; [pacBalances, pacPrincipals, pacInterests] = ... cmoschedcf(principalPayments+prepayments, ... pacTranchePrincipals, pacTrancheCoupons, balanceSchedule);
Сгенерируйте график для частей PAC CMO:
figure; area([pacPrincipals' pacInterests']); title('PAC CMO (PAC and Support Tranches)'); legend('PAC Principal Payments', 'Support Principal Payments', ... 'PAC Interest Payments', 'Support Interest Payments');
Части CMO, A, B, C, и D
seqTranchePrincipals = ...
[20000000; 20000000; 10000000; pacInitBalance-50000000];
seqTrancheCoupons = [0.05; 0.05; 0.05; 0.05];
[seqBalances, seqPrincipals, seqInterests] = ... cmoseqcf(pacPrincipals(1, :), seqTranchePrincipals, ... seqTrancheCoupons, false);
Сгенерируйте график для последовательного PAC CMO:
figure area([seqPrincipals' pacPrincipals(2, :)' pacInterests']); title('Sequential PAC CMO and Support Tranches'); legend('Sequential PAC Principals (A)', 'Sequential PAC Principals (B)', ... 'Sequential PAC Principals (C)', 'Sequential PAC Principals (D)', ... 'Support Principal Payments', 'PAC Interest Payments', ... 'Support Interest Payments');
CurveSettle = datenum('1-Jan-2011'); ZeroRates = [0.01 0.03 0.10 0.19 0.45 0.81 1.76 2.50 3.18 4.09 4.38]'/100; CurveTimes = [1/12 3/12 6/12 1 2 3 5 7 10 20 30]'; CurveDates = daysadd(CurveSettle, 360 * CurveTimes, 1); zeroCurve = intenvset('Rates', ZeroRates, 'StartDates', CurveSettle, ... 'EndDates', CurveDates);
Поток наличности для последовательного принципала PAC часть вычисляется с помощью функций потока наличности cfbyzero
, cfyield
, cfprice
, и cfspread
.
cflows = seqPrincipals(1, :)+seqInterests(1, :); cfdates = dates(2:end)'; price1 = cfbyzero(zeroCurve, cflows, cfdates, Settle, 4)
price1 = 2.2109e+07
yield = cfyield(cflows, cfdates, price1, Settle, 'Basis', 4)
yield = 0.0090
price2 = cfprice(cflows, cfdates, yield, Settle, 'Basis', 4)
price2 = 2.2109e+07
spread = cfspread(zeroCurve, price2, cflows, cfdates, Settle, 'Basis', 4)
spread = 5.5084e-12
WAL = sum(cflows .* yearfrac(Settle, cfdates, 4)) / sum(cflows)
WAL = 2.5408
Средневзвешенная жизнь (WAL) для последовательного принципала PAC часть составляет 2,54 года.
cfbyzero
| cfbyzero
| cfprice
| cfspread
| cfyield
| cmosched
| cmoschedcf
| cmoseqcf
| mbscfamounts