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
d62ce564
Commit
d62ce564
authored
Sep 14, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error
parent
e727e257
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
sqlengine.py
alphamind/data/engines/sqlengine.py
+6
-8
No files found.
alphamind/data/engines/sqlengine.py
View file @
d62ce564
...
...
@@ -512,7 +512,7 @@ class SqlEngine(object):
total_data
=
{}
transformer
=
Transformer
(
factors
)
factor_data
=
self
.
fetch_factor
(
ref_date
,
transformer
,
codes
,
[
Experimental
])
factor_data
=
self
.
fetch_factor
(
ref_date
,
transformer
,
codes
,
used_factor_tables
=
[
Experimental
])
if
benchmark
:
benchmark_data
=
self
.
fetch_benchmark
(
ref_date
,
benchmark
)
...
...
@@ -618,7 +618,7 @@ if __name__ == '__main__':
from
alphamind.api
import
alpha_logger
# db_url = 'postgresql+psycopg2://postgres:we083826@localhost/alpha'
db_url
=
'postgresql+psycopg2://postgres:
A12345678!@10.63.6.220
/alpha'
db_url
=
'postgresql+psycopg2://postgres:
we083826@192.168.0.102
/alpha'
universe
=
Universe
(
'custom'
,
[
'zz500'
])
engine
=
SqlEngine
(
db_url
)
...
...
@@ -629,13 +629,11 @@ if __name__ == '__main__':
dates
=
makeSchedule
(
start_date
,
end_date
,
'1w'
,
'china.sse'
)
alpha_logger
.
info
(
'start'
)
codes
=
engine
.
fetch_codes
_range
(
universe
=
universe
,
dates
=
dates
)
codes
=
engine
.
fetch_codes
(
ref_date
,
universe
=
universe
)
data1
=
engine
.
fetch_factor_range
(
universe
=
universe
,
start_date
=
start_date
,
end_date
=
end_date
,
dates
=
dates
,
factors
=
[
'EPS'
])
data1
=
engine
.
fetch_data_experimental
(
ref_date
,
codes
=
codes
,
factors
=
[
'IVR'
])
alpha_logger
.
info
(
'end'
)
data2
=
engine
.
fetch_industry_range
(
universe
,
start_date
=
start_date
,
end_date
=
end_date
,
dates
=
dates
)
alpha_logger
.
info
(
'end'
)
...
...
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