Arguments

primary_id

charater primary identifier of instrument to be created

currency

character name of currency that instrument will be
denominated it. Default=“USD”

multiplier

numeric product multiplier

silent

TRUE/FALSE. silence warnings?

default_type

What type of instrument to make if it is not clear from
the primary_id. ("stock", "future", etc.) Default is NULL.

root

character string to pass to parse_id to be used as
the root_id for easier/more accurate parsing.

assign_i

TRUE/FALSE. Should the instrument be assigned in the
.instrument environment?

...

other passthrough parameters

Details

If currency is not already defined, it will be defined (unless it is
not 3 uppercase characters). The default value for currency is
“USD”. If you do not provide a value for currency,
“USD” will be defined and used to create the instrument.

If primary_id is 6 uppercase letters and default_type is not
provided, it will be assumed that it is the primary_id of an
exchange_rate, in which case, the 1st and 2nd half of
primary_id will be defined as currencys if not
the names of already defined instruments.
If the primary_id begins with a “^” it will be assumed that it
is a yahoo symbol and that the instrument is an index (synthetic), and the
‘src’ will be set to “yahoo”.
(see setSymbolLookup)

If it is not clear from the primary_id what type of instrument to
create, an instrument of type default_type will be created (which is
'NULL' by default). This will happen when primary_id is that of a
stock, future, option, or
bond. This may also happen if primary_id is that of a
future_series or option_series but the
corresponding future or option cannot be found. In this case,
the instrument type would be default_type, but a lot of things would
be filled in as if it were a valid series instrument (e.g. ‘expires’,
‘strike’, ‘suffix_id’, etc.)

Value

Primarily called for its side-effect, but will return the name of the
instrument that was created

Note

This is not intended to be used to create instruments of type
stock, future, option,
or bond although it may be updated in the future.