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
38fd0ff5
Commit
38fd0ff5
authored
Sep 05, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added single phase data fetching
parent
8a405fdd
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
204 additions
and
36 deletions
+204
-36
model_training.py
alphamind/examples/model_training.py
+2
-2
data_preparing.py
alphamind/model/data_preparing.py
+202
-34
No files found.
alphamind/examples/model_training.py
View file @
38fd0ff5
...
...
@@ -29,7 +29,7 @@ re-balance - 1 week
training - every 4 week
'''
engine
=
SqlEngine
(
'postgresql+psycopg2://postgres:
we083826@192.168.0.101
/alpha'
)
engine
=
SqlEngine
(
'postgresql+psycopg2://postgres:
A12345678!@10.63.6.220
/alpha'
)
universe
=
Universe
(
'zz500'
,
[
'zz500'
])
neutralize_risk
=
[
'SIZE'
]
+
industry_styles
portfolio_risk_neutralize
=
[
'SIZE'
]
...
...
@@ -59,7 +59,7 @@ data_package = fetch_data_package(engine,
neutralized_risk
=
neutralize_risk
,
pre_process
=
[
winsorize_normal
,
standardize
],
post_process
=
[
standardize
],
warm_start
=
20
)
warm_start
=
8
)
'''
training phase: using Linear - regression from scikit-learn
...
...
alphamind/model/data_preparing.py
View file @
38fd0ff5
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