Python for Finance: Analyze Big Financial Data

(Elle) #1

American Options on the VSTOXX


A major prerequisite for valuing and managing options not traded at exchanges is a


calibrated model that is as consistent as possible with market realities — i.e., quotes for


liquidly traded options in the relevant market. This is what the previous section has as the


main result. This main result is used in this section to value American put options on the


VSTOXX, a kind of derivative instrument not traded in the market. We assume a portfolio


consisting of American put options with the same maturity and strikes as the European


call options used for the model calibration.


Modeling Option Positions


The first step when valuing a derivatives portfolio with the DX analytics library is to define


the relevant risk factors by a market_environment object. At this stage, it does not


necessarily have to be complete; missing data and objects might be added during the


portfolio valuation (e.g., paths or frequency):


In  [ 55 ]: me_vstoxx   =   market_environment(‘me_vstoxx’, pricing_date)
me_vstoxx.add_constant(‘initial_value’, initial_value)
me_vstoxx.add_constant(‘final_date’, pricing_date)
me_vstoxx.add_constant(‘currency’, ‘NONE’)

Of course, we use the optimal parameters from the model calibration:


In  [ 56 ]: #   adding  optimal parameters  to  environment
me_vstoxx.add_constant(‘kappa’, opt_local[ 0 ])
me_vstoxx.add_constant(‘theta’, opt_local[ 1 ])
me_vstoxx.add_constant(‘volatility’, opt_local[ 2 ])

In a portfolio context, the specification of a simulation class/model is necessary:


In  [ 57 ]: me_vstoxx.add_constant(‘model’, ‘srd’)

To define the valuation classes for the American put options, we are mainly missing an


appropriate payoff function:


In  [ 58 ]: payoff_func =   ‘np.maximum(strike  -   instrument_values,  0)’

As before, all American options differ only with respect to their strike prices. It therefore


makes sense to define a shared market_environment object first:


In  [ 59 ]: shared  =   market_environment(‘share’, pricing_date)
shared.add_constant(‘maturity’, maturity)
shared.add_constant(‘currency’, ‘EUR’)

It remains to loop over all relevant options, pick the relevant strike, and define one


derivatives_position after the other, using the defining market_environment object:


In  [ 60 ]: option_positions    =   {}
# dictionary for option positions
option_environments = {}
# dictionary for option environments
for option in option_selection.index:
option_environments[option] = \
market_environment(‘am_put_%d’ % option, pricing_date)
# define new option environment, one for each option
strike = option_selection[‘STRIKE’].ix[option]
# pick the relevant strike
option_environments[option].add_constant(‘strike’, strike)
# add it to the environment
option_environments[option].add_environment(shared)
# add the shared data
option_positions[‘am_put_%d’ % strike] = \
derivatives_position(
‘am_put_%d’ % strike,
Free download pdf