aboutsummaryrefslogtreecommitdiffstats
path: root/python/notebooks
diff options
context:
space:
mode:
Diffstat (limited to 'python/notebooks')
-rw-r--r--python/notebooks/Single Names Monitoring.ipynb45
1 files changed, 8 insertions, 37 deletions
diff --git a/python/notebooks/Single Names Monitoring.ipynb b/python/notebooks/Single Names Monitoring.ipynb
index 17e0c40d..1f5643e4 100644
--- a/python/notebooks/Single Names Monitoring.ipynb
+++ b/python/notebooks/Single Names Monitoring.ipynb
@@ -3,11 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
@@ -23,11 +19,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"w = widgets.Dropdown(\n",
@@ -42,11 +34,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"w_1 = widgets.IntSlider(value=32, min=22, max=32, description = 'Series')\n",
@@ -56,11 +44,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"value_date = (pd.datetime.today() - pd.offsets.BDay(2)).date()\n",
@@ -92,11 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"#Additions\n",
@@ -106,20 +86,15 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"date_range = pd.bdate_range(value_date - 52 * pd.offsets.Week(), value_date, freq='5B')\n",
"index = MarkitBasketIndex(index_type, series, ['5yr'])\n",
"default_prob = {}\n",
- "maturity = np.array([np.datetime64(index.maturities[0]).view('int') + 134774])\n",
"for d in date_range:\n",
" index.value_date = d\n",
- " surv_prob, tickers = index.survival_matrix(maturity)\n",
+ " surv_prob, tickers = index.survival_matrix()\n",
" default_prob[d] = pd.Series(1 - np.ravel(surv_prob), index=tickers)\n",
"default_prob = pd.concat(default_prob)"
]
@@ -127,11 +102,7 @@
{
"cell_type": "code",
"execution_count": null,
- "metadata": {
- "jupyter": {
- "source_hidden": true
- }
- },
+ "metadata": {},
"outputs": [],
"source": [
"#Top 20 highest cumulative\n",