Skip to main content

Bloomberg debt instruments updates

This mapping is used for Security Type Debt instrument (BOND).

This mapping is used in the Securities view when you click Update Security Data and choose Bloomberg.

Note mappings update.bloomberg.C ,update.bloomberg.CE, update.bloomberg.D, update.bloomberg.E and update.bloomberg.E O are applied depending on Security type.

Configuration

Asset classes and types are set up in PreferenceSecuritiesAsset classes and types (see Asset classes and types in FA Back reference). To fully utilize the updates functionality, you need the following asset classes and types:

  • Asset class breakdown

  • Geographical allocation (M49)

  • ISO10962 Classification of Financial Instruments

  • Currency exposure

Also to utilize the Duration contribution bucket data a special package should be installed from Appstore that sets up Key figures and related Analytics+ columns for 16 Duration contribution buckets Dur 3m - Dur 30y. This also gives Analytics+ view Duration Matrix.

Mapping

Mapping name: update.bloomberg.D 

Updated fields

  • Security code

  • ISIN code

  • Name

  • Outstanding amount

  • Fixings

  • Yield to maturity (YTM)

  • Convexity

  • Macaulay duration

  • Modified duration

  • Key figures

    • Credit Rating for bond (Moody’s Issue rating BBG: RTG_MOODY) and issuer (Moody’s Issuer rating BBG: RTG_MDY_ISSUER)

    • Credit Rating for bond (Fitch Issue rating BBG: RTG_FITCH) and issuer (Fitch Issuer rating BBG: RTG_FITCH_LT_ISSUER_DEFAULT)

    • Credit Rating for bond (Standard & Poor's Issue rating BBG: RTG_SP) and issuer (Standard & Poor's Issuer rating BBG: RTG_SP_LT_LC_ISSUER_CREDIT)

    • Duration contribution buckets (BBG: KEY_RATE_DUR_NNN)

  • Allocations

    • Asset class breakdown

    • Geographical allocation (M49)

    • ISO10962 Classification of Financial Instruments

    • Currency exposure

  • Profile fields

  • Covered (Solvency II)

  • Call date

  • Maturity date

Mapping table

Row

Source field

Value mapping

FA field

Script

1

ID_ISIN

s.isinCode

2

CRNCY

s.securityCode

output="[ID_ISIN]"+"_"+"[CRNCY]"
;

3

FLT_CPN_HIST

s.coupons

