Handel finansowy w R
Ilya Kipnis
Professional Quantitative Analyst and R programmer
Quantstrat wymaga daty inicjalizacji, daty początkowej i końcowej.
YYYY-MM-DD, np. „2000-01-01"
initdate <- "1999-01-01"
from <- "2003-01-01"
to <- "2015-12-31"
# Set system environment timezone:
Sys.setenv(TZ = "UTC")
# Set currency (we'll use USD for now):
currency("USD")
# Obtain financial data:
getSymbols("LQD", from = from, to = to,
src = "yahoo", adjust = TRUE)
# Treat as basic equity
stock("LQD", currency = "USD", multiplier = 1)
initDate = "1999-01-01"
from = "2003-01-01"
to = "2015-12-31"
Sys.setenv(TZ = "UTC")
currency("USD")
getSymbols("LQD", from = from, to = to, src = "yahoo",
adjust = TRUE)
Handel finansowy w R