Notionalize: Convert price series to/from notional value
Description
Notionalize multiplies all prices by the contract multiplier
Denotionalize divides all prices by the contract multiplier
Usage
Notionalize(x, name, env = .GlobalEnv)
Denotionalize(x, name, env = .GlobalEnv)
Arguments
x
an xts object, or an object that is coercible to xts
name
primary_id of the instrument that has the multiplier;
usually the same as the name of x
env
environment. where to find x if only its name is provided
Value
an object of the same class as x
Details
The mulitplier is only applied to columns with prices. A column is
considered to be a price column if its name contains “Open”,
“High”, “Low”, “Close”, “Bid”, “Ask”,
“Trade”, “Mid”, or “Price” and does not contain
“Size”, “Sz”, “Volume”, “Qty”,
“Quantity”, “OpInt”, “OpenInterest”
(not case-sensitive)