Hi, out of an excel file I derive tickers and use the Bloomberg-market data connection to get prices and calculate returns afterwards.
In the below mentioned code I only took out the real "path". Everything works until I get to "anotherp".
Then the above mentioned error message kicks in. Please see my coding below:
setwd("//path/Datenbank_R/R_skripte")
library("Rblpapi")
library("RODBC")
library("lubridate")
library("dplyr")
library("tidyr")
library("readxl")
library("xlsx")
library("PerformanceAnalytics")
# connect to bloomberg
con <- blpConnect()
heute <- today()-1
datab <- "2019-12-29"
datei <- "FondsBM.xlsx"
dframe<-as.data.frame(read_excel(as.character(datei), range="Input!A1:E7"))
dframe
einWP <-c(dframe[1,1],dframe[1,2])
# comprises the following tickers: EURAKTI GR Equity and MSVEUNTR Index
einWP
prices<-bdh(einWP, "PX_LAST", as.Date(datab), as.Date(heute))
prices
anotherp <- prices %>%
Return.read() %>%
Return.calculate()
I stop he coding at this line
I hope somebody might help me with this. Thanks Marcus