getSectorWeights: Load sector weightings for indexes

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Function to scrape, clean, and format sector weightings for a given index or ETF.

Usage

1
2
3

Arguments

index

Character; string specifying the name of the index. One of "SPY".

Details

getSectorWeights will try to coerce the value of the index argument into a recognizable ticker using cleanIndex before it attempts to access sector weightings. Data will be loaded from different sources depending on input arguments:

For S&P 500 data, data will be retreived from the official S&P Dow Jones website

Value

a data.frame containing index's sector weightings (11 columns)

Author(s)

Alec Kulakowski, alecthekulak@gmail.com

See Also

smif.packagecleanIndex

Examples

1
2
3

alec25/smif.package documentation built on May 22, 2019, 12:36 p.m.