Bloomberg Markets - 10.2019

(Nandana) #1
indemnifies the client for any euro appreciation above a specified
level (up to a ceiling amount);
A combination known as a participating forward, where
the client buys a euro call at the same strike as she sells a euro
put, which grants the right to sell. The notional of the euro put is
half the notional on the euro call, and the combination has a net
cost of zero.

SEASONED TRADERS AND salespeople often price this list a few
times each day. They can be very quick at it, but it will still take
15 minutes each time—if you’re good—and there’s always the
possibility of a clerical error.
With more and more computer-savvy graduates entering
the financial workplace, coding skills are widespread. You can
easily use an open-source computer language such as Python to
automate pricing all of these structures so you can focus on adding
value. If you’re not familiar with coding, chances are one of your
colleagues is.

THE CODE NEEDED to price the above structures is pretty basic if
you have access to Bloomberg’s extensive library of pricing func-
tions and portfolio manipulation via MARS API. Bloomberg’s
Multi-Asset Risk System (MARS) provides consistent pricing and
risk data to model every deal in your portfolio. MARS API offers
programmatic access to that pricing and risk infrastructure: Access
to it is triggered by a few lines of boilerplate code. For more info
on MARS, go to {RISK <GO>}.
Here’s a sample of how you can use Python to perform
pricing tasks.
First, let’s take a look at the code that creates a vanilla option
using function calls to the MARS API (FIG. 1). The code specifies
the deal type as a vanilla FX option, or VA.FX. The expiration and

Derivatives


Automate Your Pricing Chores With


A Bit of Python Code and the MARS API


By FRANCESCO TONIN and SAMUEL POPPER


REPETITIVE PRICING TASKS have been part of the job of sell-side
salespeople and traders for decades. In the old days, when clients
called in to request indicative prices, bank employees would
compile them by hand. Over time, computers picked up the chore
of running the numbers. The salespeople and traders would decide
what instruments the computer should price, input market
parameters, and compile long menus of indications from which
clients could choose.
Nowadays, manually feeding individual pricing requests into
computers is generally considered a bad use of time for highly
educated finance professionals, including trainees. It’s repetitive
and boring.
Consider foreign exchange, the most liquid market in the
world. Typically a client request would simply specify the currency,
whether she intends to buy or sell, and the value date for the
transactions—buy euros a week from today, for example. The
client would expect her salesperson to come back shortly with a
handful of prices for a number of structures.
The structures are usually the same. For a client looking to
buy euros and sell U.S. dollars, they would be something like this:


The forward rate for the EURUSD currency pair;
The premium of an at-the-money euro vanilla option—in
this case a call, which grants the right to buy euros at a set exchange
rate on or before expiration;
The premium of a euro call option with a 25% probability of
being exercised, referred to as a 25-delta option;
Two EURUSD spot levels, such that the client can buy at the
higher if the euro rises but has to sell at the lower if the euro falls,
with a combined cost of zero. The structure is known as a risk
reversal, or a collar;
The price of a euro call spread, an instrument that


24 INSIDE THE TERMINAL

Free download pdf