![]() ![]() No great similarities jump out at the naked eye, so let’s see what a bit of Machine Learning has to offer. Just to get an idea of what these data look like, we can put together a compound time series plot. Also need to transpose because diss() expects data to be # along rows. # stocks = lapply ( symbols, function ( symbol ) ) # Merge by date # stocks = do.call ( merge.xts, stocks ) # Convert from xts object to a matrix (since xts not supported as input # for TSclust). ![]() Library ( quantmod ) symbols = c ( 'A', 'AAPL', 'ADBE', 'AMD', 'AMZN', 'BA', 'CL', 'CSCO', 'EXPE', 'FB', 'GOOGL', 'GRMN', 'IBM', 'INTC', 'LMT', 'MSFT', 'NFLX', 'ORCL', 'RHT', 'YHOO' ) start = as.Date ( "" ) until = as.Date ( "" ) # Grab data, selecting only the Adjusted close price. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |