diff options
Diffstat (limited to 'python/notebooks/Tranche calculator.ipynb')
| -rw-r--r-- | python/notebooks/Tranche calculator.ipynb | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/python/notebooks/Tranche calculator.ipynb b/python/notebooks/Tranche calculator.ipynb index 394618a3..6039ef1e 100644 --- a/python/notebooks/Tranche calculator.ipynb +++ b/python/notebooks/Tranche calculator.ipynb @@ -19,31 +19,13 @@ "metadata": {}, "outputs": [], "source": [ - "def display_result(basket_index):\n", - " thetas = basket_index.tranche_thetas()\n", - " result = pd.concat([pd.DataFrame(basket_index.rho[0:4], index=thetas.index, columns=['att_corr']),\n", - " pd.DataFrame(basket_index.tranche_pvs().bond_price, index=thetas.index, columns=['price']),\n", - " basket_index.tranche_deltas(),\n", - " thetas],\n", - " axis=1)\n", - " result['net_theta'] = result.theta - new_index.theta()[0] * result.delta\n", - " return result" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ "index_type = 'HY'\n", "series = 35\n", "value_date = date.today()\n", "new_index = ManualTrancheBasket(index_type, series, \"5yr\", value_date=value_date, ref=104.625, quotes=[43, 92.5, 110, 120.27])\n", "new_index.tweak()\n", "new_index.build_skew()\n", - "result = display_result(new_index)\n", - "result " + "new_index " ] }, { @@ -72,8 +54,7 @@ "base_index.build_skew()\n", "\n", "new_index.rho = base_index.map_skew(new_index)\n", - "result = display_result(new_index)\n", - "result" + "new_index" ] }, { |
