timeSeriesValidator {quantspec}R Documentation

Validates if Y is of an appropriate type and converts to a numeric.

Description

Checks whether Y is either

If not, an error is returned. If it is one of the three the data is returned as a numeric.

Usage

timeSeriesValidator(Y)

Arguments

Y

the time series to be validated.

Value

Returns the time series as a matrix.

Examples

Y <- timeSeriesValidator(sp500)
Y <- timeSeriesValidator(wheatprices)
Y <- timeSeriesValidator(rnorm(10))
## Not run: Y <- timeSeriesValidator("Not a valid input")

[Package quantspec version 1.2-4 Index]