Description Usage Arguments Details Value Author(s) See Also Examples
Construct a future
from a future_series
1 2 |
x |
|
future_id |
Can be any string to use as |
assign_i |
should the future instrument be stored in the |
overwrite |
TRUE/FALSE if an instrument already exists by the same name, should it be overwritten? (Default=FALSE) |
identifiers |
list of identifers to add to the |
... |
any other parameters to pass through to |
Use this if you have defined a future_series object using define_futures
,
or deleted the root future
and you would like to define the root.
a future
object unless called with assign_i=TRUE
in which case the future
will be stored and only the primary_id
will be returned.
Garrett See
instrument
, future
,
future_series
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
s <- front_future("ES")
rm_futures("ES") #delete the root that front_future automatically created
extract_future(s)
extract_future(s, extra_field="custom") # can add any extra arbitrary fields
currency(c("USD", "AUD"))
define_futures("AUD", "GLOBEX", "201112", include_expired=1)
extract_future("AUD_Z1") # not assigned
extract_future("AUD_Z1", assign_i=TRUE) #root stored in "..AUD"
getInstrument("AUD") #Oh no, that's the curreny
getInstrument("AUD", type='future') #specify type to get the root
extract_future("AUD_Z1", future_id='X6A', assign_i=TRUE, identifiers=list(CME='6A'))
getInstrument("6A")
# The next line would replace "AUD" the currency with a future
# extract_future("AUD_Z1", future_id='AUD', assign_i=TRUE, identifiers=list(CME='6A'), overwrite=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.