aboutsummaryrefslogtreecommitdiffstats
path: root/python/notebooks/Venice.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'python/notebooks/Venice.ipynb')
-rw-r--r--python/notebooks/Venice.ipynb107
1 files changed, 107 insertions, 0 deletions
diff --git a/python/notebooks/Venice.ipynb b/python/notebooks/Venice.ipynb
new file mode 100644
index 00000000..fd69edd9
--- /dev/null
+++ b/python/notebooks/Venice.ipynb
@@ -0,0 +1,107 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from analytics.tranche_basket import DualCorrTranche, TrancheBasket"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "ig29 = TrancheBasket(\"IG\", 29, \"5yr\")\n",
+ "ig29.tweak()\n",
+ "ig29.build_skew()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "bs3 = DualCorrTranche(\"BS\", 3, \"2yr\", attach=5, detach=7, corr_attach=0.4, corr_detach=0.42, tranche_running=100)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "bs3.singlename_spreads()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "bs3.mark(skew=ig29.skew)\n",
+ "bs3.rho"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "bs3.spread"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "jtd = bs3.jump_to_default(ig29.skew)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "jtd.sort_values()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.7.2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}