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 currency
s if not
the names of already defined instrument
s.
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.)