The optional input pair is 'LegReset'
and set it to [n n]
, where n
is the frequency of payments.
Matlab: How to specify Coupon frequency for Interest Rate Swap
-
30-05-2022 - |
Question
Although I believe that Quantitative Finance Forum is more relevant for this question, as this is far more popular, I'll let myself to ask same question here.
I'm trying to price an interest rate swap and would like to change the default coupon payment frequency from 1 a year to 2 or 4 a year. I'm using
Price = swapbyzero(RateSpec, LegRate, i, Maturity, 'Principal', Principal);
and tried
Price = swapbyzero(RateSpec, LegRate, i, Maturity, 'Principal', Principal,'Period',2);
where 'Period' is a valid option when pricing bond using
prbyzero
I'm using matlab 2013a
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow