Learn R Programming

PortfolioEffectEstim (version 1.4)

estimator_create: Creates new estimator

Description

Creates new empty estimator object.

Usage

estimator_create(asset, fromTime, toTime, priceData)

Arguments

asset
Unique identifier of the instrument
fromTime
Start of market data interval in "yyyy-MM-dd hh:mm:ss" format when internal market data is used. Offset from last available date/time by N days is denoted as "t-N" (e.g. "t-7" denotes offset by 7 days).
toTime
End of market data interval in "yyyy-MM-dd hh:mm:ss" format when internal market data is used. Offset from last available date/time by N days is denoted as "t-N" (e.g. "t-7" denotes offset by 7 days).
priceData
Vector of (time, price) observations for asset when external market data is used.

Value

See Also

estimator_settings

Examples

Run this code
## Not run: 
# data(goog.data) 
# estimator=estimator_create(priceData=goog.data)
# estimator_settings(estimator,resultsSamplingInterval='60s')
# util_plot2d(variance_rv(estimator),title="RV")
# 
# 
# estimator=estimator_create(asset='AAPL',fromTime="2014-09-01 09:00:00", 
# toTime="2014-09-14 16:00:00")
# estimator_settings(estimator,resultsSamplingInterval='60s')
# util_plot2d(variance_tsrv(estimator,K=2),title="TSRV")
# 
# estimator=estimator_create(asset='GOOG',fromTime="t-2", toTime="t")
# estimator_settings(estimator,resultsSamplingInterval='60s')
# util_plot2d(variance_mrv(estimator),title="MRV")
# ## End(Not run)

Run the code above in your browser using DataLab