Dear fellow developers
I am a pretty new person for the Eikon API code session.
I here to ask a simple (may stupid) question for my recent work on data collections using Eikon API codes with R. I need to retrieve the historical price information of over 100 bonds for my study. Typically, I am interested in the ask price, bid price, ask yield and bid yield for the selected bonds. Please see the reputable code below:
library("devtools")
library("eikonapir") # load Eikon API
eikonapir::set_proxy_port(9000L)
eikonapir::set_app_id('xxxxxxxxxxxxxxxxxxxxxxx')
# I am interested following bond pricing information: Ask price, Bid price, Ask yield and Bid yields.
Bond_fields <- list("TR.ASKPRICE", "TR.BIDPRICE", "TR.ASKYIELDS", "TR.BIDYIELDS")#
#I use following six bonds for my example.
Bond_RICs <- list("CN1920029=","CN1720052=","CN1720012=","CN1920001=", "CN1702002=","CN101751004=","CN101901057=")
# using get_data( ) funciton for data retrive
get_data(Bond_Rics, Bond_fields)
I tried to use the get_data( ) to retrieve data, however, it gives rows for most recently updated data information which is not enough for me to do the analysis (See table below). What I want is the entire time-series of all available historical data.
> get_data(Bond_Rics, Bond_fields)
Instrument Ask Price Bid Price Bid Yield Ask Yield
1 CN1920029= 100.424 100.291 3.3681 3.2681
2 CN1720052= 101.85 101.69 3.4089 3.3089
3 CN1720012= 101.77 101.634 3.3582 3.2582
4 CN1920001= 100.286 100.179 3.3273 3.2273
5 CN1702002= 101.331 101.29 3.2194 3.1894
6 CN101751004= 101.517 101.385 3.8501 3.7501
7 CN101901057= 99.541 99.382 3.919 3.819
I know that we can use get_timeseries() function to retrieve historical price information. But the function requires me to put the start date and end date for the retrieve. Since each of the selected bonds has a different starting date and maturity date, I would like to know if there exists a simple function that allows me to retrieve all available historical data (given RICs codes) without specifying the starting date and ending date?
Thank you for your time and kind assistance.
Best regards