Learn R Programming

tawny.types (version 1.1.0)

EquityIndex: Create an EquityIndex object

Description

A wrapper around equity indices.

Usage

EquityIndex(...)

Arguments

...
Used by lambda.r

Value

  • An EquityIndex object

    TODO: Consolidate with BenchmarkPortfolio

Details

This type takes an index and will download all constituent returns (assuming the index composition exists). This uses quantmod as a back-end.

EquityIndex(ticker = "^GSPC", hint = NA, src = "yahoo")

ticker - The ticker representing the index

hint - Used to determine number of elements in index for paging

src - Placeholder for data source. Currently only supports yahoo

Examples

Run this code
index <- EquityIndex()

Run the code above in your browser using DataLab