View source: R/data_adapters.R
| load_mixed_symbols | R Documentation |
Handles loading regular stocks and VIX together, with VIX loaded separately without auto-update to avoid issues.
load_mixed_symbols(
db_path,
symbols,
start_date,
end_date,
frequency = "weekly",
use_adjusted = TRUE
)
db_path |
Path to SQLite database |
symbols |
Character vector including regular stocks and optionally "VIX" |
start_date |
Start date for data |
end_date |
End date for data |
frequency |
Data frequency (default: "weekly") |
use_adjusted |
Use adjusted prices (default: TRUE) |
data.table with all symbols properly loaded
mixed <- load_mixed_symbols(
db_path = "sp500.db",
symbols = c("AAPL", "MSFT", "VIX"),
start_date = "2020-01-01",
end_date = "2020-12-31",
frequency = "weekly"
)
head(mixed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.