Skip to content
All library documents

Bloomberg DLIB Access and Option Strike Valuation Workflows

Article Quant Q&A · Author: QChen

Summary

The document discusses whether Bloomberg’s DLIB BLAN functionality can be accessed from Python for option pricing and strike-solving work. The answer describes DLIB as proprietary and says access through an API requires the premium MARS API service; standard BLPAPI does not provide DTK access to DLIB. It also notes that DLIB uses Monte Carlo runs and has more request parameters than ordinary BLPAPI.

For an iterative strike and expiry valuation workflow, the answer suggests using overrides on a saved OVME deal through Bloomberg formulas, if the user has the necessary permissions. It presents this as a potentially simpler and faster approach than implementing a DLIB-based solution, while cautioning that access and override eligibility depend on the user’s setup. The response questions whether DLIB itself supplies a solver and recommends confirming product-specific capabilities with Bloomberg support. The workflow is vendor-specific, and its claims are advice rather than a comparative benchmark.

Key ideas

  • Standard BLPAPI does not expose DTK access to DLIB; the answer identifies MARS API as a premium route.
  • The response describes DLIB BLAN as a Monte Carlo-based proprietary interface with extensive parameters.
  • For iterative option valuations, saved OVME deals with strike and expiry overrides may provide an alternative workflow.
  • Override access and suitability depend on product and user entitlements, so the proposed approach requires Bloomberg-specific confirmation.

Tags

Full text
# Bloomberg DLIB BLAN in Python


# Bloomberg DLIB BLAN in Python












The title describes the question. Below provides more details. Kindly let me know how industry is working on this.

I am a heavy user of Bloomberg excel API, including WAPI and DTK (formula such as bstructure and bprice). Recently I am working on backtesting that relies on a strike solver. (OVME strike solver feature is not available through WAPI so I have to write a solver in python) This recursion process that pulls option prices (through DTK) is easier to be done in python than excel.

Given that, anyone has used DTK/DLIB BLAN in python before? Does Bloomberg provide API to DLIB BLAN? If yes, is it through Bloomberg BLPAPI package (and we need to write a wrapper)?

Appreciate your comments.

## Answer by AKdemy (score 2)

https://quant.stackexchange.com/a/70851

That is a classic F1 F1 question. It's proprietary software and BBG offers a dedicated help desk.

DTK is not available for free via BLPAPI. Connecting DLIB to an API requires a premium service called Mars API (which will work via DAPI, but also BPIPE and the like, depending on your needs). I suggest you reach out to your sales rep and ask him / her about this feature if you are willing to pay (this service is quite expensive as it is an enterprise solution).

You can have a look at some code snippets if you search for `DOCS MARS API` on the terminal. `DOCS 2097583` is for MARS API in general (architecture, delivery channels, ...)

MARS API leverages the same libraries when setting elements and making requests as BLPAPI, just that DLIB (BLAN) has a LOT more handle parameters and overrides compared to standard BLPAPI. `DOCS 2096689` is for MARS API with DLIB specifically.

When you say you need a strike solver, for what products exactly? I find it hard to believe BLAN will help you here, because hand written BLAN has no solver capabilities as much as I know. Also pulling option prices with BLAN will be substantially simpler with DTK (it is already a wrapper) because there are no available wrappers for Mars API (it is not widely available like the standard BLAPI desktop requests that are "free" for every BBG user).

I am not sure about OVME but the infrastructure should be similar to OVML. For OVML, you can request an override for strike and expiry date (I think your eligibility to use this and potential costs depend on some criteria, but F1 F1 or your sales rep should be able to help with that too). Aftwards, you can use any saved deal, change expiry and strike as you wish, and iterate that way to a desired option value. This will not only be easier to implement but also substantually faster and more reliable compared to DLIB which relies on Monte Carlo runs. Below is an example (bear in mind, it WILL NOT work if you do not have the override priviledge granted).

The field for expiry date is called OP002 – OPT_EXPIRE_DT.

Edit DLIB BLAN is essentially OCAML. You can use while loops.

```
let sum = ref 0; 
let cnt = ref 1; 
while !cnt <= 10 do 
  let i = !cnt; 
  sum := !sum + i; 
  cnt := i + 1; 
done; 
!sum
```

Should work for example.

BLPAPI has a very detailed documentation on WAPI. However, I reiterate that you could simply use the OV override instead of DLIB. It also works directly with existing BLAPI wrappers on the web (it is a simple BDP formula with overrides). All you need is a dummy ticker (saved OV deal) for each underlying and product (call, digital etc). Afterwards you can override dates and strike to retrieve the corresponding value. For example like this.

```
=BDP("Ticker","OPT_THEOR_VALUE", "OPT_STRIKE_PX=3930.0800", "OPT_VALUATION_DT=20220520", "OPT_EXPIRE_DT=20220811")
```

where Ticker refers to either "OVME_ID Index" or "OVME_ID Equity". You can refresh whenever you tell the API. It is miles faster than an equivalent BLAN solution (and almost surely more accurate too).

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.