Welcome to the main page for the Disent client library. Currently supports Python3.8.x+. Docs presume familiarly with basic python, pandas, numpy , and derivatives. πŸ€“&πŸ€‘.

1 Quick-start

Available on PyPi (link) via pip.

(venv) $ pip install disentpy
>>> import disent
>>> disent.example()
Downloaded........ 134.0 KiB done.
      TCK   MNY        YRS        IV    T                   DT
0    AAPL  0.00   0.079452  0.791190   1M  2022-07-11T00:00:00
1    AAPL  0.00   0.164384  0.740517   2M  2022-08-11T00:00:00
..    ...   ...        ...       ...  ...                  ...
718  AAPL  2.95   7.002740  0.303335   7Y  2029-06-11T00:00:00
719  AAPL  2.95  10.005479  0.303335  10Y  2032-06-11T00:00:00

[720 rows x 6 columns]

When using disent.example() you’ll get a pandas.DataFrame showing a modeled equity volatility surface derived from public domain AAPL options chains. This is a wrapper on disent.hub().

First time users will prompted for a security key:

>>> disent.example()
Key not found. See docs.

Do you have a permanent key (1) or would like you to request a temporary key (2):

See section on keys

2 Tutorials

The following walkthroughs will give users a flavor of Disent’s API capabilities and built in analytics.

2.1 Market Data Retrieval

Use case β€œI’m a technologist at an asset manager, how can I pull modeled data out of Disent?”

https://mybinder.org/badge_logo.svg

When using disent.hub() you’ll get a pandas.DataFrame:

>>> model="DEMO_EQD_VOLS"
>>> ticker = 'AAPL'
>>> model_args = {'ticker':ticker}
>>> df = disent.hub(model,model_args)
>>> df

TCK

MNY

YRS

IV

T

DT

AAPL

0.00

0.079452

0.791190

1M

2022-07-11T00:00:00

AAPL

0.00

0.164384

0.740517

2M

2022-08-11T00:00:00

…

…

…

…

…

…

AAPL

2.95

7.002740

0.303335

7Y

2029-06-11T00:00:00

AAPL

2.95

10.005479

0.303335

10Y

2032-06-11T00:00:00

Note

Various configurations and settings are available for enterprise subscribers. Below is describing the specifics of the DEMO_EQD_VOLS default model.

Descriptive columns

  • \(\text{TCK}s\) are the option contract root symbols using standard exchange root codes (OCC) root symbols.

  • \(\text{MNY}s\) are defined as \(f(S,K) = \displaystyle\frac{K}{S}\) bucketed into a pre-defined moneyness scale.

  • \(\text{T}s\) are rolling contract maturities, i.e. durations/tenors/time periods (akin to datetime.timedelta), bucketed into a classic tenor scale:

1M

3M

6M

1Y

5Y

10Y

Across the Disent platform rolling tenors include two helpers:

  • \(\text{DT}s\) are expressed as ISO8601 strings as \(\text{ACT}\) days from today (\(t_0\)). Use pandas.to_datetime() for conversion. \(\text{ACT}\) is \([t_0+T]\).

  • \(\text{YRS}s\) are the year fractions from today and \(\text{DT}\) using \(\text{ACT/365 Fixed}\) convention.

Evaluated columns

3d Volatility Surface

Professional subscribers can access the advanced features here (click here).

2.2 Portfolio Valuation

Use case β€œI manage a book at a fund, how can I load my book into Disent and get an on-the-fly full revaluation?”

(todo) Coming soon

2.3 Model integration

Use case β€œI’m a PhD researcher, I have a proprietary model for my firm written in C++, I would like to integrate it to Disent so that it can be coupled with our market/static data and deployed to my users.”

(todo) Coming soon

2.4 Scenario Analysis

Use case β€œI’m a trader executing a risk-neutral strategy, I need to simulate the P&L on my book based on what-if scenarios in the spot price of a variety of assets. I’ll use the results as part of planning my hedging.””

(todo) Coming soon

2.5 Price an Exotic

Use case β€œI’m on the phone with a client/dealer and we’re going back and forth on the price of a basket option. I want to pay around with the pricing parameters to try and see where a good level to close may be.”

(todo) Coming soon

2.6 Back-test a Strategy

Use case β€œI’m in sales and a new client is asking for a specific type of enhanced yield. I want to impress, so let’s search out a strategy that makes money 99% of the time.”

(todo) Coming soon

3 Auth and Envs

This section details how to request keys for application authentication as well as facilities for selecting which environments data is coming from (local/dev/prod, etc..).

3.1 Authentication keys

  • Public users can generate generate keys to run the tutorials by entering their email address. We value your feedback!!!! Email us publickey@disent.com.

  • Professional subscribers see private documentation, call your rep, or just email us support@disent.com.

3.2 Environment selection

  • public (default)

3.2.1 List current environment

>>> disent.env.get()
public

3.2.2 Change (set) environment

>>> disent.set.set('prod')
public --> prod

4 API Reference

(todo) Coming soon