create_metric: Create metric class

Description Usage Arguments Value Author(s) Examples

View source: R/metric.R

Description

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

Usage

1
2
3
4
## S4 method for signature 'matrix,character'
create_metric(metricData,symbol)
## S4 method for signature 'xts,character'
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

Metric object

Author(s)

Kostin Andrey <andrey.kostin@portfolioeffect.com>

Examples

1
2
3
4
5
6
7
8
## Not run: 
data(aapl.data)
data(goog.data)
AAPL=create_metric(aapl.data,'AAPL')
GOOG=create_metric(goog.data,'GOOG')
plot(AAPL,GOOG,legend=c('AAPL','GOOG'))

## End(Not run)

PortfolioEffectHFT documentation built on May 2, 2019, 11:52 a.m.