Skip to main content

Bloomberg listed options updates

This mapping is used for Security type Listed Options (OPTION).

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 & update.bloomberg.O are applied depending on Security type.

The Option Greeks are based on Bloomberg BEST price methodology.

Mapping

Mapping name: update.bloomberg.O 

Updated fields

  • Market data

    • Close price

    • Delta

  • Key figures

    • Gamma

    • Theta

    • Vega

    • Rho

    • Implied volatility (BEST)

    • Implied volatility bid

    • Implied volatility ask

Mapping table

Row

Source field

Value mapping

FA field

Script

1

TICKER

s.securityCode

2

TODAY_DT

DT

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

3

pr.marketDate

output="[DT]"
;

4

ID_BB_GLOBAL

pr.updateCode

5

DELTA

pr.delta

6

pr.n

output=services.configurationService.loadUserPreference("sharedConfigs", "feed_feedBloomberg_closeField", true)

7

PX_LAST

pr.close

8

GAMMA

gamma

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "GAMMA"
def value = "[GAMMA]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

9

VEGA

vega

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "VEGA"
def value = "[VEGA]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

10

OPT_THETA

theta

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "THETA"
def value = "[OPT_THETA]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

11

RHO

rho

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "RHO"
def value = "[RHO]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

12

IVOL

ivol

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "IVOL"
def value = "[IVOL]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

13

IVOL_BID

ivol_bid

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "IVOL_BID"
def value = "[IVOL_BID]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

14

IVOL_ASK

ivol_ask

import com.fasolutions2.mod.repository.KeyFigureRepository
output = ""
def s = services.securityService.loadSecurityBySecurityCode("[s.securityCode]")
def valueDate = "[DT]"
def figureCode = "IVOL_ASK"
def value = "[IVOL_ASK]"
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)) {
output = ":"+figureCode+"="+valueDate+"="+value
}
}

15

 

s.keyFigures

output="***[gamma][vega][theta][rho][ivol][ivol_bid][ivol_ask]"
;

16

ID_BB_GLOBAL

s.tradeCode