0
$\begingroup$

I am using TIA package in Python to download an interest rate curve. Using the following script I get the last curve. How do I specify a date in the past to have a curve in the past?

import tia.bbg.datamgr as dm
curve="YCSW0045 Index"
mgr = dm.BbgDataManager()
msft=mgr[curve]
msft["CURVE_TENOR_RATES"]
$\endgroup$
1
$\begingroup$

This will NOT work. You cannot get ICVS curves in API. Excel has a curves toolkit for excel. However, for WAPI, you need enterprise licenses (not part of terminal subscription). Your account manager can help you with that if that is truly needed.

What you do here, is simply a FLDS field. Check out YCSW0045 Index FLDS CURVE_TENOR_RATES on the terminal. You will see that the field description shows that only current value is available.

Side not, I would say that is not the best way to ask this. Use the help desk. They will most certainly not help with a 3rd party wrapper (I never used this one, but is this only Python 2.7?). However, always ask how this works in excel (it's both c++ according to Bloomberg). I am sure it will not have taken almost 6 months for BBG to answer this.

$\endgroup$
0
$\begingroup$

A variation of this can be found here. Try this..

import pandas as pd
import tia.bbg.datamgr as dm
mgr = dm.BbgDataManager()
curve='YCSW0045 Index'
sids = mgr[curve]
info_df = sids.get_historical(
['PX_LAST'],
       start="1/1/2000",
       end="6/30/2016",
       period="DAILY"
)
$\endgroup$
1
  • $\begingroup$ I have tried your suggestion with the field and dates I need, but I get an empty dataframe (I do not even get the last value of the curve). Here the modified code: sids.get_historical( ["CURVE_TENOR_RATES"], start="01/01/2020", end="12/01/2020", period="DAILY" ) $\endgroup$ – sqrt2sqrt2 Dec 1 '20 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.