{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "from matplotlib import pyplot as plt\n",
    "import uqer\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from uqer import DataAPI as api\n",
    "from alphamind.api import *\n",
    "from alphamind.data.neutralize import neutralize\n",
    "\n",
    "plt.style.use('ggplot')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "16937@wmcloud.com 账号登录成功\n"
     ]
    }
   ],
   "source": [
    "_ = uqer.Client(token='')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "ref_date = '2017-06-23'\n",
    "factor = 'EPS'\n",
    "\n",
    "engine = SqlEngine()\n",
    "universe = Universe('custom', ['zz800'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Algorithm Description\n",
    "--------------------------"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "猜测的 ``neutralize`` 残差$\\bar Res$计算公式：\n",
    "\n",
    "$$\\bar Res_{i,k} = \\bar f_{i,k} - \\sum_j \\beta_{j,k} \\times \\bar Ex_{i, j, k}$$\n",
    "\n",
    "其中：$k$为行业分类，$i$为该行业中第$i$只股票，$j$为第$j$个风险因子。$\\bar f$为因子序列，$\\bar Ex$为风险暴露矩阵。系数$\\beta_{j,k}$由OLS确定。\n",
    "\n",
    "下面的章节，我们分别比较三种``neutralize``的方法差别：\n",
    "\n",
    "* **UQER Neutralize**\n",
    "\n",
    "    使用优矿的SDK计算因子残差。\n",
    "\n",
    "\n",
    "* **Alpha-Mind Neutralize**\n",
    "\n",
    "    使用alpha-mind计算因子残差，alpha-mind可以由以下地址安装：\n",
    "    \n",
    "    ```\n",
    "    https://github.com/wegamekinglc/alpha-mind\n",
    "    ```\n",
    "\n",
    "* **Direct Weighted Least Square Fit Implementation**\n",
    "\n",
    "    直接使用scikit-learn的线性回归功能来计算因子残差。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Raw Data\n",
    "---------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "codes = engine.fetch_codes(ref_date, universe)\n",
    "factor_data = engine.fetch_factor(ref_date, factor, codes)\n",
    "risk_cov, risk_expousre = engine.fetch_risk_model(ref_date, codes)\n",
    "total_data = pd.merge(factor_data, risk_expousre, on=['code']).dropna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "total_data['ticker'] = total_data.code.apply(lambda x: '{0:06}'.format(x))\n",
    "total_data.set_index('ticker', inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "800"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(total_data)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# UQER Neutralize\n",
    "-----------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "128 ms ± 4.27 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
     ]
    }
   ],
   "source": [
    "%%timeit\n",
    "neutralized_factor_uqer = uqer.neutralize(total_data[factor],\n",
    "                                          target_date=ref_date.replace('-', ''),\n",
    "                                          industry_type='short')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>uqer</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>000001</th>\n",
       "      <td>-0.076975</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002</th>\n",
       "      <td>-0.288382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000006</th>\n",
       "      <td>-0.054668</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000008</th>\n",
       "      <td>-0.034123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000009</th>\n",
       "      <td>0.029815</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000012</th>\n",
       "      <td>0.089305</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000021</th>\n",
       "      <td>0.034998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000025</th>\n",
       "      <td>-0.048613</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000027</th>\n",
       "      <td>-0.003274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000028</th>\n",
       "      <td>0.347669</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            uqer\n",
       "000001 -0.076975\n",
       "000002 -0.288382\n",
       "000006 -0.054668\n",
       "000008 -0.034123\n",
       "000009  0.029815\n",
       "000012  0.089305\n",
       "000021  0.034998\n",
       "000025 -0.048613\n",
       "000027 -0.003274\n",
       "000028  0.347669"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "neutralized_factor_uqer = uqer.neutralize(total_data[factor],\n",
    "                                          target_date=ref_date.replace('-', ''),\n",
    "                                          industry_type='short')\n",
    "df = pd.DataFrame(neutralized_factor_uqer, columns=['uqer'])\n",
    "df.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "800"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(neutralized_factor_uqer)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BETA              6.017409e-14\n",
       "MOMENTUM          7.993606e-15\n",
       "SIZE             -6.938894e-14\n",
       "EARNYILD         -1.829648e-13\n",
       "RESVOL            2.109424e-13\n",
       "GROWTH           -1.021405e-13\n",
       "BTOP             -1.425526e-13\n",
       "LEVERAGE         -1.541545e-13\n",
       "LIQUIDTY          4.973799e-14\n",
       "SIZENL            5.417888e-14\n",
       "Bank             -8.770762e-15\n",
       "RealEstate       -1.076916e-14\n",
       "Health           -6.661338e-16\n",
       "Transportation    3.774758e-15\n",
       "Mining           -4.551914e-15\n",
       "NonFerMetal       9.020562e-15\n",
       "HouseApp         -4.218847e-15\n",
       "LeiService       -4.163336e-16\n",
       "MachiEquip        2.395306e-14\n",
       "BuildDeco         9.547918e-15\n",
       "CommeTrade        5.884182e-15\n",
       "CONMAT            7.188694e-15\n",
       "Auto              6.883383e-15\n",
       "Textile           4.996004e-15\n",
       "FoodBever        -6.217249e-15\n",
       "Electronics       1.132427e-14\n",
       "Computer          8.604228e-15\n",
       "LightIndus        1.346145e-15\n",
       "Utilities        -6.258882e-15\n",
       "Telecom           3.608225e-16\n",
       "AgriForest        8.160139e-15\n",
       "CHEM             -6.994405e-15\n",
       "Media             1.088019e-14\n",
       "IronSteel        -1.915135e-15\n",
       "NonBankFinan     -9.880985e-15\n",
       "ELECEQP          -5.773160e-15\n",
       "AERODEF           4.031497e-15\n",
       "Conglomerates    -5.023759e-15\n",
       "dtype: float64"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "risk_exposure_uqer = uqer.DataAPI.RMExposureDayGet(tradeDate=ref_date.replace('-', '')).set_index('ticker')\n",
    "targeted_secs = risk_exposure_uqer.loc[neutralized_factor_uqer.index]\n",
    "\n",
    "style_exposure = neutralized_factor_uqer.values @ targeted_secs[risk_styles].values\n",
    "industry_exposure = neutralized_factor_uqer.values @ targeted_secs[industry_styles].values\n",
    "\n",
    "exposure = pd.Series(np.concatenate([style_exposure, industry_exposure]), index=risk_styles+industry_styles)\n",
    "exposure"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Alpha-Mind Neutralize\n",
    "--------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = total_data[risk_styles + industry_styles].values\n",
    "y = total_data[factor].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "139 µs ± 8 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%%timeit\n",
    "neutralized_factor_alphamind = neutralize(x, y, weights=np.ones(len(y)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>uqer</th>\n",
       "      <th>alpha-mind</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>000001</th>\n",
       "      <td>-0.076975</td>\n",
       "      <td>-0.076975</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002</th>\n",
       "      <td>-0.288382</td>\n",
       "      <td>-0.288382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000006</th>\n",
       "      <td>-0.054668</td>\n",
       "      <td>-0.054668</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000008</th>\n",
       "      <td>-0.034123</td>\n",
       "      <td>-0.034123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000009</th>\n",
       "      <td>0.029815</td>\n",
       "      <td>0.029815</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            uqer  alpha-mind\n",
       "000001 -0.076975   -0.076975\n",
       "000002 -0.288382   -0.288382\n",
       "000006 -0.054668   -0.054668\n",
       "000008 -0.034123   -0.034123\n",
       "000009  0.029815    0.029815"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "neutralized_factor_alphamind = neutralize(x, y, weights=np.ones(len(y)))\n",
    "alphamind_series = pd.Series(neutralized_factor_alphamind.flatten(), index=total_data.index)\n",
    "df['alpha-mind'] = alphamind_series\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "800"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(alphamind_series)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# The Ticker Missing in UQER but Still in Alpha-Mind\n",
    "-----------------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "missed_codes = [c for c in alphamind_series.index if c not in neutralized_factor_uqer.index]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>isOpen</th>\n",
       "      <th>EPS</th>\n",
       "      <th>srisk</th>\n",
       "      <th>BETA</th>\n",
       "      <th>MOMENTUM</th>\n",
       "      <th>SIZE</th>\n",
       "      <th>EARNYILD</th>\n",
       "      <th>RESVOL</th>\n",
       "      <th>GROWTH</th>\n",
       "      <th>...</th>\n",
       "      <th>Telecom</th>\n",
       "      <th>AgriForest</th>\n",
       "      <th>CHEM</th>\n",
       "      <th>Media</th>\n",
       "      <th>IronSteel</th>\n",
       "      <th>NonBankFinan</th>\n",
       "      <th>ELECEQP</th>\n",
       "      <th>AERODEF</th>\n",
       "      <th>Conglomerates</th>\n",
       "      <th>COUNTRY</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ticker</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 43 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [code, isOpen, EPS, srisk, BETA, MOMENTUM, SIZE, EARNYILD, RESVOL, GROWTH, BTOP, LEVERAGE, LIQUIDTY, SIZENL, Bank, RealEstate, Health, Transportation, Mining, NonFerMetal, HouseApp, LeiService, MachiEquip, BuildDeco, CommeTrade, CONMAT, Auto, Textile, FoodBever, Electronics, Computer, LightIndus, Utilities, Telecom, AgriForest, CHEM, Media, IronSteel, NonBankFinan, ELECEQP, AERODEF, Conglomerates, COUNTRY]\n",
       "Index: []\n",
       "\n",
       "[0 rows x 43 columns]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "total_data.loc[missed_codes]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Direct Weighted Least Square Fit Implementation\n",
    "------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "import statsmodels.api as sm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "mod = sm.WLS(y, x, weights=np.ones(len(y))).fit()\n",
    "lg_series = pd.Series(mod.resid, index=total_data.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['ols'] = lg_series"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Comparison\n",
    "------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['uqer - ols'] = df['uqer'] - df['ols']\n",
    "df['alphamind - ols'] = df['alpha-mind'] - df['ols']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1fcc2856978>"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 14968 characters]\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1fcc28465c0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df[['uqer - ols', 'alphamind - ols']].plot(figsize=(14, 7), ylim=(-1e-4, 1e-4))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>uqer</th>\n",
       "      <th>alpha-mind</th>\n",
       "      <th>ols</th>\n",
       "      <th>uqer - ols</th>\n",
       "      <th>alphamind - ols</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>000001</th>\n",
       "      <td>-0.076975</td>\n",
       "      <td>-0.076975</td>\n",
       "      <td>-0.076975</td>\n",
       "      <td>-1.609823e-15</td>\n",
       "      <td>-1.165734e-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002</th>\n",
       "      <td>-0.288382</td>\n",
       "      <td>-0.288382</td>\n",
       "      <td>-0.288382</td>\n",
       "      <td>3.885781e-16</td>\n",
       "      <td>-2.220446e-16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000006</th>\n",
       "      <td>-0.054668</td>\n",
       "      <td>-0.054668</td>\n",
       "      <td>-0.054668</td>\n",
       "      <td>8.881784e-16</td>\n",
       "      <td>6.106227e-16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000008</th>\n",
       "      <td>-0.034123</td>\n",
       "      <td>-0.034123</td>\n",
       "      <td>-0.034123</td>\n",
       "      <td>-5.204170e-16</td>\n",
       "      <td>-7.910339e-16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000009</th>\n",
       "      <td>0.029815</td>\n",
       "      <td>0.029815</td>\n",
       "      <td>0.029815</td>\n",
       "      <td>-2.567391e-16</td>\n",
       "      <td>2.775558e-16</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            uqer  alpha-mind       ols    uqer - ols  alphamind - ols\n",
       "000001 -0.076975   -0.076975 -0.076975 -1.609823e-15    -1.165734e-15\n",
       "000002 -0.288382   -0.288382 -0.288382  3.885781e-16    -2.220446e-16\n",
       "000006 -0.054668   -0.054668 -0.054668  8.881784e-16     6.106227e-16\n",
       "000008 -0.034123   -0.034123 -0.034123 -5.204170e-16    -7.910339e-16\n",
       "000009  0.029815    0.029815  0.029815 -2.567391e-16     2.775558e-16"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "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.6.4"
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
