Skip to main content

Morningstar collective investment vehicles and exchange-traded funds updates

This mapping is used for Security types Collective investment vehicles (FUND) and Exchange-traded funds (ETFs) (FUND).

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

Specific configuration

To utilize the update fully, the following Asset classes and types should be installed from Appstore.

  • Geographical allocation (M49)

  • Morningstar Asset Allocation

  • Currency exposure

Mapping

Mapping name: update.morningstar.C

Updated fields

  • Security code

  • ISIN code

  • Name

  • Currency

  • Trade code

  • Management Fee Percentage

  • Key figures

    • Morningstar rating

    • Performance gridpoints

    • SRRI & SRRI calculated

  • Allocations

    • Geographical allocation (M49) [Holdings based]

    • Morningstar Asset Allocation [Holdings based]

    • Currency exposure [Fund Currency]

    • Morningstar Global Category [Fund Category]

Mapping table

Row

Source field

FA field

Script

1

s.isinCode

outout="***"

2

BI-ISIN

s.isinCode

3

BI-MStarID

s.tradeCode

4

BI-FundName

s.name

5

BI-CurrencyId

s.currency

output='[BI-CurrencyId]'.substring(7);

6

RATING-RatingOverall

RATING

if(!"[RATING-RatingOverall]"?.trim())
{
output="[RATING-RatingOverall]".toInteger()
}
else
{
output=0
}

7

RATING-RatingDate

RATINGDATE

8

ALLOC1-PortfolioDate

PTFDATE1

9

ALLOC2-CountryExposure

Exposure

