Is it possible to get historical coupon payments (amount + date) of a Fixed-rate Corporate Bond ?

Dear Developers community,
I want to retrieve historical transaction data of coupon payments (amount + date) of a Fixed-rate Corporate Bonds.
So far, I manage to gather coupon data of the amount and frequency with "'TR.ADF_COUPON', and 'TR.FiCouponFrequency'. But these fields are the current (latest, not historical) ones, with no specific date of payment.
I am looking to create a a data frame with a panel structure of j bonds and t months.
Best Answer
-
Here's a quick example using RDP Library to access IPA Financial Contracts service on RDP
bond_ric = "34540TVB5="
start_date = "2020-01-01"
end_date = "2022-01-01"
df = pd.DataFrame(columns=['Coupon Date','Coupon Value'])
while start_date<end_date:
calc_params = rdp.ipa.bond.CalculationParams(valuation_date=start_date)
tmp_df = rdp.get_bond_analytics(bond_ric,
["NextCouponDate","NextCouponValue"],
calc_params)
start_date=tmp_df.iloc[0,0]
df = df.append({'Coupon Date':start_date,
'Coupon Value':tmp_df.iloc[0,1]},
ignore_index=True)
df0
Answers
-
Thank you @AlexPutkov, your code worked just fine! I am getting closer to what I need.
But sometimes, I get the error:
File "<ipython-input-165-ddf031214609>", line 10, in <module>
start_date=tmp_df.iloc[0,0]
AttributeError: 'NoneType' object has no attribute 'iloc'
I managed to do a request for a list of bonds constituents in the following way:
for i in consitutents.index:
bond_isin = iboxx_isin['ISIN'][i]
start_date = iboxx_isin['Issue Date'][i]
end_date = "2021-01-01"
while start_date<end_date:
calc_params = rdp.ipa.bond.CalculationParams(valuation_date=start_date)
tmp_df = rdp.get_bond_analytics(bond_isin,["NextCouponDate","NextCouponValue"], calc_params)
start_date=tmp_df.iloc[0,0]
df_coupon = df_coupon.append({"ISIN":bond_isin,'Coupon Date':start_date, 'Coupon Value':tmp_df.iloc[0,1]}, ignore_index=True)
concate= pd.concat([df_coupon], ignore_index=True)Here, a snapshot of the constituents list:
ISINIssue DateXS19071207912018-12-06XS11963800312015-03-09XS16298664322017-06-21XS20513620722019-09-11XS20513623122019-09-11But I got the following errors:
File "/Users/mc/opt/anaconda3/lib/python3.8/site-packages/refinitiv/dataplatform/content/ipa/contracts/_financial_contracts.py", line 37, in _get_instrument_analytics
result = self.session._loop.run_until_complete(
event_list = self._selector.select(timeout)
kev_list = self._selector.control(None, max_ev, timeout)
Maybe I need to chunk the request in smaller sizes?
0 -
Here is the structure of the constituents
0 -
I haven't been able to reproduce the issue on my end using a sample of ISINs you provided.
"AttributeError: 'NoneType' object has no attribute 'iloc'" indicates that rdp.get_bond_analytics function returned None instead of a dataframe. Have you tried isolating the issue? Does it happen randomly or does it always happen with the same ISIN(s)?
When the exception is raised, try calling rdp.get_last_status() to see the status of the last request. Using Fiddler to capture HTTP requests and see if the request corresponding to rdp.get_bond_analytics function that returned None fails would be very helpful too.0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