asset_loader {StockDistFit} | R Documentation |
Load Asset Data.
Description
This function reads in asset data stored in .csv format and returns a time-series object of the asset data.
Usage
asset_loader(data_path, assets, price_col)
Arguments
data_path |
The path to the directory containing the .csv files. |
assets |
A vector of asset names to be loaded. |
price_col |
The name of the price column to be selected (e.g. Open, Close, Low, High). |
Value
An xts object with asset data.
Note
The Date
column in the files should be of the format "%m/%d/%y", that is 01/14/13 with
01 implying the month, 14 the date and 13 the year
The data to be loaded must be in .csv type and also must have the Date, Open, Low, High and Close Prices of the assest or assests to be loaded.
Examples
asset_loader(system.file("extdata", package = "StockDistFit"), c("AAPL", "TSLA"), "Close")
[Package StockDistFit version 1.0.0 Index]