if(services.configurationService.findGroupByCode('M49'))
{
output = ""
def countries = ["Supranational":"991","Laos":"418","Afghanistan":"004","Albania":"008","Algeria":"012","American Samoa":"016","Andorra":"020","Angola":"024","Anguilla":"660","Antarctica":"010","Antigua and Barbuda":"028","Argentina":"032","Armenia":"051","Aruba":"533","Australia":"036","Austria":"040","Azerbaijan":"031","Bahamas":"044","Bahrain":"048","Bangladesh":"050","Barbados":"052","Belarus":"112","Belgium":"056","Belize":"084","Benin":"204","Bermuda":"060","Bhutan":"064","Bolivia":"068","Bolivia":"068","Bosnia and Herzegovina":"070","Botswana":"072","Bouvet Island":"074","Brazil":"076","British Indian Ocean Territory":"086","Brunei Darussalam":"096","Brunei":"096","Bulgaria":"100","Burkina Faso":"854","Burundi":"108","Cambodia":"116","Cameroon":"120","Canada":"124","Cape Verde":"132","Cayman Islands":"136","Central African Republic":"140","Chad":"148","Chile":"152","China":"156","Christmas Island":"162","Cocos (Keeling) Islands":"166","Colombia":"170","Comoros":"174","Congo":"178","Congo":"180","Cook Islands":"184","Costa Rica":"188","Côte d'Ivoire":"384","Ivory Coast":"384","Croatia":"191","Cuba":"192","Cyprus":"196","Czech Republic":"203","Denmark":"208","Djibouti":"262","Dominica":"212","Dominican Republic":"214","Ecuador":"218","Egypt":"818","El Salvador":"222","Equatorial Guinea":"226","Eritrea":"232","Estonia":"233","Ethiopia":"231","Falkland Islands (Malvinas)":"238","Faroe Islands":"234","Fiji":"242","Finland":"246","France":"250","French Guiana":"254","French Polynesia":"258","French Southern Territories":"260","Gabon":"266","Gambia":"270","Georgia":"268","Germany":"276","Ghana":"288","Gibraltar":"292","Greece":"300","Greenland":"304","Grenada":"308","Guadeloupe":"312","Guam":"316","Guatemala":"320","Guernsey":"831","Guinea":"324","Guinea-Bissau":"624","Guyana":"328","Haiti":"332","Heard Island and McDonald Islands":"334","Holy See (Vatican City State)":"336","Honduras":"340","Hong Kong":"344","Hungary":"348","Iceland":"352","India":"356","Indonesia":"360","Iran":"364","Iraq":"368","Ireland":"372","Isle of Man":"833","Israel":"376","Italy":"380","Jamaica":"388","Japan":"392","Jersey":"832","Jordan":"400","Kazakhstan":"398","Kenya":"404","Kiribati":"296","Korea":"408","Korea":"410","South Korea":"410","Kuwait":"414","Kyrgyzstan":"417","Lao People's Democratic Republic":"418","Latvia":"428","Lebanon":"422","Lesotho":"426","Liberia":"430","Libyan Arab Jamahiriya":"434","Libya":"434","Liechtenstein":"438","Lithuania":"440","Luxembourg":"442","Macao":"446","Macedonia":"807","Madagascar":"450","Malawi":"454","Malaysia":"458","Maldives":"462","Mali":"466","Malta":"470","Marshall Islands":"584","Martinique":"474","Mauritania":"478","Mauritius":"480","Mayotte":"175","Mexico":"484","Micronesia":"583","Moldova":"498","Monaco":"492","Mongolia":"496","Montenegro":"499","Montserrat":"500","Morocco":"504","Mozambique":"508","Myanmar":"104","Burma":"104","Namibia":"516","Nauru":"520","Nepal":"524","Netherlands":"528","Netherlands Antilles":"530","New Caledonia":"540","New Zealand":"554","Nicaragua":"558","Niger":"562","Nigeria":"566","Niue":"570","Norfolk Island":"574","Northern Mariana Islands":"580","Norway":"578","Oman":"512","Pakistan":"586","Palau":"585","Palestinian Territory":"275","Panama":"591","Papua New Guinea":"598","Paraguay":"600","Peru":"604","Philippines":"608","Pitcairn":"612","Poland":"616","Portugal":"620","Puerto Rico":"630","Qatar":"634","Réunion":"638","Romania":"642","Russian Federation":"643","Russia":"643","Rwanda":"646","Saint Helena":"654","Saint Kitts and Nevis":"659","Saint Lucia":"662","Saint Pierre and Miquelon":"666","Saint Vincent and the Grenadines":"670","Saint Vincent & the Grenadines":"670","St. Vincent and the Grenadines":"670","Samoa":"882","San Marino":"674","Sao Tome and Principe":"678","Saudi Arabia":"682","Senegal":"686","Serbia":"688","Seychelles":"690","Sierra Leone":"694","Singapore":"702","Slovakia":"703","Slovenia":"705","Solomon Islands":"090","Somalia":"706","South Africa":"710","South Georgia and the South Sandwich Islands":"239","Spain":"724","Sri Lanka":"144","Sudan":"736","Suriname":"740","Svalbard and Jan Mayen":"744","Swaziland":"748","Sweden":"752","Switzerland":"756","Syrian Arab Republic":"760","Taiwan":"158","Tajikistan":"762","Tanzania":"834","Thailand":"764","Timor-Leste":"626","Togo":"768","Tokelau":"772","Tonga":"776","Trinidad and Tobago":"780","Trinidad & Tobago":"780","Tunisia":"788","Turkey":"792","Turkmenistan":"795","Turks and Caicos Islands":"796","Tuvalu":"798","Uganda":"800","Ukraine":"804","United Arab Emirates":"784","United Kingdom":"826","United States":"840","United States Minor Outlying Islands":"581","Uruguay":"858","Uzbekistan":"860","Vanuatu":"548","Venezuela":"862","Vietnam":"704","British Virgin Islands":"092","British Virgin Islands":"850","Wallis and Futuna":"876","Yemen":"887","Zambia":"894","Zimbabwe":"716"]
String groupCode = "M49"
def dt = "[PTFDATE1]"
String exposure = "[ALLOC2-CountryExposure]"
exposure = exposure.substring(0, exposure.length() - 1)
exposure = exposure.substring(1, exposure.length())
def exposureList = exposure.split(",")
def outputList = []
double residual = 100d
exposureList.eachWithIndex{ it, index ->
Double share = (it.split(":")[1].trim()).toDouble().round(6)
residual -= share
if(index == exposureList.size()-1) share += residual
share = share.round(6)
outputList << groupCode + ":" + dt + ":" + countries.get(it.split(":")[0].trim()) + "=" + share.toString()
}
output=','+outputList.join(",")
}
else
{
output=''
}
;

10

PERF-Return1Mth

PERF1MO

11

PERF-Return3Mth

PERF3MO

12

PERF-Return6Mth

PERF6MO

13

PERF-Return1Yr

PERF1Y

14

PERF-Return2Yr

PERF2Y

15

PERF-Return5Yr

PERF5Y

16

PERF-ReturnYTD

PERFYTD

17

ALLOC1-StockNet

StockNet

18

ALLOC1-BondNet

BondNet

19

ALLOC1-ConvertibleNet

ConvertibleNet

20

ALLOC1-CashNet

CashNet

21

OtherNet

output = (100.0-"[StockNet]".toDouble()-"[BondNet]".toDouble()-"[ConvertibleNet]".toDouble()-"[CashNet]".toDouble()).round(6)

22

MS_ASSETS1

if("[ALLOC1-StockNet]".toDouble() != 0.0d)
{
output=',MS_ASSETS:[ALLOC1-PortfolioDate]:StockNet=[ALLOC1-StockNet]'
}
else
{
output=''
}

23

MS_ASSETS2

