Using Excel's Bloomberg API to find a stock's IPO date? - bloomberg

I am wondering if there is a function in Excel's Bloomberg API to find a stock's IPO date.
For example, given 'YELP US Equity', it should return 03/01/2012.
Given '700 HK Equity', it should return 06/16/2004.
Is there a way?
Thank you

You can use the field EQY_INIT_PO_DT
=BDP("YELP US Equity", "EQY_INIT_PO_DT")
and more in general, you can use the FLDS command over a security to search for all available data.

Related

Pricing Currency Override in bloomberg api wrapper blp

I'm using the BLP Package as a wrapper around Bloomberg's API.
In the excel bloomberg api, I'm pulling a ticker called FUND_TOTAL_ASSETS. That value can be in any of several currencies. But by adding the "FX=USD" parameter to my BDH() query, it normalizes all the values to USD. Eg. ticker '1671 JP Equity' for 'FUND_TOTAL_ASSETS' field becomes 188.3905USD instead of 25915. =#BDH(E$4,E$6,$B1,$B2,"Dir=V","CDR=5D","Days=A","FX=USD","Dts=H","cols=1;rows=22")
I want to pull up the same data with the same conversion-to-usd operation using blp wrapper. I thought that I can do this via an override parameter.
From the bloomberg api guide I see
so I thought something like the following would work:
xf = bquery.bdh(securities=search, fields=['FUND_TOTAL_ASSETS',],
start_date=dt.date(2022,10,1).strftime("%Y%m%d"),
end_date=dt.datetime.now().date().strftime("%Y%m%d"),
overrides= [('currency','USD')])
It returns the data, but the value remains in the native currency.
I tried the same code as the excel api (FX,USD) but that fails with a bloomberg INVALID_OVERRIDE_FIELD.
The underlying Bloomberg DAPI differentiates between Overrides and Options (but even then there is some confusing overlap).
Typically an Override is applied to a Bloomberg Field. Eg the field FUND_CRNCY_ADJ_TOTAL_ASSETS for 1671 JP Equity has an override of FUND_TOTAL_ASSETS_CRNCY, where you can set the currency. You can see this by typing 1671 JP Equity FLDS in the Terminal and searching the available fields. The overrides are specific to the field.
In addition the HistoricalDataRequest schema also has various options which can be specified. These are elements of the request, in the same way as startDate and endDate. These are the options in the reference to which the OP links. The options apply to all the fields and usually govern how the data is returned (eg date periodicity).
With the blp package, options are supplied as a dictionary of key:value pairs.
This snippet demonstrates how this can be done to specify the currency of the returned data:
from blp import blp
import datetime as dt
bquery = blp.BlpQuery().start()
dtEnd = dt.datetime.now().date()
dtStart = dtEnd - dt.timedelta(days=7)
xf = bquery.bdh(securities='1671 JP Equity', fields=['FUND_TOTAL_ASSETS',],
start_date=dtStart.strftime("%Y%m%d"),
end_date=dtEnd.strftime("%Y%m%d"))
print(xf)
xfUSD = bquery.bdh(securities='1671 JP Equity', fields=['FUND_TOTAL_ASSETS',],
start_date=dtStart.strftime("%Y%m%d"),
end_date=dtEnd.strftime("%Y%m%d"),
options={'currency':'USD'})
print(xfUSD)
The output should reflect the different currency used.

USPS API not returning Commitment Date

