BondNotationFormatter
is typically used in the XML Renderer Framework, but can be invoked programmatically
as in the following example, which evaluates to "99-10+":
caplin.element.formatter.BondNotationFormatter.format(99.328, {})
Attributes | Name and Description |
---|---|
|
caplin.element.formatter.BondNotationFormatter()
|
Attributes | Name and Description |
---|---|
|
String
format(Variant vValue, Map mAttributes)
Formats a bond price into one of two standard market convention notations. |
►
caplin.element.formatter.BondNotationFormatter()
►
String
format(Variant vValue, Map mAttributes)
Formats a bond price into one of two standard market convention notations.
Two market conventions are supported, which both express the fractional part of the price as a whole number of 32nds, followed by a remainder which is expressed in as a number of eighths in two different ways: Fractions notation expresses the remainder as a unicode fraction, but using + to represent a half (e.g. 102-05+)Attribute Options:
Option | Description |
---|---|
fractions | if true, then fractions notation will be used (defaults to false). |
rounding | rounding method for least significant 8th: "up", "down" (optional, defaults to nearest 8th). |
Variant | vValue | the price (String or Number type). |
Map | mAttributes | the map of attributes. |