|
From: Ben W. <ben...@ma...> - 2021-10-05 08:24:25
|
HiHi,
I have a simple python function to return the roll date conventions, but get 'int' object is not callable. Very odd – any work around?
def roll_conventions(convention):
if convention in ['Following','F']:
return ql.Following()
if convention in ['ModifiedFollowing','MF']:
return ql.ModifiedFollowing()
if convention in ['Preceding' ,'P']:
return ql.Preceding()
if convention in ['ModifiedPreceding','MP']:
return ql.ModifiedPreceding()
if convention in ['Unadjusted','U']:
return ql.Unadjusted()
return
Regards
Ben
|