if("[ALLOC1-BondNet]".toDouble() != 0.0d)
{
output='[MS_ASSETS1],MS_ASSETS:[ALLOC1-PortfolioDate]:BondNet=[ALLOC1-BondNet]'
}
else
{
output='[MS_ASSETS1]'
}

24

MS_ASSETS3

if("[ALLOC1-ConvertibleNet]".toDouble() != 0.0d)
{
output='[MS_ASSETS2],MS_ASSETS:[ALLOC1-PortfolioDate]:ConvertibleNet=[ALLOC1-ConvertibleNet]'
}
else
{
output='[MS_ASSETS2]'
}

25

MS_ASSETS4

if("[ALLOC1-CashNet]".toDouble() != 0.0d)
{
output='[MS_ASSETS3],MS_ASSETS:[ALLOC1-PortfolioDate]:CashNet=[ALLOC1-CashNet]'
}
else
{
output='[MS_ASSETS3]'
}

26

MS_ASSETS

if("[OtherNet]".toDouble() != 0.0d)
{
output='[MS_ASSETS4],MS_ASSETS:[ALLOC1-PortfolioDate]:OtherNet=[OtherNet]'
}
else
{
output='[MS_ASSETS4]'
}

27

CURR

output = ""
if((!"[s.currency]"?.trim())||("[s.currency]"=='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 == "[s.currency]"){
allocationsChanged = false
} else if(allocs && allocs.size() == 1 && allocs.get(0).sector.code != "[s.currency]"){
// 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 +":"+"[s.currency]"+"=100"
}
}
;

28

BI-GlobalCategoryId

GCID

output = '[BI-GlobalCategoryId]'.toString()
;

29

MGC2021

output = ""
if((!'[BI-GlobalCategoryId]'.toString()?.trim())||('[BI-GlobalCategoryId]'.toString()=='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(), "MGC2021")
if(allocs && allocs.size() == 1 && allocs.get(0).sector.code == '[BI-GlobalCategoryId]'.toString()){
allocationsChanged = false
} else if(allocs && allocs.size() == 1 && allocs.get(0).sector.code != '[BI-GlobalCategoryId]'.toString()){
// 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("MGC2021") && allocationsChanged){
output = ",MGC2021:"+ allocationDate +":"+'[BI-GlobalCategoryId]'.toString()+"=100"
}
}
;

30

s.allocations

if(services.configurationService.findGroupByCode('MS_ASSETS')) {
output = '***[MS_ASSETS][Exposure][CURR][MGC2021]';
} else {
output = '***[Exposure]';
}

31

BI-Ticker

TIC

32

MSR

if(!"[RATING-RatingOverall]"?.trim())
{
output=":MSR=[RATINGDATE]=[RATING]"
}
else
{
output=""
}
;

33

PERF-MonthEndDate

MonthEndDate

34

PERF

if(("[PERF1MO]"!=""))
{
perf="PERF1MO=[MonthEndDate]=[PERF1MO]"
}
else
{
perf=""
}
;
if(("[PERF3MO]"!=""))
{
perf=perf+":PERF3MO=[MonthEndDate]=[PERF3MO]"
}
;
if(("[PERF6MO]"!=""))
{
perf=perf+":PERF6MO=[MonthEndDate]=[PERF6MO]"
}
;
if(("[PERF1Y]"!=""))
{
perf=perf+":PERF1Y=[MonthEndDate]=[PERF1Y]"
}
;
if(("[PERF2Y]"!=""))
{
perf=perf+":PERF2Y=[MonthEndDate]=[PERF2Y]"
}
;
if(("[PERF5Y]"!=""))
{
perf=perf+":PERF5Y=[MonthEndDate]=[PERF5Y]"
}
;
if(("[PERFYTD]"!=""))
{
output=':'+perf+":PERFYTD=[MonthEndDate]=[PERFYTD]"
}
;

35

FEES-ActualManagementFee

s.managementFeePercentage

36

KIIDSRRI

output='null'         
;

37

BI-KIIDSRRI

KIIDSRRI

38

BI-KIIDSRRIDate

KIIDSRRIDate

39

KIIDCalculatedSRRIValue

output='null'
;

40

BI-KIIDCalculatedSRRIValue

KIIDCalculatedSRRIValue

41

BI-KIIDCalculatedSRRIDate

KIIDCalculatedSRRIDate

42

SRRIKF

if("[KIIDSRRI]"=='null')
{
output=""
}
else
{
output=":SRRI=[KIIDSRRIDate]=[KIIDSRRI]"
}
;

43

SRRICALCKF

if("[KIIDCalculatedSRRIValue]"=='null')
{
output=""
}
else
{
output=":SRRIcalc=[KIIDCalculatedSRRIDate]=[KIIDCalculatedSRRIValue]"
}
;

44

s.keyFigures

output="***[MSR][PERF][SRRIKF][SRRICALCKF]"
;