subset.stocksData: Subsetting Options or Stocks Dataset

Description Usage Arguments Details Value See Also

View source: R/stocks.R

Description

Return subset of the dataset with selected symbols.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'GBM'
subset(x, select, ...)

## S3 method for class 'optionsData'
subset(x, select, drop = TRUE, ...)

## S3 method for class 'stocksData'
subset(x, select, ...)

Arguments

x

object to be subsetted, of class stocksData, optionsData or GBM.

select

a character vector specifying selected symbols of stocks and/or options.

...

arguments to be passed to or from methods.

drop

logical. If TRUE, the unused underlying stocks in the options dataset will be dropped.

Details

If you subset an optionsData object and do not select any options, the result will still be an optionsData object with no options. GBM objects also can be subsetted and parameters for selected instruments will be kept intact.

Value

An object of the same class as x.

See Also

stocks, addOptions, GBM


zhangkd5/riskCalc documentation built on May 4, 2019, 10:16 p.m.