## Import of data for investment funds ## Data with files ## http://bossa.pl/pub/fundinwest/mstock/mstfun.zip ## List of funds ## http://bossa.pl/pub/fundinwest/mstock/mstfun.lst require(zoo) # setwd(".") # set working directory fund <- "PKO918.mst" # enter name of the file raw.data <- read.csv2(file = fund, head=TRUE, sep=",", dec=".") dateForm <- "%Y%m%d" ## conversion to zoo prices <- raw.data$"X.OPEN." dates <- as.Date(as.character(raw.data$"X.DTYYYYMMDD."), format=dateForm) P <- zoo(prices , order.by = dates) r <- diff(log(P))