if((!\"[FLT_CPN_HIST]\"?.trim())||(\"[FLT_CPN_HIST]\"=='')||(\"[FLT_CPN_HIST]\"=='null')||(\"[FLT_CPN_HIST]\"=='N.A.')) \n{\n    output=\"\"\n}\nelse\n{\n    output=\"[FLT_CPN_HIST]\"\n}\n; "},if((!\"[FLT_CPN_HIST]\"?.trim())||(\"[FLT_CPN_HIST]\"=='')||(\"[FLT_CPN_HIST]\"=='null')||(\"[FLT_CPN_HIST]\"=='N.A.')) \n{\n    output=\"\"\n}\nelse\n{\n    output=\"[FLT_CPN_HIST]\"\n}\n; "},

4

FITCH_EFF_DT

fitchdt

if(("[FITCH_EFF_DT]"=='')||("[FITCH_EFF_DT]"=='null')||("[FITCH_EFF_DT]"=='N.A.')||("[FITCH_EFF_DT]"=='N.S.')||("[FITCH_EFF_DT]"=='NR'))
{output = ""}
else
{output =Date.parse("MM/dd/yyyy","[FITCH_EFF_DT]").format("yyyy-MM-dd")}
;

5

RTG_FITCH

fitch

def fitchchar="[RTG_FITCH]".replace('u','');
if((fitchchar=='')||("[RTG_FITCH]"=='null')||(fitchchar=='N.A.')||(fitchchar=='N.S.')||(fitchchar=='NR')||(fitchchar=='Expected')||(fitchchar=='WD')||(fitchchar=='RD'))
{output = ""}
else
{output=fitchchar.minus("(EXP)")}
;

6

FCR

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[fitchdt]"
def figureCode = "FCR"
def value = "[fitch]"
if(s){
def figures = s.getFiguresAsObject().getLatestValues()
// Has the figure been defined in the system?
boolean figureDefined = services.applicationContext.getBean(KeyFigureRepository.class).findByCode(figureCode) != null
// Is there a previous value for this figure in this security?
boolean previousValueExists = figures.containsKey(figureCode)
// If there is a ned date?
boolean dateHasChanged = previousValueExists && figures.get(figureCode).get("date").toString() != valueDate
// If there is a nev value?
boolean figureHasChanged = previousValueExists && figures.get(figureCode).get("value").toString() != value
if(figureDefined && (figureHasChanged || dateHasChanged || !previousValueExists)&&value!="") {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

7

MOODY_EFF_DT

moodydt

if(("[MOODY_EFF_DT]"=='')||("[MOODY_EFF_DT]"=='null')||("[MOODY_EFF_DT]"=='N.A.')||("[MOODY_EFF_DT]"=='N.S.')||("[MOODY_EFF_DT]"=='NR'))
{output = ""}
else
{output =Date.parse("MM/dd/yyyy","[MOODY_EFF_DT]").format("yyyy-MM-dd")}
;

8

RTG_MOODY

moody

if(("[RTG_MOODY]"=='')||("[RTG_MOODY]"=='null')||("[RTG_MOODY]"=='N.A.')||("[RTG_MOODY]"=='N.S.')||("[RTG_MOODY]"=='NR')||("[RTG_MOODY]"=='WR')||("[RTG_MOODY]"=='Unsolicited')||("[RTG_MOODY]"=='e, p'))
{output = ""}
else
{output="[RTG_MOODY]"}
;

9

MCR

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[moodydt]"
def figureCode = "MCR"
def value = "[moody]"
if(s){
def figures = s.getFiguresAsObject().getLatestValues()
// Has the figure been defined in the system?
boolean figureDefined = services.applicationContext.getBean(KeyFigureRepository.class).findByCode(figureCode) != null
// Is there a previous value for this figure in this security?
boolean previousValueExists = figures.containsKey(figureCode)
// If there is a ned date?
boolean dateHasChanged = previousValueExists && figures.get(figureCode).get("date").toString() != valueDate
// If there is a nev value?
boolean figureHasChanged = previousValueExists && figures.get(figureCode).get("value").toString() != value
if(figureDefined && (figureHasChanged || dateHasChanged || !previousValueExists)&&value!="") {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

10

SP_EFF_DT

spdt

if(("[SP_EFF_DT]"=='')||("[SP_EFF_DT]"=='null')||("[SP_EFF_DT]"=='N.A.')||("[SP_EFF_DT]"=='N.S.')||("[SP_EFF_DT]"=='NR'))
{output = ""}
else
{output =Date.parse("MM/dd/yyyy","[SP_EFF_DT]").format("yyyy-MM-dd")}
;

11

RTG_SP

sp

if(("[RTG_SP]"=='')||("[RTG_SP]"=='null')||("[RTG_SP]"=='N.A.')||("[RTG_SP]"=='N.S.')||("[RTG_SP]"=='NR')||("[RTG_SP]"=='SD')||("[RTG_SP]"=='Unsolicited')||("[RTG_SP]"=='Pr'))
{output = ""}
else
{output="[RTG_SP]".minus("(P)")}
;

12

SPCR

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[spdt]"
def figureCode = "SPCR"
def value = "[sp]"
if(s){
def figures = s.getFiguresAsObject().getLatestValues()
// Has the figure been defined in the system?
boolean figureDefined = services.applicationContext.getBean(KeyFigureRepository.class).findByCode(figureCode) != null
// Is there a previous value for this figure in this security?
boolean previousValueExists = figures.containsKey(figureCode)
// If there is a new date?
boolean dateHasChanged = previousValueExists && figures.get(figureCode).get("date").toString() != valueDate
// If there is a new value??
boolean figureHasChanged = previousValueExists && figures.get(figureCode).get("value").toString() != value
if(figureDefined && (figureHasChanged || dateHasChanged || !previousValueExists)&&value!="") {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

13

AMT_ISSUED

s.share

14

SECURITY_NAME

s.name

15

BICS_LEVEL_1_SECTOR_CODE

BICSSEC

16

CURR

output = ""
if((!"[CRNCY]"?.trim())||("[CRNCY]"=='N.A.'))
{
output = ""
}
else
{
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def allocationsChanged = true
def allocationDate = "2009-01-01" // Any new allocations are set on the specified date
if(s){
def allocs = s.getAllocationsOnDate(new Date(), "CURR")
if(allocs && allocs.size() == 1 && allocs.get(0).sector.code == "[CRNCY]"){
allocationsChanged = false
} else if(allocs && allocs.size() == 1 && allocs.get(0).sector.code != "[CRNCY]"){
// There is an existing allocation that has changed -> the new allocation will be set for this date
allocationDate = new Date().format("yyyy-MM-dd")
}
}
if(services.configurationService.findGroupByCode('CURR') && allocationsChanged){
output += ",CURR:"+ allocationDate +":"+"[CRNCY]"+"=100"
}
}
;   

17

ASSET

output = ""
if((!"[BICS_LEVEL_1_SECTOR_CODE]"?.trim())||("[BICS_LEVEL_1_SECTOR_CODE]"=='N.A.'))
{
output = ""
}
else
{
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def allocationsChanged = true
def allocationDate = "2009-01-01" // Any new allocations are set on the specified date
if(s){
def allocs = s.getAllocationsOnDate(new Date(), "ASSET")
if(allocs && allocs.size() == 1 && allocs.get(0).sector.code == "[BICS_LEVEL_1_SECTOR_CODE]"){
allocationsChanged = false
} else if(allocs && allocs.size() == 1 && allocs.get(0).sector.code != "[BICS_LEVEL_1_SECTOR_CODE]"){
// There is an existing allocation that has changed -> the new allocation will be set for this date
allocationDate = new Date().format("yyyy-MM-dd")
}
}
if(services.configurationService.findGroupByCode('ASSET') && allocationsChanged){
output += ",ASSET:"+ allocationDate +":"+"[BICS_LEVEL_1_SECTOR_CODE]"+"=100"
}
}
;

18

CNTRY_OF_RISK

CTRY

switch("[CNTRY_OF_RISK]")
{
case "AW":
output="533"
break
case "AF":
output="004"
break
case "AO":
output="024"
break
case "AI":
output="660"
break
case "AX":
output="248"
break
case "AL":
output="008"
break
case "AD":
output="020"
break
case "AN":
output="530"
break
case "AE":
output="784"
break
case "AR":
output="032"
break
case "AM":
output="051"
break
case "AS":
output="016"
break
case "AQ":
output="010"
break
case "TF":
output="260"
break
case "AG":
output="028"
break
case "AU":
output="036"
break
case "AT":
output="040"
break
case "AZ":
output="031"
break
case "BI":
output="108"
break
case "BE":
output="056"
break
case "BJ":
output="204"
break
case "BQ":
output="535"
break
case "BF":
output="854"
break
case "BD":
output="050"
break
case "BG":
output="100"
break
case "BH":
output="048"
break
case "BS":
output="044"
break
case "BA":
output="070"
break
case "BY":
output="112"
break
case "BZ":
output="084"
break
case "BM":
output="060"
break
case "BO":
output="068"
break
case "BR":
output="076"
break
case "BB":
output="052"
break
case "BN":
output="096"
break
case "BT":
output="064"
break
case "BV":
output="074"
break
case "BW":
output="072"
break
case "CF":
output="140"
break
case "CA":
output="124"
break
case "CC":
output="166"
break
case "CH":
output="756"
break
case "CL":
output="152"
break
case "CN":
output="156"
break
case "CI":
output="384"
break
case "CM":
output="120"
break
case "CD":
output="180"
break
case "CG":
output="178"
break
case "CK":
output="184"
break
case "CO":
output="170"
break
case "KM":
output="174"
break
case "CV":
output="132"
break
case "CR":
output="188"
break
case "CU":
output="192"
break
case "CW":
output="531"
break
case "CX":
output="162"
break
case "KY":
output="136"
break
case "CY":
output="196"
break
case "CZ":
output="203"
break
case "DE":
output="276"
break
case "DJ":
output="262"
break
case "DM":
output="212"
break
case "DK":
output="208"
break
case "DO":
output="214"
break
case "DZ":
output="012"
break
case "EC":
output="218"
break
case "EG":
output="818"
break
case "ER":
output="232"
break
case "EH":
output="732"
break
case "ES":
output="724"
break
case "EE":
output="233"
break
case "ET":
output="231"
break
case "FI":
output="246"
break
case "FJ":
output="242"
break
case "FK":
output="238"
break
case "FR":
output="250"
break
case "FO":
output="234"
break
case "FM":
output="583"
break
case "FX":
output="249"
break
case "GA":
output="266"
break
case "GB":
output="826"
break
case "GE":
output="268"
break
case "GG":
output="831"
break
case "GH":
output="288"
break
case "GI":
output="292"
break
case "GN":
output="324"
break
case "GP":
output="312"
break
case "GM":
output="270"
break
case "GW":
output="624"
break
case "GQ":
output="226"
break
case "GR":
output="300"
break
case "GD":
output="308"
break
case "GL":
output="304"
break
case "GT":
output="320"
break
case "GF":
output="254"
break
case "GU":
output="316"
break
case "GY":
output="328"
break
case "HK":
output="344"
break
case "HM":
output="334"
break
case "HN":
output="340"
break
case "HR":
output="191"
break
case "HT":
output="332"
break
case "HU":
output="348"
break
case "ID":
output="360"
break
case "IM":
output="833"
break
case "IN":
output="356"
break
case "IM":
output="833"
break
case "IO":
output="086"
break
case "IE":
output="372"
break
case "IR":
output="364"
break
case "IQ":
output="368"
break
case "IS":
output="352"
break
case "IL":
output="376"
break
case "IT":
output="380"
break
case "JM":
output="388"
break
case "JE":
output="832"
break
case "JO":
output="400"
break
case "JP":
output="392"
break
case "KZ":
output="398"
break
case "KE":
output="404"
break
case "KG":
output="417"
break
case "KH":
output="116"
break
case "KI":
output="296"
break
case "KN":
output="659"
break
case "KR":
output="410"
break
case "KW":
output="414"
break
case "LA":
output="418"
break
case "LB":
output="422"
break
case "LR":
output="430"
break
case "LY":
output="434"
break
case "LC":
output="662"
break
case "LI":
output="438"
break
case "LK":
output="144"
break
case "LS":
output="426"
break
case "LT":
output="440"
break
case "LU":
output="442"
break
case "LV":
output="428"
break
case "MO":
output="446"
break
case "MA":
output="504"
break
case "MC":
output="492"
break
case "MD":
output="498"
break
case "MG":
output="450"
break
case "MV":
output="462"
break
case "MX":
output="484"
break
case "MH":
output="584"
break
case "MK":
output="807"
break
case "ML":
output="466"
break
case "MT":
output="470"
break
case "MM":
output="104"
break
case "ME":
output="499"
break
case "MN":
output="496"
break
case "MP":
output="580"
break
case "MZ":
output="508"
break
case "MR":
output="478"
break
case "MS":
output="500"
break
case "MQ":
output="474"
break
case "MU":
output="480"
break
case "MW":
output="454"
break
case "MY":
output="458"
break
case "YT":
output="175"
break
case "NA":
output="516"
break
case "NC":
output="540"
break
case "NE":
output="562"
break
case "NF":
output="574"
break
case "NG":
output="566"
break
case "NI":
output="558"
break
case "NU":
output="570"
break
case "NL":
output="528"
break
case "NO":
output="578"
break
case "NP":
output="524"
break
case "NR":
output="520"
break
case "NZ":
output="554"
break
case "OM":
output="512"
break
case "PK":
output="586"
break
case "PA":
output="591"
break
case "PN":
output="612"
break
case "PE":
output="604"
break
case "PH":
output="608"
break
case "PW":
output="585"
break
case "PG":
output="598"
break
case "PL":
output="616"
break
case "PR":
output="630"
break
case "KP":
output="408"
break
case "PT":
output="620"
break
case "PY":
output="600"
break
case "PS":
output="275"
break
case "PF":
output="258"
break
case "QA":
output="634"
break
case "RE":
output="638"
break
case "RO":
output="642"
break
case "RO":
output="642"
break
case "RU":
output="643"
break
case "RW":
output="646"
break
case "SA":
output="682"
break
case "CS":
output="891"
break
case "SD":
output="736"
break
case "SN":
output="686"
break
case "SG":
output="702"
break
case "GS":
output="239"
break
case "SH":
output="654"
break
case "SJ":
output="744"
break
case "SB":
output="090"
break
case "SL":
output="694"
break
case "SV":
output="222"
break
case "SM":
output="674"
break
case "SO":
output="706"
break
case "PM":
output="666"
break
case "RS":
output="688"
break
case "SS":
output="728"
break
case "ST":
output="678"
break
case "SR":
output="740"
break
case "SK":
output="703"
break
case "SI":
output="705"
break
case "SE":
output="752"
break
case "SZ":
output="748"
break
case "SX":
output="534"
break
case "SC":
output="690"
break
case "SY":
output="760"
break
case "TC":
output="796"
break
case "TD":
output="148"
break
case "TG":
output="768"
break
case "TH":
output="764"
break
case "TJ":
output="762"
break
case "TK":
output="772"
break
case "TM":
output="795"
break
case "TL":
output="626"
break
case "TP":
output="626"
break
case "TO":
output="776"
break
case "TT":
output="780"
break
case "TN":
output="788"
break
case "TR":
output="792"
break
case "TV":
output="798"
break
case "TW":
output="158"
break
case "TZ":
output="834"
break
case "UG":
output="800"
break
case "UA":
output="804"
break
case "UM":
output="581"
break
case "UY":
output="858"
break
case "US":
output="840"
break
case "UZ":
output="860"
break
case "VA":
output="336"
break
case "VC":
output="670"
break
case "VE":
output="862"
break
case "VG":
output="092"
break
case "VI":
output="850"
break
case "VN":
output="704"
break
case "VU":
output="548"
break
case "WF":
output="876"
break
case "WS":
output="882"
break
case "YE":
output="887"
break
case "YU":
output="891"
break
case "ZA":
output="710"
break
case "ZM":
output="894"
break
case "ZR":
output="180"
break
case "ZW":
output="716"
break
default:
output=''
}
;"},

19

M49

output = ""
if((!"[CNTRY_OF_RISK]"?.trim())||("[CNTRY_OF_RISK]"=='N.A.'))
{
output = ""
}
else
{
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def allocationsChanged = true
def allocationDate = "2009-01-01" // Any new allocations are set on the specified date
if(s){
def allocs = s.getAllocationsOnDate(new Date(), "M49")
if(allocs && allocs.size() == 1 && allocs.get(0).sector.code == "[CTRY]"){
allocationsChanged = false
} else if(allocs && allocs.size() == 1 && allocs.get(0).sector.code != "[CTRY]"){
// There is an existing allocation that has changed -> the new allocation will be set for this date
allocationDate = new Date().format("yyyy-MM-dd")
}
}
if(services.configurationService.findGroupByCode('M49') && allocationsChanged){
output += ",M49:"+ allocationDate +":"+"[CTRY]"+"=100"
}
}
;

20

CFI_CODE

CFI

21

BLOOMBERG_CFI_CODE

CFI

22

ISO10962

output = ""
if((!"[CFI]"?.trim())||("[CFI]"=='N.A.'))
{
output = ""
}
else
{
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def allocationsChanged = true
def allocationDate = "2009-01-01" // Any new allocations are set on the specified date
if(s){
def allocs = s.getAllocationsOnDate(new Date(), "ISO10962")
if(allocs && allocs.size() == 1 && allocs.get(0).sector.code == "[CFI]".substring(0,2)){
allocationsChanged = false
} else if(allocs && allocs.size() == 1 && allocs.get(0).sector.code != "[CFI]".substring(0,2)){
// There is an existing allocation that has changed -> the new allocation will be set for this date
allocationDate = new Date().format("yyyy-MM-dd")
}
}
if(services.configurationService.findGroupByCode('ISO10962') && allocationsChanged){
output += ",ISO10962:"+ allocationDate +":"+"[CFI]".substring(0,2)+"=100"
}
}
;

23

s.allocations

output="***[ASSET][CURR][M49][ISO10962]"
;

24

PX_CLOSE_DT

MKTDATE

output=Date.parse("MM/dd/yyyy", "[PX_CLOSE_DT]").format("yyyy-MM-dd");

25

KEY_RATE_DUR_3MO

DUR_3MO

if("[KEY_RATE_DUR_3MO]"!=".000")
{
output=":DUR_3MO="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_3MO]"
}
else
{
output=""
}
;

26

KEY_RATE_DUR_6MO

DUR_6MO

if("[KEY_RATE_DUR_6MO]"!=".000")
{
output=":DUR_6MO="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_6MO]"
}
else
{
output=""
}
;

27

KEY_RATE_DUR_1YR

DUR_1YR

if("[KEY_RATE_DUR_1YR]"!=".000")
{
output=":DUR_1YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_1YR]"
}
else
{
output=""
}
;

28

KEY_RATE_DUR_2YR

DUR_2YR

if("[KEY_RATE_DUR_2YR]"!=".000")
{
output=":DUR_2YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_2YR]"
}
else
{
output=""
}
; 

29

KEY_RATE_DUR_3YR

DUR_3YR

if("[KEY_RATE_DUR_3YR]"!=".000")
{
output=":DUR_3YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_3YR]"
}
else
{
output=""
}
;

30

KEY_RATE_DUR_4YR

DUR_4YR

if("[KEY_RATE_DUR_4YR]"!=".000")
{
output=":DUR_4YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_4YR]"
}
else
{
output=""
}
;

31

KEY_RATE_DUR_5YR

DUR_5YR

if("[KEY_RATE_DUR_5YR]"!=".000")
{
output=":DUR_5YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_5YR]"
}
else
{
output=""
}
;

32

KEY_RATE_DUR_6YR

DUR_6YR

if("[KEY_RATE_DUR_6YR]"!=".000")
{
output=":DUR_6YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_6YR]"
}
else
{
output=""
}
;

33

KEY_RATE_DUR_7YR

DUR_7YR

if("[KEY_RATE_DUR_7YR]"!=".000")
{
output=":DUR_7YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_7YR]"
}
else
{
output=""
}
;          

34

KEY_RATE_DUR_8YR

DUR_8YR

if("[KEY_RATE_DUR_8YR]"!=".000")
{
output=":DUR_8YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_8YR]"
}
else
{
output=""
}
;

35

KEY_RATE_DUR_9YR

DUR_9YR

if("[KEY_RATE_DUR_9YR]"!=".000")
{
output=":DUR_9YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_9YR]"
}
else
{
output=""
}
;

36

KEY_RATE_DUR_10YR

DUR_10YR

if("[KEY_RATE_DUR_10YR]"!=".000")
{
output=":DUR_10YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_10YR]"
}
else
{
output=""
}
;

37

KEY_RATE_DUR_15YR

DUR_15YR

if("[KEY_RATE_DUR_15YR]"!=".000")
{
output=":DUR_15YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_15YR]"
}
else
{
output=""
}
;

38

KEY_RATE_DUR_20YR

DUR_20YR

if("[KEY_RATE_DUR_20YR]"!=".000")
{
output=":DUR_20YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_20YR]"
}
else
{
output=""
}
;

39

KEY_RATE_DUR_25YR

DUR_25YR

if("[KEY_RATE_DUR_25YR]"!=".000")
{
output=":DUR_25YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_25YR]"
}
else
{
output=""
}
;

40

KEY_RATE_DUR_30YR

DUR_30YR

if("[KEY_RATE_DUR_30YR]"!=".000")
{
output=":DUR_30YR="+"[MKTDATE]"+"="+"[KEY_RATE_DUR_30YR]"
}
else
{
output=""
}
;

41

DURARRAY

output="[DUR_3MO]"+"[DUR_6MO]"+"[DUR_1YR]"+"[DUR_2YR]"+"[DUR_3YR]"+"[DUR_4YR]"+"[DUR_5YR]"+"[DUR_6YR]"+"[DUR_7YR]"+"[DUR_8YR]"+"[DUR_9YR]"+"[DUR_10YR]"+"[DUR_15YR]"+"[DUR_20YR]"+"[DUR_25YR]"+"[DUR_30YR]";

42

YLD_YTM_MID

s.ytm

43

DUR_MID

s.macaulayDuration

44

DUR_ADJ_MID

s.modifiedDuration

45

CNVX_MID

s.convexity

46

RTG_FITCH_LT_ISSUER_DFLT_RTG_DT

fitchIssDt

if(("[RTG_FITCH_LT_ISSUER_DFLT_RTG_DT]"=='')||("[RTG_FITCH_LT_ISSUER_DFLT_RTG_DT]"=='null')||("[RTG_FITCH_LT_ISSUER_DFLT_RTG_DT]"=='N.A.')||("[RTG_FITCH_LT_ISSUER_DFLT_RTG_DT]"=='N.S.')||("[RTG_FITCH_LT_ISSUER_DFLT_RTG_DT]"=='NR')){output = ""}else{output =Date.parse("MM/dd/yyyy","[RTG_FITCH_LT_ISSUER_DFLT_RTG_DT]").format("yyyy-MM-dd")};

47

RTG_MDY_ISSUER_EFF_DT

moodyIssDt

if(("[RTG_MDY_ISSUER_EFF_DT]"=='')||("[RTG_MDY_ISSUER_EFF_DT]"=='null')||("[RTG_MDY_ISSUER_EFF_DT]"=='N.A.')||("[RTG_MDY_ISSUER_EFF_DT]"=='N.S.')||("[RTG_MDY_ISSUER_EFF_DT]"=='NR')){output = ""}else{output =Date.parse("MM/dd/yyyy","[RTG_MDY_ISSUER_EFF_DT]").format("yyyy-MM-dd")};

48

RTG_SP_LT_LC_ISS_CRED_RTG_DT

spIssDt

if(("[RTG_SP_LT_LC_ISS_CRED_RTG_DT]"=='')||("[RTG_SP_LT_LC_ISS_CRED_RTG_DT]"=='null')||("[RTG_SP_LT_LC_ISS_CRED_RTG_DT]"=='N.A.')||("[RTG_SP_LT_LC_ISS_CRED_RTG_DT]"=='N.S.')||("[RTG_SP_LT_LC_ISS_CRED_RTG_DT]"=='NR')){output = ""}else{output =Date.parse("MM/dd/yyyy","[RTG_SP_LT_LC_ISS_CRED_RTG_DT]").format("yyyy-MM-dd")};

49

RTG_FITCH_LT_ISSUER_DEFAULT

fitchIss

def fitchchar="[RTG_FITCH_LT_ISSUER_DEFAULT]".replace('u','');if((fitchchar=='')||("[RTG_FITCH_LT_ISSUER_DEFAULT]"=='null')||(fitchchar=='N.A.')||(fitchchar=='N.S.')||(fitchchar=='NR')||(fitchchar=='Expected')||(fitchchar=='WD')||(fitchchar=='RD')){output = ""}else{output=fitchchar.minus("(EXP)")};

50

RTG_MDY_ISSUER

moodyIss

if(("[RTG_MDY_ISSUER]"=='')||("[RTG_MDY_ISSUER]"=='null')||("[RTG_MDY_ISSUER]"=='N.A.')||("[RTG_MDY_ISSUER]"=='N.S.')||("[RTG_MDY_ISSUER]"=='NR')||("[RTG_MDY_ISSUER]"=='WR')||("[RTG_MDY_ISSUER]"=='Unsolicited')||("[RTG_MDY_ISSUER]"=='e, p')){output = ""}else{output="[RTG_MDY_ISSUER]"};

51

RTG_SP_LT_LC_ISSUER_CREDIT

spIss

if(("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='null')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='N.A.')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='N.S.')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='NR')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='SD')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='Unsolicited')||("[RTG_SP_LT_LC_ISSUER_CREDIT]"=='Pr')){output = ""}else{output="[RTG_SP_LT_LC_ISSUER_CREDIT]".minus("(P)")};

52

FISSCR

import com.fasolutions2.mod.repository.KeyFigureRepositoryoutput = ""def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")def valueDate = "[fitchIssDt]"def figureCode = "FISSCR"def value = "[fitchIss]"if(s){    def figures = s.getFiguresAsObject().getLatestValues()    // Has the figure been defined in the system?    boolean figureDefined = services.applicationContext.getBean(KeyFigureRepository.class).findByCode(figureCode) != null    // Is there a previous value for this figure in this security?    boolean previousValueExists = figures.containsKey(figureCode)    // If there is a ned date?    boolean dateHasChanged =  previousValueExists && figures.get(figureCode).get("date").toString() != valueDate    // If there is a nev value?    boolean figureHasChanged =  previousValueExists && figures.get(figureCode).get("value").toString() != value    if(figureDefined && (figureHasChanged || dateHasChanged || !previousValueExists)&&value!="") {        output = ":"+figureCode+"="+valueDate+"="+value    }}

53

MISSCR

import com.fasolutions2.mod.repository.KeyFigureRepositoryoutput = ""def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")def valueDate = "[moodyIssDt]"def figureCode = "MISSCR"def value = "[moodyIss]"if(s){    def figures = s.getFiguresAsObject().getLatestValues()    // Has the figure been defined in the system?    boolean figureDefined = services.applicationContext.getBean(KeyFigureRepository.class).findByCode(figureCode) != null    // Is there a previous value for this figure in this security?    boolean previousValueExists = figures.containsKey(figureCode)    // If there is a ned date?    boolean dateHasChanged =  previousValueExists && figures.get(figureCode).get("date").toString() != valueDate    // If there is a nev value?    boolean figureHasChanged =  previousValueExists && figures.get(figureCode).get("value").toString() != value    if(figureDefined && (figureHasChanged || dateHasChanged || !previousValueExists)&&value!="") {        output = ":"+figureCode+"="+valueDate+"="+value    }}

54

SPISSCR

import com.fasolutions2.mod.repository.KeyFigureRepositoryoutput = ""def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")def valueDate = "[spIssDt]"def figureCode = "SPISSCR"def value = "[spIss]"if(s){    def figures = s.getFiguresAsObject().getLatestValues()    // Has the figure been defined in the system?    boolean figureDefined = services.applicationContext.getBean(KeyFigureRepository.class).findByCode(figureCode) != null    // Is there a previous value for this figure in this security?    boolean previousValueExists = figures.containsKey(figureCode)    // If there is a new date?    boolean dateHasChanged =  previousValueExists && figures.get(figureCode).get("date").toString() != valueDate    // If there is a new value??    boolean figureHasChanged =  previousValueExists && figures.get(figureCode).get("value").toString() != value    if(figureDefined && (figureHasChanged || dateHasChanged || !previousValueExists)&&value!="") {        output = ":"+figureCode+"="+valueDate+"="+value    }}

55

s.keyFigures

output="***[FCR][MCR][SPCR][DURARRAY][FISSCR][MISSCR][SPISSCR]";

56

IS_COVERED

s.profileAttributes

if(("[IS_COVERED]"=="Y")){    output="security.sii.coveredBond=true:String"}else if(("[IS_COVERED]"=="N")){    output="security.sii.coveredBond=false:String"};

57

CALLED_DT

CALL_DT

58

NXT_CALL_DT

s.callDate

String dateToUse = ""
if("[CALL_DT]".trim() != "" && "[CALL_DT]".trim() != "null") {
   dateToUse = "[CALL_DT]"
} else if("[NXT_CALL_DT]".trim() != "" && "[NXT_CALL_DT]".trim() != "null") {
   dateToUse = "[NXT_CALL_DT]"
}
try {
   output = new Date().parse("MM/dd/yyyy", dateToUse).format("yyyy-MM-dd")
} catch(Exception e) {
   output = ""
} 

59

MATURITY

s.maturityDate

if((!"[CALC_MATURITY]"?.trim())||("[CALC_MATURITY]"=="")||("[CALC_MATURITY]"=="null")||("[CALC_MATURITY]"=="N.A.")) {    output = ""} else {    try {        if(new Date().parse("MM/dd/yyyy","[CALC_MATURITY]").format("yyyy") > "2120") {            output = new Date().parse("MM/dd/yyyy","[CALC_MATURITY]").format("2120-MM-dd")        } else {            output = new Date().parse("MM/dd/yyyy","[CALC_MATURITY]").format("yyyy-MM-dd")        }    } catch(Exception e) {        output = ""    }}

60

ID_BB_GLOBAL

s.tradeCode