Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
alpha-mind
Commits
62cd6faf
Commit
62cd6faf
authored
Nov 21, 2020
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: bug for wrong output x
parent
3bf550ac
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
390 additions
and
176 deletions
+390
-176
data_preparing.py
alphamind/model/data_preparing.py
+1
-1
Example 1 - Factor IC analysis.ipynb
notebooks/Example 1 - Factor IC analysis.ipynb
+65
-65
Example 10 - Quadratic Optimizer Comparison with CVXOPT.ipynb
...ple 10 - Quadratic Optimizer Comparison with CVXOPT.ipynb
+12
-12
Example 11 - Long Short Strategy Model.ipynb
notebooks/Example 11 - Long Short Strategy Model.ipynb
+16
-16
Example 12 - Machine Learning Model Prediction.ipynb
...ooks/Example 12 - Machine Learning Model Prediction.ipynb
+296
-82
No files found.
alphamind/model/data_preparing.py
View file @
62cd6faf
...
@@ -485,7 +485,7 @@ def fetch_predict_phase(engine,
...
@@ -485,7 +485,7 @@ def fetch_predict_phase(engine,
ret
=
dict
()
ret
=
dict
()
ret
[
'x_names'
]
=
transformer
.
names
ret
[
'x_names'
]
=
transformer
.
names
ret
[
'predict'
]
=
{
'x'
:
pd
.
DataFrame
(
ne_x
,
columns
=
transformer
.
names
),
'code'
:
codes
,
ret
[
'predict'
]
=
{
'x'
:
pd
.
DataFrame
(
ne_x
,
columns
=
transformer
.
names
,
index
=
codes
),
'code'
:
codes
,
'y'
:
ne_y
.
flatten
()}
'y'
:
ne_y
.
flatten
()}
return
ret
return
ret
notebooks/Example 1 - Factor IC analysis.ipynb
View file @
62cd6faf
This diff is collapsed.
Click to expand it.
notebooks/Example 10 - Quadratic Optimizer Comparison with CVXOPT.ipynb
View file @
62cd6faf
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Wall time:
3.2
2 ms\n"
"Wall time: 2 ms\n"
]
]
}
}
],
],
...
@@ -134,17 +134,17 @@
...
@@ -134,17 +134,17 @@
" warm start: on, polish: on, time_limit: off\n",
" warm start: on, polish: on, time_limit: off\n",
"\n",
"\n",
"iter objective pri res dua res rho time\n",
"iter objective pri res dua res rho time\n",
" 1 -7.8878e+03 4.61e+00 6.68e+04 1.00e-01 1.
28
e-03s\n",
" 1 -7.8878e+03 4.61e+00 6.68e+04 1.00e-01 1.
40
e-03s\n",
" 125 -2.4830e+02 3.58e-07 2.76e-05 5.82e-01
5.35
e-03s\n",
" 125 -2.4830e+02 3.58e-07 2.76e-05 5.82e-01
4.57
e-03s\n",
"\n",
"\n",
"status: solved\n",
"status: solved\n",
"solution polish: unsuccessful\n",
"solution polish: unsuccessful\n",
"number of iterations: 125\n",
"number of iterations: 125\n",
"optimal objective: -248.2989\n",
"optimal objective: -248.2989\n",
"run time:
7.43
e-03s\n",
"run time:
5.42
e-03s\n",
"optimal rho estimate: 1.87e+00\n",
"optimal rho estimate: 1.87e+00\n",
"\n",
"\n",
"Wall time: 4
3
ms\n"
"Wall time: 4
9
ms\n"
]
]
},
},
{
{
...
@@ -211,9 +211,9 @@
...
@@ -211,9 +211,9 @@
"12 -2.483e+02 -2.483e+02 +3e-07 5e-13 2e-15 1e-10 8e-10 0.9775 1e-04 1 1 1 | 0 0\n",
"12 -2.483e+02 -2.483e+02 +3e-07 5e-13 2e-15 1e-10 8e-10 0.9775 1e-04 1 1 1 | 0 0\n",
"\n",
"\n",
"OPTIMAL (within feastol=5.3e-13, reltol=1.3e-09, abstol=3.2e-07).\n",
"OPTIMAL (within feastol=5.3e-13, reltol=1.3e-09, abstol=3.2e-07).\n",
"Runtime: 0.01
362
1 seconds.\n",
"Runtime: 0.01
575
1 seconds.\n",
"\n",
"\n",
"Wall time: 5
2
ms\n"
"Wall time: 5
9
ms\n"
]
]
},
},
{
{
...
@@ -277,7 +277,7 @@
...
@@ -277,7 +277,7 @@
"12: -2.4829e+02 -2.4831e+02 1e-02 2e-16 4e-16\n",
"12: -2.4829e+02 -2.4831e+02 1e-02 2e-16 4e-16\n",
"13: -2.4830e+02 -2.4830e+02 1e-04 2e-16 1e-15\n",
"13: -2.4830e+02 -2.4830e+02 1e-04 2e-16 1e-15\n",
"Optimal solution found.\n",
"Optimal solution found.\n",
"Wall time:
80.5
ms\n"
"Wall time:
69
ms\n"
]
]
}
}
],
],
...
@@ -315,7 +315,7 @@
...
@@ -315,7 +315,7 @@
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Wall time: 2
0.
6 ms\n"
"Wall time: 26 ms\n"
]
]
},
},
{
{
...
@@ -465,9 +465,9 @@
...
@@ -465,9 +465,9 @@
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Scale(n) cvxpy cvxopt ipopt\n",
"Scale(n) cvxpy cvxopt ipopt\n",
"100 0.0
520 0.0440 0.007
0\n",
"100 0.0
320 0.0240 0.006
0\n",
"200 0.0
413 0.05
20 0.0120\n",
"200 0.0
360 0.04
20 0.0120\n",
"300 0.04
20 0.0630 0.017
0\n"
"300 0.04
40 0.0630 0.018
0\n"
]
]
}
}
],
],
...
...
notebooks/Example 11 - Long Short Strategy Model.ipynb
View file @
62cd6faf
This diff is collapsed.
Click to expand it.
notebooks/Example 12 - Machine Learning Model Prediction.ipynb
View file @
62cd6faf
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment