Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by sergio.iracheta · Jun 16, 2020 at 05:03 PM · apipythonpython apipython eikonmunicipal bonds

Is there a way to get AI for bonds with no RIC assigned by using Python API?

By using df = ek.get_data(list1, ['TR.FIAccruedInterest']), I am able to get AI for most of the bonds. however, it looks like it doesnt work for those that do not have a RIC code assigned to them as it throws a NaN error. See the below example.

list1=['000416T80','004284D85','004284ZN8', '005158UN8', '19648EAF4', '791698AF0']

df = ek.get_data(list1, ['TR.FIAccruedInterest'])

print(df)


Output

( Instrument Accrued Interest

0 000416T80 1.889

1 004284D85 1.889

2 004284ZN8 1.511

3 005158UN8 1.017

4 19648EAF4 NaN

5 791698AF0 NaN, None)


Additionally, 'TR.AccruedAmountAnalytics' provide the below erroneous results

df2=ek.get_data(list1,'TR.AccruedAmountAnalytics',{'SettlementDate':'20200610'})

print(df2)


Output

0 000416T80 0.0

1 004284D85 0.0

2 004284ZN8 0.0

3 005158UN8 NaN

4 19648EAF4 NaN

5 791698AF0 NaN,


Regards

Sergio

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Jun 16, 2020 at 06:44 PM

@sergio.iracheta

Your colleague reported similar issue on this thread. This issue was referred to Refinitiv Helpdesk, which upon their investigation concluded that accrued interest is only available in Eikon for bonds that have RICs assigned to them, which excludes most US munis.

The only alternative is to calculate accrued using Adfin Analytics. It is possible to use Adfin Analytics COM library in Python, albeit this is not very straightforward and is only possible in 32-bit Python. For details see this article.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by sergio.iracheta · Jun 23, 2020 at 10:53 PM

by using the below excel formula we are able to get this data even if those bonds dont have any RIC assigned. is there any way to be able to run this Eikon excel formula on python??

=IF(B$2="","",IF(ISTEXT(Accrued(G$1,$D2,$E2,$F2)),0,Accrued(G$1,$D2,$E2,$F2)))

B2 = ISIN

G1= Date

D2= bonds maturity date (TR.FIMaturityDate)

E2 = Coupon rate (TR.ADF_COUPON)

F2= Bond Structure (TR.ADF_BondStructure)

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Alex Putkov. · Jun 24, 2020 at 12:22 AM

@sergio.iracheta

If you use 32-bit Python, you can use AdfinX Analytics COM library as described in the article referenced in my previous response on this thread.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

How to get list of leaver companies of the ASX 100 using the Python API?

Eikon Python API Query - How do you get the list of ASX listed stocks which have Company Guidance issued for Fiscal Year 2020?

Python Data retrieving

How can I download historical Brent and WTI contract.

Unpopulated TR.ExchangeCountry vs. populated TR.HeadquartersCountry

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges