Settings - Maple Help

Finance

 Settings
 return default settings

 Calling Sequence Settings(parameter) Settings(newsettings)

Parameters

 parameters - businessdayconvention, calendar, compounding, daycounter, dateformat, replications, settlementdays, timesteps, or a list of these names; (optional) parameters of interest newsettings - an equation of the form parameter = value, where parameter is one of businessdayconvention, calendar, compounding, daycounter, dateformat, replications, settlementdays, or timesteps, and value is the new default value, or a list of equations of this type; settings with new default values

Description

 • The Settings() calling sequence returns a list of equations of the form parameter = value, where parameter runs through all parameters whose default values can be set globally.
 • The Settings(parameter) calling sequence returns the default values for the specified parameter(s). If the value of the parameter parameter is a single name, the Settings command will return an equation of the form parameter = value where value is the current default value for the corresponding parameter. This value will be used by all commands from the Finance package for which this parameter is relevant. If parameter is a list of names, then a list of equations of the above type will be returned.
 • The Settings(parameter = value) calling sequence sets the new default value of the parameter parameter and returns the old value.
 • Finally, the Settings([parameter[1] = value[1], parameter[2] = value[2], ..., parameter[n] = value[n]]) calling sequence will set the new default values for all of the specified parameters and return the corresponding old default values.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

Here are the default settings.

 > $\mathrm{Settings}\left(\right)$
 $\left[{\mathrm{dateformat}}{=}{"%B %e, %Y"}{,}{\mathrm{daycounter}}{=}{\mathrm{Historical}}{,}{\mathrm{replications}}{=}{10000}{,}{\mathrm{businessdayconvention}}{=}{\mathrm{Unadjusted}}{,}{\mathrm{calendar}}{=}{\mathrm{Null}}{,}{\mathrm{timesteps}}{=}{100}{,}{\mathrm{digits}}{=}{10}{,}{\mathrm{settlementdays}}{=}{0}{,}{\mathrm{compounding}}{=}{\mathrm{Continuous}}\right]$ (1)

Here is the default value of the businessdayconvention parameter.

 > $\mathrm{Settings}\left(\mathrm{businessdayconvention}\right)$
 ${\mathrm{Unadjusted}}$ (2)

Here is the default value of the businessdayconvention and dateformat parameters.

 > $\mathrm{Settings}\left(\left[\mathrm{businessdayconvention},\mathrm{dateformat}\right]\right)$
 $\left[{\mathrm{Unadjusted}}{,}{"%B %e, %Y"}\right]$ (3)

Here is an example of a command that uses these defaults.

 > $\mathrm{IsHoliday}\left("January 01, 2006",\mathrm{Toronto}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{AdjustDate}\left("January 01, 2006",\mathrm{Toronto},\mathrm{output}=\mathrm{formatted}\right)$
 ${"January 1, 2006"}$ (5)

Set new default values.

 > $\mathrm{Settings}\left(\mathrm{businessdayconvention}='\mathrm{Following}'\right)$
 ${\mathrm{Unadjusted}}$ (6)

Try the new default values.

 > $\mathrm{AdjustDate}\left("January 01, 2006",\mathrm{Toronto},\mathrm{output}=\mathrm{formatted}\right)$
 ${"January 3, 2006"}$ (7)

Compatibility

 • The Finance[Settings] command was introduced in Maple 15.