Can someone explain me why the code line below :
Returns <- eapply(Data,function(s) ROC(Ad(s), type="discrete"))
does return :
I guess that it's classed by value but quite not sure
Since Data
is built as below :
Why isn't my list structured as excepted :
Returns :
-> ACA.PA
-> BNP.PA
-> UG.PA
How would I Fix this in order to keep the same structure ?
Reproducible Example
stock_list <- c("ACA.PA","BNP.PA","UG.PA")
Data <- new.env(hash = FALSE)
getSymbols(stock_list,
from = start_date,
to = end_date,
src = "yahoo",
periodicity = "monthly",
env=Data)
Returns <- lapply(Data,function(s) ROC(Ad(s), type="discrete"))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…