question

Upvotes
Accepted
18 0 0 3

Get swap curve into python using datastream

Hi I'm trying to retrieve the AUD Interest Swap curve using Datastream into python but am having trouble.

This is what I'm trying:

ds.get_data(tickers='<AUDIRS>', fields=['P'], start='2020-02-28', kind=1)

But it keeps telling me the code is invalid <AUDIRS> P $$ER: E100,INVALID CODE OR EXPRESSION ENTERED

I don't actually require a real time curve so am using datastream - all I need is to be able to get the curve for a specific value date.

I know the curve is composed of the tenors,

TenorCode

< 4YEARS “AUDQM3AB” + “(Tenor year number)Y”

>=4YEARS “AUDSM6AB” + “(Tenor year number)Y”

Payment frequencies are quarterly for tenors less than 4 yr, and semi-annual from 4 yr and above.

Floating leg’s indices are 3M BBSW for less than 4yr, and 6M BBSW for 4 yr and above.


What is the best way to get this from data stream using python


Thanks,

datastream-apidsws-api
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@Archi

If you know how to construct a symbol, you can use it in the request message.

The data type could be:

  • IB : Bid Rate
  • IO : Offered Rate
  • IR : Interest Rate

For example:

df1 = ds.get_data (tickers="<AUDQM3AB3Y=>", fields=["IO","IB","IR"],start='2020-02-28',kind=1)

You can also contact the DataStream support team via MyRefinitiv for symbols and data types of the AUD Interest Swap curve.

icon clock
10 |1500

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

Click below to post an Idea Post Idea