- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 368
 
Open
Description
In swap_float_leg.py, we have the following logic to compute the forward rate for reference index.
dfStart = index_curve.df(startAccruedDt)
dfEnd = index_curve.df(endAccruedDt)
fwd_rate = (dfStart / dfEnd - 1.0) / index_alphaindex_alpha is a result of year fraction using a day counter initialized by the index day count type we specified. (for example, this is Thirty E 360 when constructing a IBOR curve)
(index_alpha, num, _) = index_day_counter.year_frac(startAccruedDt,
                                                    endAccruedDt)However, dfStart and dfEnd, though using the same index curve, always discount by ACT_ACT_ISDA. This is because we didn't specify the day count type in its second argument.
def df(self,
       dt: (list, Date),
       day_count=DayCountTypes.ACT_ACT_ISDA):I am unsure if this is a convention - but it seems odd to me as we are using two different day count types on a single curve for time fraction and discounting factors.
Just want to point out before I forget the details, take the time for this.
Thanks,
Metadata
Metadata
Assignees
Labels
No labels