Skip to main content

Python library for pricing autocallables

Project description

exotx

exotx allows you to easily price exotic options with a couple of lines of Python code.

It is based on QuantLib, the open-source library for quantitative finance.

Usage

Define the product

import exotx

notional = 100
strike = 100.0
autocall_barrier_level = 1.0  # 100%
annual_coupon_value = 0.03  # 3.00%
coupon_barrier_level = 0.75  # 75%
protection_barrier_level = 0.75  # 75%

my_autocallable = exotx.Autocallable(notional, strike, autocall_barrier_level, annual_coupon_value, coupon_barrier_level, protection_barrier_level)

Define the static data

The object that represents static data such as the calendar, the day counter or the business day convention used.

my_static_data = exotx.StaticData()

Define the market data

reference_date = '2015-11-06'
spot = 100.0
risk_free_rate = 0.01
dividend_rate = 0.0
black_scholes_volatility = 0.2

my_market_data = exotx.MarketData(reference_date, spot, risk_free_rate, dividend_rate, black_scholes_volatility=black_scholes_volatility)

Price the product

my_autocallable.price(my_market_data, my_static_data, model='black-scholes')
96.08517973497098

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exotx-0.5.4.tar.gz (15.6 kB view hashes)

Uploaded Source

Built Distribution

exotx-0.5.4-py3-none-any.whl (22.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page