Learn R Programming

PortfolioEffectHFT (version 1.7)

create_metric: Create metric class

Description

Creates metric object using data provided in matrix or xts format.

Usage

"create_metric"(metricData,symbol) "create_metric"(metricData,symbol)

Arguments

metricData
Matrix of (time, value) rows or an xts object. Time should be in POSIX format expressed in milliseconds.
symbol
Unique identifier of the instrument

Value

Examples

Run this code
## Not run: 
# data(aapl.data)
# data(goog.data)
# AAPL=create_metric(aapl.data)
# GOOG=create_metric(goog.data)
# plot(AAPL,GOOG,legend=c('AAPL','GOOG'))
# ## End(Not run)

Run the code above in your browser using DataLab