Hi, I'm trying to get the EUR (for example) forward curve from yesterday and the day before.
So, in Excel, I got:
=@RHistory("EUR1M=";"NDA_RAW.Nda_date;NDA_RAW.Nda_ask;NDA_RAW.Nda_bid;NDA_RAW.Nda_days_maturity";"START:2020-10-07 END:2020-10-14 CODE:MULTI INTERVAL:1D";;"CH:IN;Fd";)
This gives me the Date, Bid, Ask and Days for Maturity for the 1M vertice. But NO Spot Date is given.
Even so, I tried:
get_data(instruments = "EUR1M=",
fields = list("NDA_RAW.Nda_date", "NDA_RAW.Nda_ask", "NDA_RAW.Nda_bid", "NDA_RAW.Nda_days_maturity"),
parameters = list("Frq" = "D",
"SDate" = format(Sys.Date() - 7, "%Y-%m-%d"),
"EDate" = format(Sys.Date() - 1, "%Y-%m-%d")))
and
get_timeseries(rics = "EUR1M=",
fields = list("NDA_RAW.Nda_date", "NDA_RAW.Nda_ask", "NDA_RAW.Nda_bid", "NDA_RAW.Nda_days_maturity"),
interval = "daily",
start_date = paste0(Sys.Date() - 7, "T00:00:00"),
end_date = paste0(Sys.Date() - 1, "T00:00:00"))
But none work.
If I want the Spot Date, in Excel:
=@TR("EUR1M=";"GV1_DATE;MATUR_DATE;DAYS_MAT";"Frq=D SDate=0 EDate=-8 CH=Fd RH=IN CODE=MULTI";G6)
Unfortunately this gives me just the Spot Date for the current cotation, NOT the yesterday or some historical date.
There are other problems like.. I want the outright and the RIC to gives me that is EUR1MV=, but this RIC don't work as well. This solution will have to be extended later to all tenors: SN, SW, 2W, 3W, 1M, 2M, ... 11M, 1Y, ... 2Y and other currencies.
What is the best way (preference in R or Python) to get those information, so I can have a table like that:
RIC | Date | Spot | Expiring | Mat_Days | Bid | Ask
EUR1M= | 2020-10-14 | 2020-10-16 | 2020-11-16 | 31 | 1.169484 | 1.169718
EUR1M= | 2020-10-13 | 2020-10-15 | 2020-11-16 | 32 | 1.169524 | 1.170026