Learn R Programming

PortfolioEffectEstim (version 1.4)

estimator_settings: Estimator Settings

Description

Advanced settings that regulate how estimator metrics are computed, returned and stored. Default: jumpsModel = "moments", resultsSamplingInterval = "1s", inputSamplingInterval="none"

Usage

estimator_settings(estimator,...)

Arguments

estimator
Estimator object created using estimator_create( ) function
...
One of the following estimator settings: "jumpsModel" - Used to select jump filtering mode when computing return statistics. Available modes are: "none" - price jumps are not filtered anywhere, "moments" - price jumps are filtered only when computing moments (variance, skewness, kurtosis) and derived metrics, "all" - price jumps are filtered everywhere. Defaults to "moments", which implies that only return moments and related metrics would be using jump-filtered returns in their calculations. "resultsSamplingInterval" - Interval to be used for sampling computed results before returning them to the caller. Available interval values are: "Xs" - seconds, "Xm" - minutes, "Xh" - hours, "Xd" - trading days (6.5 hours in a trading day), "Xw" - weeks (5 trading days in 1 week), "Xmo" - month (21 trading day in 1 month), "Xy" - years (256 trading days in 1 year), "last" - last result in a series is returned, "none" - no sampling. Large sampling interval would produce smaller vector of results and would require less time spent on data transfer. Default value of "1s" indicates that data is returned for every second during trading hours. "inputSamplingInterval" - Interval to be used as a minimum step for sampling input prices. Available interval values are: "Xs" - seconds, "Xm" - minutes, "Xh" - hours, "Xd" - trading days (6.5 hours in a trading day), "Xw" - weeks (5 trading days in 1 week), "Xmo" - month (21 trading day in 1 month), "Xy" - years (256 trading days in 1 year), "none" - no sampling. Default value is "none", which indicates that no sampling is applied.

Value

See Also

estimator_create estimator_getSettings

Examples

Run this code
## Not run: 
# data(spy.data) 
# estimator=estimator_create(priceData=spy.data)
# estimator_settings(estimator,
# 				   inputSamplingInterval = '10s',
# 				   resultsSamplingInterval = '10s')
# util_plot2d(variance_mrv(estimator),title="MRV")
# 				   
# dateStart = "2014-11-17 09:30:00"
# dateEnd = "2014-11-17 16:00:00"
# estimator=estimator_create('AAPL',dateStart,dateEnd)
# estimator_settings(estimator,
# 				   resultsSamplingInterval = '10s')
# util_plot2d(variance_mrv(estimator),title="MRV")
# ## End(Not run)

Run the code above in your browser using DataLab