My client needs to know how long it will take to ship their time sensitive product for FedEx and USPS. I'm using the GetRates function of DotNetShipping but the Commitment Date is coming back as null and being set to 30 days by DotNetShipping which isn't helpful. Are there particular parameters for the USPS Web Tools API that have to be passed in in order to get a Commitment Date? I know that when I call the USPS API directly, with the following URL, I do get a Commitment Date in the return data.
http://production.shippingapis.com/ShippingAPI.dll?API=RateV4&XML=<RateV4Request USERID="[USPSUSERID]"><Revision>2</Revision><Package ID="2ND"><Service>PRIORITY</Service><ZipOrigination>44106</ZipOrigination><ZipDestination>20770</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Container>RECTANGULAR</Container><Size>LARGE</Size><Width>11</Width><Length>13</Length><Height>11</Height><Girth>55</Girth><Value>1000</Value><SpecialServices><SpecialService>1</SpecialService></SpecialServices></Package></RateV4Request>
The above URL won't work without replacing [USPSUSERID] with a valid user ID.
I had to modify DotNetShipping to pass in Value and SpecialServices -> SpecialService and remove Machinable in order to get the CommitmentDate returned.

DAX / Xetra on alphavantage

I am very very happy with Alphavantage.
BUT I can't find the german stocks (Xetra)
I have tried:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=xtr:lin&apikey=MYKEY
(But this works https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=NYSE:DIN&apikey=MYKEY)
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=Lin.be&apikey=MYKEY
(But this works: https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=Novo-b.CO&apikey=MYKEY)
So my question is - has anyone had any luck getting german stocks on Alphavanta (or another free service. Realtime is not crucial, but obviously a plus).
I use the "Search Endpoint" function to find german stocks on alphavantage.
Let's say you look for "BASF" you could query:
https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=BASF&apikey=[your API key]&datatype=csv
You get a list with possible matches:
symbol,name,type,region,marketOpen,marketClose,timezone,currency,matchScore
BASFY,BASF SE,Equity,United States,09:30,16:00,UTC-05,USD,0.8889
BFFAF,BASF SE,Equity,United States,09:30,16:00,UTC-05,USD,0.8889
BASFX,BMO Short Tax-Free Fund Class A,Mutual Fund,United States,09:30,16:00,UTC- 05,USD,0.8889
BAS.DEX,BASF SE,Equity,XETRA,08:00,20:00,UTC+02,EUR,0.7273
BAS.FRK,BASF SE,Equity,Frankfurt,08:00,20:00,UTC+02,EUR,0.7273
BASA.DEX,BASF SE,Equity,XETRA,08:00,20:00,UTC+02,EUR,0.7273
BAS.BER,BASF SE NA O.N.,Equity,Berlin,08:00,20:00,UTC+02,EUR,0.7273
BASF.NSE,BASF India Limited,Equity,India/NSE,09:15,15:30,UTC+5.5,INR,0.6000
See documentation: https://www.alphavantage.co/documentation/
It seems to work with the yahoo symbols on alphavantage, at least for a few stocks (I did not check all). BASF for example works with:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=BASF.TI&apikey=MYKEY
The alphavantage symbols for German securities consist of the Xetra symbol + .DE. For example EUNL.DE (for iShares MSCI World Core ETF). You can find a list of all Xetra stocks here.

How to get APO alerts?

I have the requirement to select different SAP APO alerts (e. g. quantity or time alerts). How do I get this data? Is there a specific function module or something like this?
I already tried different data sources, e. g. method READ_ALERTS of /SAPAPO/CL_AMOALRT_MANAGER class, or function module /SAPAPO/RRP_GET_ALERTS_AMON and /SAPAPO/READ_PP_ALERTS. Nothing provides me with the correct data. Do you have an idea?
Thank you very much in advance!
You can check the transaction Alert monitor in APO system. Alerts are broadly defined In to 3 applications E.g DP, SNP & PPDS. In SNP/PPDS you have alerts for the under/over delivery quantity, planning requirement quantity and order delay (time) alerts. Please check these function modules
/SAPAPO/RRP_GET_ALERTS_AMON and /SAPAPO/READ_PP_ALERTS.

Geolocation rtweet search_tweet R

Does search_tweets function from rtweet package has parameters that allow me to filter by geolocation, equivalent to search_tweets parameter "geocode = '40.757343,-73.848261,40km'"?
Not really, you need to download the tweets via rtweet::search_tweets and then impose a geographical cut on coordinates. Furthermore there is also a column entitled bounding_box_coordinates that can be proven useful to your analysis.