0
$\begingroup$

I'm trying to price a non-standard swap. However, my schedule is not returning the correct dates. In particular, the effective date starts on a Saturday but the schedule returns the next biz date which is a Monday. I need to accrual to start on the effective date without adjustment. How can I tell the schedule object to not do that?

Below is my code.

fixed_leg_schedule = ql.Schedule(
                    ql.Date(26, ql.September, 2020), 
                    ql.Date(25, ql.September, 2026), 
                    ql.Period('1M'), 
                    ql.UnitedStates(), 
                    ql.ModifiedFollowing, 
                    ql.ModifiedFollowing, 
                    ql.DateGeneration.Backward, 
                    False, 
                    ql.Date(15, ql.October, 2020), 
                    ql.Date(15, ql.September, 2026)
)

The 26th of Sept. 2020 is a Saturday, but the schedule returns 28th.

Thanks.

$\endgroup$
1
$\begingroup$

By passing ql.ModifiedFollowing you're telling the library to adjust non-business days based on that convention. If you don't want them adjusted, pass ql.Unadjusted instead.

$\endgroup$
1
  • $\begingroup$ Thanks. It worked. $\endgroup$
    – AnonymousJ
    May 19 '20 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.