Specifying Fixed Income Contracts with Optionality
Overview
A fixed rate bond with optionality, is essentially a fixed rate bond, where the buyer or seller has an option at some point to
call or put the bond.
Setting up a fixed income bond with optionality is essentially the same as setting up a
Fixed Rate Bond
but then adding the call schedule to the bond.
Call Schedule
In addition to the standard fixed rate instrument parameters, a bond with embedded optionality must specify the option details of the
embedded options. This is referred to as the call schedule in the API. The call schedule is a list of option specifications. Each options
is specified by the following:
- type = Call or Put
- Strike Price = for a bond, the strike price is tyically the face value (par value)
- Date = the date that the option matures
FixedRateBond Class
class OptionType(StrEnum):
Call="Call"
Put="Put"
@dataclass
class CallSchedule:
dates:list[Option]
@dataclass
class Option:
date:str
price:pc.Price
type:OptionType
@dataclass
class CallableFixedRateBond(ct.FixedRateBond):
call_schedule:CallSchedule|None=None
pass
Sample Code
schedule = ct.Schedule(start_date='2000-01-01', end_date='2030-01-01',
frequency= ct.Frequency.Annual, calendar= cl.Calendar.USGovernmentBond,
convention=ct.Convention.Following, dateroll=ct.DateRoll.Forward)
option1 = op.Option(date='2027-01-01',
price=pc.Price(value=100,type=pc.PriceType.Clean),
type=op.OptionType.Call)
options = [option1]
cschedule = op.CallSchedule(options)
callbond = op.CallableFixedRateBond(settlement_days=2,
face_amount=10000, day_count=ct.DayCounts.Actual360,
coupons=0.05,schedule=schedule, call_schedule=cschedule)