Skip to contents

Vendor-specific import wrappers for index total return levels (net or gross).

Usage

msci(file, col_trans, benchmarks = NULL, var_name = NULL, ...)

spdj(file, col_trans, benchmarks = NULL, var_name = NULL, ...)

msci_tsv(file, index_id, benchmarks = NULL, var_name = NULL, ...)

Arguments

file

Filename of the file to import.

col_trans

Named character vector (or list) mapping index identifiers to regular expressions used to select the corresponding columns in Excel files. The names become the imported column names in the stored time series; the values are matched against the Excel column headers. Passed to read_timeseries_excel().

benchmarks

Optional benchmark mapping(s) to record in the fund-index map (for example, to map gross to net indices for tracking-difference plotting alongside funds).

var_name

Storage key used in session$storage. If NULL, tolower(file) is used.

...

Arguments passed on to store_timeseries

overwrite

Logical scalar. If TRUE, recompute and replace any existing cached value, regardless of fundsr.reload.

postprocess

Function applied to the computed value before caching. Only used when the value is (re)computed (i.e. not applied when a cached value is reused). Defaults to base::identity().

session

Optional fundsr_session object. Defaults to the package default session when NULL.

index_id

Index identifier used as the imported column name for text files containing a single index.

Value

Invisibly returns NULL. Data are stored via store_timeseries().

Details

Wrappers around store_timeseries() and either read_timeseries_excel() or read_timeseries() for importing index files.

Functions

  • msci(): Import an MSCI index Excel file

  • spdj(): Import an S&P Dow Jones index Excel file

  • msci_tsv(): Import an MSCI two-column TSV file for a single index