Displaying 1 result from an estimated 1 matches for "historical_prices".
2012 May 22
1
Quantmod, Xts, TTR and Postgresql
...9;technica',
password='password')
fr <- dbGetQuery(db, 'SELECT date as "Date", open as "Open", high as
"High", low as "Low", close as "Close", volume as "Volume", random() as
"Adjusted" FROM stocks s INNER JOIN historical_prices hp ON s.id =
hp.stock_id WHERE s.symbol = \'SDL\' ORDER BY date DESC limit 50')
# copied from the mysql code in the quantmod source
fr <- data.frame(fr[,-1],row.names=fr[,1])
fr <- xts(as.matrix(fr[,-1]), order.by=as.Date(fr[,1],
origin='1970-01-01'), src='technica...