Description Usage Arguments Details Value Note Author(s) See Also Examples
Build price series for spreads, butterflies, or other synthetic instruments, using metadata of a previously defined synthetic instrument.
1 2 3 4 5 | buildSpread(spread_id, Dates = NULL, onelot = TRUE,
prefer = NULL, auto.assign = TRUE, env = .GlobalEnv)
buildBasket(spread_id, Dates = NULL, onelot = TRUE,
prefer = NULL, auto.assign = TRUE, env = .GlobalEnv)
|
spread_id |
The name of the |
Dates |
Date range on which to subset. Also, if a
member's data is not available via |
onelot |
Should the series be divided by the first leg's ratio? |
prefer |
Price column to use to build structure. |
auto.assign |
Assign the spread? If FALSE, the xts object will be returned. |
env |
Environment holding data for members as well as where spread data will be assigned. |
The spread and all legs must be defined instruments.
This function can build multileg spreads such as
calendars, butterflies, condors, etc. However, the
returned series will be univariate. It does not return
multiple columns (e.g. ‘Bid’, ‘Ask’,
‘Mid’) like fn_SpreadBuilder
does.
buildBasket
is an alias
TODO: allow for multiplier (divisor) that is a vector.
If auto.assign
is FALSE, a univariate xts object.
Otherwise, the xts object will be assigned to
spread_id
and the spread_id
will be
returned.
this could also be used to build a basket or a strip by using only positive values in memberratio
Brian Peterson, Garrett See
fn_SpreadBuilder
spread
for
instructions on defining the spread
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.