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
efbb91b1
Commit
efbb91b1
authored
Aug 06, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all use left join
parent
b4804c14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
sqlengine.py
alphamind/data/engines/sqlengine.py
+3
-3
No files found.
alphamind/data/engines/sqlengine.py
View file @
efbb91b1
...
...
@@ -159,12 +159,12 @@ class SqlEngine(object):
codes_str
=
','
.
join
(
str
(
c
)
for
c
in
codes
)
sql
=
"select uqer.Code, {factors} {risks}, market.isOpen, {risk_table}.SRISK"
\
" from (uqer
INNER
JOIN"
\
" from (uqer
LEFT
JOIN"
\
" risk_exposure on uqer.Date = risk_exposure.Date and uqer.Code = risk_exposure.Code)"
\
"
INNER
JOIN market on uqer.Date = market.Date and uqer.Code = market.Code"
\
"
LEFT
JOIN market on uqer.Date = market.Date and uqer.Code = market.Code"
\
" LEFT JOIN tiny on uqer.Date = tiny.Date and uqer.Code = tiny.Code"
\
" LEFT JOIN legacy_factor on uqer.Date = legacy_factor.Date and uqer.Code = legacy_factor.Code"
\
"
INNER
JOIN {risk_table} on uqer.Date = {risk_table}.Date and uqer.Code = {risk_table}.Code"
\
"
LEFT
JOIN {risk_table} on uqer.Date = {risk_table}.Date and uqer.Code = {risk_table}.Code"
\
" where uqer.Date = '{ref_date}' and uqer.Code in ({codes})"
.
format
(
factors
=
factor_str
,
ref_date
=
ref_date
,
codes
=
codes_str
,
...
...
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