"E:\\workarea\\software\\conda3\\lib\\site-packages\\h5py\\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n"
]
}
],
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
...
...
@@ -52,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -117,7 +108,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -148,7 +139,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -179,7 +170,7 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -226,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -236,7 +227,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -246,32 +237,9 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"E:\\workarea\\software\\conda3\\lib\\site-packages\\alpha_mind-0.2.0-py3.6-win-amd64.egg\\alphamind\\data\\transformer.py:76: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
" dropna=False)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Optimization finished ......\n",
"Training cost = 0.012139828875660896, W = [[ 0.9230019 ]\n",
" [-0.39638188]\n",
" [ 0.4401099 ]\n",
" [ 0.01593331]], b = -0.03707847744226456\n",
"\n",
"Sklearn Regression Testing IC: 0.5464\n",
"Tensorflow Regression Testing IC: 0.6427\n"
]
}
],
"outputs": [],
"source": [
"regression_composer_sk.train(ref_date)\n",
"regression_composer_tf.train(ref_date)\n",
...
...
@@ -303,26 +271,9 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2018-08-09 11:13:07,623 - ALPHA_MIND - INFO - Starting data package fetching ...\n",
"E:\\workarea\\software\\conda3\\lib\\site-packages\\alpha_mind-0.2.0-py3.6-win-amd64.egg\\alphamind\\data\\transformer.py:76: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
" dropna=False)\n",
"2018-08-09 11:13:08,138 - ALPHA_MIND - INFO - factor data loading finished\n",
"2018-08-09 11:13:57,280 - ALPHA_MIND - INFO - fit target data loading finished\n",
"2018-08-09 11:13:58,303 - ALPHA_MIND - INFO - industry data loading finished\n",
"2018-08-09 11:13:58,486 - ALPHA_MIND - INFO - benchmark data loading finished\n",
"2018-08-09 11:13:59,791 - ALPHA_MIND - INFO - data merging finished\n",
"2018-08-09 11:13:59,862 - ALPHA_MIND - INFO - Loading data is finished\n",
"2018-08-09 11:13:59,885 - ALPHA_MIND - INFO - Data processing is finished\n"
]
}
],
"outputs": [],
"source": [
"start_date = '2011-01-01'\n",
"end_date = '2012-01-01'\n",
...
...
@@ -359,28 +310,9 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2018-08-09 11:26:33,244 - ALPHA_MIND - INFO - 2011-01-04 full re-balance: 799\n",
"E:\\workarea\\software\\conda3\\lib\\site-packages\\alpha_mind-0.2.0-py3.6-win-amd64.egg\\alphamind\\data\\transformer.py:76: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
" dropna=False)\n",
"2018-08-09 11:26:37,099 - ALPHA_MIND - INFO - 2011-01-04 is finished\n",
"2018-08-09 11:26:37,109 - ALPHA_MIND - INFO - 2011-04-07 full re-balance: 798\n",
"2018-08-09 11:26:41,181 - ALPHA_MIND - INFO - 2011-04-07 is finished\n",
"2018-08-09 11:26:41,191 - ALPHA_MIND - INFO - 2011-07-04 full re-balance: 798\n",
"2018-08-09 11:26:45,093 - ALPHA_MIND - INFO - 2011-07-04 is finished\n",
"2018-08-09 11:26:45,104 - ALPHA_MIND - INFO - 2011-09-27 full re-balance: 797\n",
"2018-08-09 11:26:49,010 - ALPHA_MIND - INFO - 2011-09-27 is finished\n",
"2018-08-09 11:26:49,021 - ALPHA_MIND - INFO - 2011-12-27 full re-balance: 798\n",
"2018-08-09 11:26:52,937 - ALPHA_MIND - INFO - 2011-12-27 is finished\n"
]
}
],
"outputs": [],
"source": [
"rets1 = []\n",
"rets2 = []\n",
...
...
@@ -447,30 +379,9 @@
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x13e1db70>"
" model.fit(x, y, epochs=self.training_epochs, verbose=)\n",
" model.fit(x, y, epochs=self.training_epochs, verbose=False)\n",
"\n",
" print('Optimization finished ......')\n",
" self.model = model\n",
...
...
@@ -88,7 +88,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -119,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -150,7 +150,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -197,7 +197,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -207,7 +207,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -217,28 +217,9 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"E:\\workarea\\software\\conda3\\lib\\site-packages\\alpha_mind-0.2.0-py3.6-win-amd64.egg\\alphamind\\data\\transformer.py:76: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
" dropna=False)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Optimization finished ......\n",
"\n",
"Sklearn Regression Testing IC: 0.5464\n",
"Keras Regression Testing IC: 0.5462\n"
]
}
],
"outputs": [],
"source": [
"regression_composer_sk.train(ref_date)\n",
"regression_composer_ks.train(ref_date)\n",
...
...
@@ -269,26 +250,9 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2018-08-09 13:35:24,689 - ALPHA_MIND - INFO - Starting data package fetching ...\n",
"E:\\workarea\\software\\conda3\\lib\\site-packages\\alpha_mind-0.2.0-py3.6-win-amd64.egg\\alphamind\\data\\transformer.py:76: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
" dropna=False)\n",
"2018-08-09 13:35:25,457 - ALPHA_MIND - INFO - factor data loading finished\n",
"2018-08-09 13:36:15,526 - ALPHA_MIND - INFO - fit target data loading finished\n",
"2018-08-09 13:36:15,774 - ALPHA_MIND - INFO - industry data loading finished\n",
"2018-08-09 13:36:15,918 - ALPHA_MIND - INFO - benchmark data loading finished\n",
"2018-08-09 13:36:16,656 - ALPHA_MIND - INFO - data merging finished\n",
"2018-08-09 13:36:16,714 - ALPHA_MIND - INFO - Loading data is finished\n",
"2018-08-09 13:36:16,748 - ALPHA_MIND - INFO - Data processing is finished\n"
]
}
],
"outputs": [],
"source": [
"start_date = '2011-01-01'\n",
"end_date = '2012-01-01'\n",
...
...
@@ -325,28 +289,9 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2018-08-09 13:36:59,018 - ALPHA_MIND - INFO - 2011-01-04 full re-balance: 799\n",
"E:\\workarea\\software\\conda3\\lib\\site-packages\\alpha_mind-0.2.0-py3.6-win-amd64.egg\\alphamind\\data\\transformer.py:76: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
" dropna=False)\n",
"2018-08-09 13:37:03,020 - ALPHA_MIND - INFO - 2011-01-04 is finished\n",
"2018-08-09 13:37:03,028 - ALPHA_MIND - INFO - 2011-04-07 full re-balance: 798\n",
"2018-08-09 13:37:06,784 - ALPHA_MIND - INFO - 2011-04-07 is finished\n",
"2018-08-09 13:37:06,794 - ALPHA_MIND - INFO - 2011-07-04 full re-balance: 798\n",
"2018-08-09 13:37:10,646 - ALPHA_MIND - INFO - 2011-07-04 is finished\n",
"2018-08-09 13:37:10,655 - ALPHA_MIND - INFO - 2011-09-27 full re-balance: 797\n",
"2018-08-09 13:37:14,539 - ALPHA_MIND - INFO - 2011-09-27 is finished\n",
"2018-08-09 13:37:14,548 - ALPHA_MIND - INFO - 2011-12-27 full re-balance: 798\n",
"2018-08-09 13:37:18,448 - ALPHA_MIND - INFO - 2011-12-27 is finished\n"
]
}
],
"outputs": [],
"source": [
"rets1 = []\n",
"rets2 = []\n",
...
...
@@ -413,30 +358,9 @@
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x12194748>"
"E:\\workarea\\github\\alpha-mind\\alphamind\\data\\rank.py:17: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead\n",
"E:\\workarea\\github\\alpha-mind\\alphamind\\data\\rank.py:17: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead\n",