Description Usage Arguments Details Value Author(s) See Also Examples
Function to scrape, clean, and format sector weightings for a given index or ETF.
1 2 3 | getSectorWeights(index = "SPY")
getSectorWeights.SPY()
|
index |
Character; string specifying the name of the index. One of |
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
a data.frame containing index
's sector weightings (11 columns)
Alec Kulakowski, alecthekulak@gmail.com
1 2 3 | getSectorWeights("S&P 500")
getSectorWeights.SPY()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.