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
442c42fc
Commit
442c42fc
authored
Sep 09, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update models
parent
1f78041b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
847 additions
and
852 deletions
+847
-852
models.py
alphamind/data/dbmodel/models.py
+847
-852
No files found.
alphamind/data/dbmodel/models.py
View file @
442c42fc
...
...
@@ -5,189 +5,17 @@ Created on 2017-6-29
@author: cheng.li
"""
from
sqlalchemy
import
BigInteger
,
Column
,
DateTime
,
Float
,
Index
,
Integer
,
JSON
,
String
,
Text
,
Boolean
from
sqlalchemy
import
BigInteger
,
Column
,
DateTime
,
Float
,
Index
,
Integer
,
JSON
,
String
,
Text
,
Boolean
,
text
from
sqlalchemy.ext.declarative
import
declarative_base
Base
=
declarative_base
()
metadata
=
Base
.
metadata
class
DailyReturn
(
Base
):
__tablename__
=
'daily_return'
__table_args__
=
(
Index
(
'daily_return_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
d1
=
Column
(
Float
(
53
))
class
Experimental
(
Base
):
__tablename__
=
'experimental'
__table_args__
=
(
Index
(
'experimental_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
CHV
=
Column
(
Float
(
53
))
DROE
=
Column
(
Float
(
53
))
IVR
=
Column
(
Float
(
53
))
ROEAfterNonRecurring
=
Column
(
Float
(
53
))
EPAfterNonRecurring
=
Column
(
Float
(
53
))
DROEAfterNonRecurring
=
Column
(
Float
(
53
))
CFinc1
=
Column
(
Float
(
53
))
xueqiu_hotness
=
Column
(
Float
(
53
))
class
FactorMaster
(
Base
):
__tablename__
=
'factor_master'
__table_args__
=
(
Index
(
'factor_master_factor_source_uindex'
,
'factor'
,
'source'
,
unique
=
True
),
)
factor
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
alias
=
Column
(
String
(
50
),
nullable
=
False
)
updateTime
=
Column
(
DateTime
)
description
=
Column
(
Text
)
class
HaltList
(
Base
):
__tablename__
=
'halt_list'
__table_args__
=
(
Index
(
'halt_list_Date_Code_haltBeginTime_uindex'
,
'trade_date'
,
'code'
,
'haltBeginTime'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
haltBeginTime
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
haltEndTime
=
Column
(
DateTime
)
secShortName
=
Column
(
String
(
20
))
exchangeCD
=
Column
(
String
(
4
))
listStatusCD
=
Column
(
String
(
4
))
delistDate
=
Column
(
DateTime
)
assetClass
=
Column
(
String
(
4
))
class
IndexComponent
(
Base
):
__tablename__
=
'index_components'
__table_args__
=
(
Index
(
'index_components_Date_indexCode_Code_uindex'
,
'trade_date'
,
'indexCode'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
effDate
=
Column
(
DateTime
)
indexShortName
=
Column
(
String
(
20
))
indexCode
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
secShortName
=
Column
(
String
(
20
))
exchangeCD
=
Column
(
String
(
4
))
weight
=
Column
(
Float
(
53
))
class
Industry
(
Base
):
__tablename__
=
'industry'
__table_args__
=
(
Index
(
'industry_Date_Code_industryID_uindex'
,
'trade_date'
,
'code'
,
'industryID'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
industry
=
Column
(
String
(
30
),
nullable
=
False
)
industryID
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
industrySymbol
=
Column
(
String
(
20
))
industryID1
=
Column
(
BigInteger
,
nullable
=
False
)
industryName1
=
Column
(
String
(
50
))
industryID2
=
Column
(
BigInteger
)
industryName2
=
Column
(
String
(
50
))
industryID3
=
Column
(
BigInteger
)
industryName3
=
Column
(
String
(
50
))
IndustryID4
=
Column
(
BigInteger
)
IndustryName4
=
Column
(
String
(
50
))
class
LegacyFactor
(
Base
):
__tablename__
=
'legacy_factor'
__table_args__
=
(
Index
(
'legacy_factor_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
ROEAfterNonRecurring
=
Column
(
Float
(
53
))
EPSAfterNonRecurring
=
Column
(
Float
(
53
))
EODPrice
=
Column
(
Float
(
53
))
LogFloatCap
=
Column
(
Float
(
53
))
BPS
=
Column
(
Float
(
53
))
SPS
=
Column
(
Float
(
53
))
DebtToAsset
=
Column
(
Float
(
53
))
STOM
=
Column
(
Float
(
53
))
DROEAfterNonRecurring
=
Column
(
Float
(
53
))
LogTotalCap
=
Column
(
Float
(
53
))
BP
=
Column
(
Float
(
53
))
SP
=
Column
(
Float
(
53
))
EPAfterNonRecurring
=
Column
(
Float
(
53
))
DivToB
=
Column
(
Float
(
53
))
DivP
=
Column
(
Float
(
53
))
EBITToSales
=
Column
(
Float
(
53
))
EBITAToSales
=
Column
(
Float
(
53
))
EVToSales
=
Column
(
Float
(
53
))
EVToEBIT
=
Column
(
Float
(
53
))
EVToEBITDA
=
Column
(
Float
(
53
))
EVToNOPLAT
=
Column
(
Float
(
53
))
EVToIC
=
Column
(
Float
(
53
))
ROIC
=
Column
(
Float
(
53
))
FCFFPS
=
Column
(
Float
(
53
))
FCFFToEarningAfterNonRecurring
=
Column
(
Float
(
53
))
FCFFP
=
Column
(
Float
(
53
))
ProfitToAsset
=
Column
(
Float
(
53
))
GrossProfitRatio
=
Column
(
Float
(
53
))
NetProfitRatio
=
Column
(
Float
(
53
))
LATO
=
Column
(
Float
(
53
))
FATO
=
Column
(
Float
(
53
))
TATO
=
Column
(
Float
(
53
))
EquityTO
=
Column
(
Float
(
53
))
PayableTO
=
Column
(
Float
(
53
))
RecievableTO
=
Column
(
Float
(
53
))
RevenueGrowth
=
Column
(
Float
(
53
))
GrossProfitGrowth
=
Column
(
Float
(
53
))
NetProfitGrowth
=
Column
(
Float
(
53
))
GrossCFToRevenue
=
Column
(
Float
(
53
))
CFToRevenue
=
Column
(
Float
(
53
))
CFToProfit
=
Column
(
Float
(
53
))
CFToAsset
=
Column
(
Float
(
53
))
GrossCFGrowth
=
Column
(
Float
(
53
))
CFGrowth
=
Column
(
Float
(
53
))
ICFGrowth
=
Column
(
Float
(
53
))
AveAmount60
=
Column
(
Float
(
53
))
PeriodReturn60
=
Column
(
Float
(
53
))
AmountRatio60to250
=
Column
(
Float
(
53
))
CFPS
=
Column
(
Float
(
53
))
CFP
=
Column
(
Float
(
53
))
NetCFGrowth
=
Column
(
Float
(
53
))
NetCFGrowthP
=
Column
(
Float
(
53
))
NetCash
=
Column
(
Float
(
53
))
NetCashP
=
Column
(
Float
(
53
))
BVPSGrowth
=
Column
(
Float
(
53
))
EquityPSGrowth
=
Column
(
Float
(
53
))
WholeSales
=
Column
(
Float
(
53
))
WholeProfitAfterNonRecurring
=
Column
(
Float
(
53
))
ExpenseRatio
=
Column
(
Float
(
53
))
CurrentRatio
=
Column
(
Float
(
53
))
QuickRatio
=
Column
(
Float
(
53
))
AcidTestRatio
=
Column
(
Float
(
53
))
TimeInterestEarnedRatio
=
Column
(
Float
(
53
))
DepositReceivedVsSale
=
Column
(
Float
(
53
))
DebtRatioExcemptDepRec
=
Column
(
Float
(
53
))
SNBARatio
=
Column
(
Float
(
53
))
class
Market
(
Base
):
__tablename__
=
'market'
class
FullFactorView
(
Base
):
__tablename__
=
'full_factor_view'
__table_args__
=
(
Index
(
'
market_Date_Code_uindex
'
,
'trade_date'
,
'code'
,
unique
=
True
),
Index
(
'
factor_pk
'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
...
...
@@ -208,496 +36,8 @@ class Market(Base):
negMarketValue
=
Column
(
Float
(
53
))
marketValue
=
Column
(
Float
(
53
))
chgPct
=
Column
(
Float
(
53
))
PE
=
Column
(
Float
(
53
))
PE1
=
Column
(
Float
(
53
))
PB
=
Column
(
Float
(
53
))
isOpen
=
Column
(
Integer
)
vwap
=
Column
(
Float
(
53
))
class
Performance
(
Base
):
__tablename__
=
'performance'
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
type
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
er
=
Column
(
Float
(
53
),
nullable
=
False
)
turn_over
=
Column
(
Float
(
53
))
ic
=
Column
(
Float
(
53
))
class
PnlLog
(
Base
):
__tablename__
=
'pnl_log'
__table_args__
=
(
Index
(
'pnl_log_trade_date_portfolio_name_uindex'
,
'trade_date'
,
'portfolio_name'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
excess_return
=
Column
(
Float
(
53
))
pct_change
=
Column
(
Float
(
53
))
class
Positions
(
Base
):
__tablename__
=
'positions'
source
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
,
index
=
True
)
universe
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
,
index
=
True
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
,
index
=
True
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
,
index
=
True
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
,
index
=
True
)
type
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
,
index
=
True
)
weight
=
Column
(
JSON
)
class
QuantileAnalysis
(
Base
):
__tablename__
=
'quantile_analysis'
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
q1
=
Column
(
Float
(
53
))
q2
=
Column
(
Float
(
53
))
q3
=
Column
(
Float
(
53
))
q4
=
Column
(
Float
(
53
))
q5
=
Column
(
Float
(
53
))
q6
=
Column
(
Float
(
53
))
q7
=
Column
(
Float
(
53
))
q8
=
Column
(
Float
(
53
))
q9
=
Column
(
Float
(
53
))
q10
=
Column
(
Float
(
53
))
class
RebalanceLog
(
Base
):
__tablename__
=
'rebalance_log'
__table_args__
=
(
Index
(
'rebalance_log_trade_date_code_portfolio_name_uindex'
,
'trade_date'
,
'code'
,
'portfolio_name'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
factor_date
=
Column
(
DateTime
,
nullable
=
False
)
weight
=
Column
(
Float
(
53
),
nullable
=
False
)
price
=
Column
(
Float
(
53
),
nullable
=
False
)
class
RiskCovDay
(
Base
):
__tablename__
=
'risk_cov_day'
__table_args__
=
(
Index
(
'risk_cov_day_Date_FactorID_uindex'
,
'trade_date'
,
'FactorID'
,
unique
=
True
),
Index
(
'risk_cov_day_Date_Factor_uindex'
,
'trade_date'
,
'Factor'
,
unique
=
True
)
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
FactorID
=
Column
(
Integer
)
Factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskCovLong
(
Base
):
__tablename__
=
'risk_cov_long'
__table_args__
=
(
Index
(
'risk_cov_long_Date_FactorID_uindex'
,
'trade_date'
,
'FactorID'
,
unique
=
True
),
Index
(
'risk_cov_long_Date_Factor_uindex'
,
'trade_date'
,
'Factor'
,
unique
=
True
)
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
FactorID
=
Column
(
Integer
)
Factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskCovShort
(
Base
):
__tablename__
=
'risk_cov_short'
__table_args__
=
(
Index
(
'risk_cov_short_Date_FactorID_uindex'
,
'trade_date'
,
'FactorID'
,
unique
=
True
),
Index
(
'risk_cov_short_Date_Factor_uindex'
,
'trade_date'
,
'Factor'
,
unique
=
True
)
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
FactorID
=
Column
(
Integer
)
Factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskExposure
(
Base
):
__tablename__
=
'risk_exposure'
__table_args__
=
(
Index
(
'risk_exposure_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
BigInteger
)
RealEstate
=
Column
(
BigInteger
)
Health
=
Column
(
BigInteger
)
Transportation
=
Column
(
BigInteger
)
Mining
=
Column
(
BigInteger
)
NonFerMetal
=
Column
(
BigInteger
)
HouseApp
=
Column
(
BigInteger
)
LeiService
=
Column
(
BigInteger
)
MachiEquip
=
Column
(
BigInteger
)
BuildDeco
=
Column
(
BigInteger
)
CommeTrade
=
Column
(
BigInteger
)
CONMAT
=
Column
(
BigInteger
)
Auto
=
Column
(
BigInteger
)
Textile
=
Column
(
BigInteger
)
FoodBever
=
Column
(
BigInteger
)
Electronics
=
Column
(
BigInteger
)
Computer
=
Column
(
BigInteger
)
LightIndus
=
Column
(
BigInteger
)
Utilities
=
Column
(
BigInteger
)
Telecom
=
Column
(
BigInteger
)
AgriForest
=
Column
(
BigInteger
)
CHEM
=
Column
(
BigInteger
)
Media
=
Column
(
BigInteger
)
IronSteel
=
Column
(
BigInteger
)
NonBankFinan
=
Column
(
BigInteger
)
ELECEQP
=
Column
(
BigInteger
)
AERODEF
=
Column
(
BigInteger
)
Conglomerates
=
Column
(
BigInteger
)
COUNTRY
=
Column
(
BigInteger
)
updateTime
=
Column
(
DateTime
)
class
RiskMaster
(
Base
):
__tablename__
=
'risk_master'
factor
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
alias
=
Column
(
String
(
30
),
nullable
=
False
)
type
=
Column
(
String
(
30
))
updateTime
=
Column
(
DateTime
)
description
=
Column
(
Text
)
FactorID
=
Column
(
Integer
,
nullable
=
False
,
unique
=
True
)
vendor
=
Column
(
String
(
30
))
class
RiskReturn
(
Base
):
__tablename__
=
'risk_return'
trade_date
=
Column
(
DateTime
,
primary_key
=
True
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskStat
(
Base
):
__tablename__
=
'risk_stats'
__table_args__
=
(
Index
(
'risk_stats_uindex'
,
'trade_date'
,
'type'
,
'portfolio'
,
'source'
,
'universe'
,
'benchmark'
,
'factor'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
type
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
factor
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
exposure
=
Column
(
Float
(
53
))
class
SecurityMaster
(
Base
):
__tablename__
=
'security_master'
exchangeCD
=
Column
(
String
(
4
))
ListSectorCD
=
Column
(
BigInteger
)
ListSector
=
Column
(
String
(
6
))
transCurrCD
=
Column
(
Text
)
secShortName
=
Column
(
String
(
10
))
secFullName
=
Column
(
Text
)
listStatusCD
=
Column
(
String
(
2
))
listDate
=
Column
(
DateTime
)
delistDate
=
Column
(
DateTime
)
equTypeCD
=
Column
(
String
(
4
))
equType
=
Column
(
String
(
10
))
exCountryCD
=
Column
(
String
(
3
))
partyID
=
Column
(
BigInteger
)
totalShares
=
Column
(
Float
(
53
))
nonrestFloatShares
=
Column
(
Float
(
53
))
nonrestfloatA
=
Column
(
Float
(
53
))
officeAddr
=
Column
(
Text
)
primeOperating
=
Column
(
Text
)
endDate
=
Column
(
DateTime
)
TShEquity
=
Column
(
Float
(
53
))
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
class
SpecificReturn
(
Base
):
__tablename__
=
'specific_return'
__table_args__
=
(
Index
(
'specific_return_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
spret
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
SpecificRiskDay
(
Base
):
__tablename__
=
'specific_risk_day'
__table_args__
=
(
Index
(
'specific_risk_day_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
SRISK
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
SpecificRiskLong
(
Base
):
__tablename__
=
'specific_risk_long'
__table_args__
=
(
Index
(
'specific_risk_long_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
updateTime
=
Column
(
DateTime
)
SRISK
=
Column
(
Float
(
53
))
class
SpecificRiskShort
(
Base
):
__tablename__
=
'specific_risk_short'
__table_args__
=
(
Index
(
'specific_risk_short_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
SRISK
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
Strategy
(
Base
):
__tablename__
=
'strategy'
__table_args__
=
(
Index
(
'strategy_Date_strategyName_factor_uindex'
,
'trade_date'
,
'strategyName'
,
'factor'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
strategyName
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
weight
=
Column
(
Float
(
53
))
source
=
Column
(
String
(
20
))
class
Tiny
(
Base
):
__tablename__
=
'tiny'
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
CFinc1
=
Column
(
Float
(
53
))
BDTO
=
Column
(
Float
(
53
))
RVOL
=
Column
(
Float
(
53
))
CHV
=
Column
(
Float
(
53
))
VAL
=
Column
(
Float
(
53
))
EPSAfterNonRecurring
=
Column
(
Float
(
53
))
DivP
=
Column
(
Float
(
53
))
class
Universe
(
Base
):
__tablename__
=
'universe'
__table_args__
=
(
Index
(
'universe_Date_universe_Code_uindex'
,
'trade_date'
,
'universe'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
class
Uqer
(
Base
):
__tablename__
=
'uqer'
__table_args__
=
(
Index
(
'factors_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
AccountsPayablesTDays
=
Column
(
Float
(
53
))
AccountsPayablesTRate
=
Column
(
Float
(
53
))
AdminiExpenseRate
=
Column
(
Float
(
53
))
...
...
@@ -1119,37 +459,856 @@ class Uqer(Base):
SGRO
=
Column
(
Float
(
53
))
EgibsLong
=
Column
(
Float
(
53
))
STOM
=
Column
(
Float
(
53
))
STOQ
=
Column
(
Float
(
53
))
STOA
=
Column
(
Float
(
53
))
NLSIZE
=
Column
(
Float
(
53
))
STOQ
=
Column
(
Float
(
53
))
STOA
=
Column
(
Float
(
53
))
NLSIZE
=
Column
(
Float
(
53
))
ROEAfterNonRecurring
=
Column
(
Float
(
53
))
EPSAfterNonRecurring
=
Column
(
Float
(
53
))
EODPrice
=
Column
(
Float
(
53
))
LogFloatCap
=
Column
(
Float
(
53
))
BPS
=
Column
(
Float
(
53
))
SPS
=
Column
(
Float
(
53
))
DebtToAsset
=
Column
(
Float
(
53
))
DROEAfterNonRecurring
=
Column
(
Float
(
53
))
LogTotalCap
=
Column
(
Float
(
53
))
BP
=
Column
(
Float
(
53
))
SP
=
Column
(
Float
(
53
))
EPAfterNonRecurring
=
Column
(
Float
(
53
))
DivToB
=
Column
(
Float
(
53
))
DivP
=
Column
(
Float
(
53
))
EBITToSales
=
Column
(
Float
(
53
))
EBITAToSales
=
Column
(
Float
(
53
))
EVToSales
=
Column
(
Float
(
53
))
EVToEBIT
=
Column
(
Float
(
53
))
EVToEBITDA
=
Column
(
Float
(
53
))
EVToNOPLAT
=
Column
(
Float
(
53
))
EVToIC
=
Column
(
Float
(
53
))
FCFFPS
=
Column
(
Float
(
53
))
FCFFToEarningAfterNonRecurring
=
Column
(
Float
(
53
))
FCFFP
=
Column
(
Float
(
53
))
ProfitToAsset
=
Column
(
Float
(
53
))
GrossProfitRatio
=
Column
(
Float
(
53
))
LATO
=
Column
(
Float
(
53
))
FATO
=
Column
(
Float
(
53
))
TATO
=
Column
(
Float
(
53
))
EquityTO
=
Column
(
Float
(
53
))
PayableTO
=
Column
(
Float
(
53
))
RecievableTO
=
Column
(
Float
(
53
))
RevenueGrowth
=
Column
(
Float
(
53
))
GrossProfitGrowth
=
Column
(
Float
(
53
))
NetProfitGrowth
=
Column
(
Float
(
53
))
GrossCFToRevenue
=
Column
(
Float
(
53
))
CFToRevenue
=
Column
(
Float
(
53
))
CFToProfit
=
Column
(
Float
(
53
))
CFToAsset
=
Column
(
Float
(
53
))
GrossCFGrowth
=
Column
(
Float
(
53
))
CFGrowth
=
Column
(
Float
(
53
))
ICFGrowth
=
Column
(
Float
(
53
))
AveAmount60
=
Column
(
Float
(
53
))
PeriodReturn60
=
Column
(
Float
(
53
))
AmountRatio60to250
=
Column
(
Float
(
53
))
CFPS
=
Column
(
Float
(
53
))
CFP
=
Column
(
Float
(
53
))
NetCFGrowth
=
Column
(
Float
(
53
))
NetCFGrowthP
=
Column
(
Float
(
53
))
NetCash
=
Column
(
Float
(
53
))
NetCashP
=
Column
(
Float
(
53
))
BVPSGrowth
=
Column
(
Float
(
53
))
EquityPSGrowth
=
Column
(
Float
(
53
))
WholeSales
=
Column
(
Float
(
53
))
WholeProfitAfterNonRecurring
=
Column
(
Float
(
53
))
ExpenseRatio
=
Column
(
Float
(
53
))
AcidTestRatio
=
Column
(
Float
(
53
))
TimeInterestEarnedRatio
=
Column
(
Float
(
53
))
DepositReceivedVsSale
=
Column
(
Float
(
53
))
DebtRatioExcemptDepRec
=
Column
(
Float
(
53
))
SNBARatio
=
Column
(
Float
(
53
))
CFinc1
=
Column
(
Float
(
53
))
BDTO
=
Column
(
Float
(
53
))
RVOL
=
Column
(
Float
(
53
))
CHV
=
Column
(
Float
(
53
))
VAL
=
Column
(
Float
(
53
))
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
BigInteger
)
RealEstate
=
Column
(
BigInteger
)
Health
=
Column
(
BigInteger
)
Transportation
=
Column
(
BigInteger
)
Mining
=
Column
(
BigInteger
)
NonFerMetal
=
Column
(
BigInteger
)
HouseApp
=
Column
(
BigInteger
)
LeiService
=
Column
(
BigInteger
)
MachiEquip
=
Column
(
BigInteger
)
BuildDeco
=
Column
(
BigInteger
)
CommeTrade
=
Column
(
BigInteger
)
CONMAT
=
Column
(
BigInteger
)
Auto
=
Column
(
BigInteger
)
Textile
=
Column
(
BigInteger
)
FoodBever
=
Column
(
BigInteger
)
Electronics
=
Column
(
BigInteger
)
Computer
=
Column
(
BigInteger
)
LightIndus
=
Column
(
BigInteger
)
Utilities
=
Column
(
BigInteger
)
Telecom
=
Column
(
BigInteger
)
AgriForest
=
Column
(
BigInteger
)
CHEM
=
Column
(
BigInteger
)
Media
=
Column
(
BigInteger
)
IronSteel
=
Column
(
BigInteger
)
NonBankFinan
=
Column
(
BigInteger
)
ELECEQP
=
Column
(
BigInteger
)
AERODEF
=
Column
(
BigInteger
)
Conglomerates
=
Column
(
BigInteger
)
COUNTRY
=
Column
(
BigInteger
)
d_srisk
=
Column
(
Float
(
53
))
s_srisk
=
Column
(
Float
(
53
))
l_srisk
=
Column
(
Float
(
53
))
class
DailyPortfolios
(
Base
):
__tablename__
=
'daily_portfolios'
__table_args__
=
(
Index
(
'daily_portfolios_pk'
,
'trade_date'
,
'portfolio_name'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
weight
=
Column
(
Float
(
53
),
nullable
=
False
)
er
=
Column
(
Float
(
53
),
nullable
=
False
)
industry
=
Column
(
String
(
50
),
nullable
=
False
)
benchmark_weight
=
Column
(
Float
(
53
),
nullable
=
False
)
is_tradable
=
Column
(
Boolean
,
nullable
=
False
)
class
DailyReturn
(
Base
):
__tablename__
=
'daily_return'
__table_args__
=
(
Index
(
'daily_return_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
d1
=
Column
(
Float
(
53
))
class
Experimental
(
Base
):
__tablename__
=
'experimental'
__table_args__
=
(
Index
(
'experimental_idx'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
CHV
=
Column
(
Float
(
53
))
DROE
=
Column
(
Float
(
53
))
IVR
=
Column
(
Float
(
53
))
ROEAfterNonRecurring
=
Column
(
Float
(
53
))
EPAfterNonRecurring
=
Column
(
Float
(
53
))
DROEAfterNonRecurring
=
Column
(
Float
(
53
))
CFinc1
=
Column
(
Float
(
53
))
class
FactorMaster
(
Base
):
__tablename__
=
'factor_master'
__table_args__
=
(
Index
(
'factor_master_idx'
,
'factor'
,
'source'
,
unique
=
True
),
)
factor
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
alias
=
Column
(
String
(
50
),
nullable
=
False
)
updateTime
=
Column
(
DateTime
)
description
=
Column
(
Text
)
class
HaltList
(
Base
):
__tablename__
=
'halt_list'
__table_args__
=
(
Index
(
'halt_list_Date_Code_haltBeginTime_uindex'
,
'trade_date'
,
'code'
,
'haltBeginTime'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
haltBeginTime
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
haltEndTime
=
Column
(
DateTime
)
secShortName
=
Column
(
String
(
20
))
exchangeCD
=
Column
(
String
(
4
))
listStatusCD
=
Column
(
String
(
4
))
delistDate
=
Column
(
DateTime
)
assetClass
=
Column
(
String
(
4
))
class
IndexComponent
(
Base
):
__tablename__
=
'index_components'
__table_args__
=
(
Index
(
'index_comp_idx'
,
'trade_date'
,
'indexCode'
,
'code'
,
'weight'
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
effDate
=
Column
(
DateTime
)
indexShortName
=
Column
(
String
(
20
))
indexCode
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
secShortName
=
Column
(
String
(
20
))
exchangeCD
=
Column
(
String
(
4
))
weight
=
Column
(
Float
(
53
))
class
Industry
(
Base
):
__tablename__
=
'industry'
__table_args__
=
(
Index
(
'industry_idx'
,
'trade_date'
,
'code'
,
'industryID'
,
'industryName1'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
industry
=
Column
(
String
(
30
),
nullable
=
False
)
industryID
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
industrySymbol
=
Column
(
String
(
20
))
industryID1
=
Column
(
BigInteger
,
nullable
=
False
)
industryName1
=
Column
(
String
(
50
))
industryID2
=
Column
(
BigInteger
)
industryName2
=
Column
(
String
(
50
))
industryID3
=
Column
(
BigInteger
)
industryName3
=
Column
(
String
(
50
))
IndustryID4
=
Column
(
BigInteger
)
IndustryName4
=
Column
(
String
(
50
))
class
LegacyFactor
(
Base
):
__tablename__
=
'legacy_factor'
__table_args__
=
(
Index
(
'legacy_factor_idx'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
ROEAfterNonRecurring
=
Column
(
Float
(
53
))
EPSAfterNonRecurring
=
Column
(
Float
(
53
))
EODPrice
=
Column
(
Float
(
53
))
LogFloatCap
=
Column
(
Float
(
53
))
BPS
=
Column
(
Float
(
53
))
SPS
=
Column
(
Float
(
53
))
DebtToAsset
=
Column
(
Float
(
53
))
STOM
=
Column
(
Float
(
53
))
DROEAfterNonRecurring
=
Column
(
Float
(
53
))
LogTotalCap
=
Column
(
Float
(
53
))
BP
=
Column
(
Float
(
53
))
SP
=
Column
(
Float
(
53
))
EPAfterNonRecurring
=
Column
(
Float
(
53
))
DivToB
=
Column
(
Float
(
53
))
DivP
=
Column
(
Float
(
53
))
EBITToSales
=
Column
(
Float
(
53
))
EBITAToSales
=
Column
(
Float
(
53
))
EVToSales
=
Column
(
Float
(
53
))
EVToEBIT
=
Column
(
Float
(
53
))
EVToEBITDA
=
Column
(
Float
(
53
))
EVToNOPLAT
=
Column
(
Float
(
53
))
EVToIC
=
Column
(
Float
(
53
))
ROIC
=
Column
(
Float
(
53
))
FCFFPS
=
Column
(
Float
(
53
))
FCFFToEarningAfterNonRecurring
=
Column
(
Float
(
53
))
FCFFP
=
Column
(
Float
(
53
))
ProfitToAsset
=
Column
(
Float
(
53
))
GrossProfitRatio
=
Column
(
Float
(
53
))
NetProfitRatio
=
Column
(
Float
(
53
))
LATO
=
Column
(
Float
(
53
))
FATO
=
Column
(
Float
(
53
))
TATO
=
Column
(
Float
(
53
))
EquityTO
=
Column
(
Float
(
53
))
PayableTO
=
Column
(
Float
(
53
))
RecievableTO
=
Column
(
Float
(
53
))
RevenueGrowth
=
Column
(
Float
(
53
))
GrossProfitGrowth
=
Column
(
Float
(
53
))
NetProfitGrowth
=
Column
(
Float
(
53
))
GrossCFToRevenue
=
Column
(
Float
(
53
))
CFToRevenue
=
Column
(
Float
(
53
))
CFToProfit
=
Column
(
Float
(
53
))
CFToAsset
=
Column
(
Float
(
53
))
GrossCFGrowth
=
Column
(
Float
(
53
))
CFGrowth
=
Column
(
Float
(
53
))
ICFGrowth
=
Column
(
Float
(
53
))
AveAmount60
=
Column
(
Float
(
53
))
PeriodReturn60
=
Column
(
Float
(
53
))
AmountRatio60to250
=
Column
(
Float
(
53
))
CFPS
=
Column
(
Float
(
53
))
CFP
=
Column
(
Float
(
53
))
NetCFGrowth
=
Column
(
Float
(
53
))
NetCFGrowthP
=
Column
(
Float
(
53
))
NetCash
=
Column
(
Float
(
53
))
NetCashP
=
Column
(
Float
(
53
))
BVPSGrowth
=
Column
(
Float
(
53
))
EquityPSGrowth
=
Column
(
Float
(
53
))
WholeSales
=
Column
(
Float
(
53
))
WholeProfitAfterNonRecurring
=
Column
(
Float
(
53
))
ExpenseRatio
=
Column
(
Float
(
53
))
CurrentRatio
=
Column
(
Float
(
53
))
QuickRatio
=
Column
(
Float
(
53
))
AcidTestRatio
=
Column
(
Float
(
53
))
TimeInterestEarnedRatio
=
Column
(
Float
(
53
))
DepositReceivedVsSale
=
Column
(
Float
(
53
))
DebtRatioExcemptDepRec
=
Column
(
Float
(
53
))
SNBARatio
=
Column
(
Float
(
53
))
class
Market
(
Base
):
__tablename__
=
'market'
__table_args__
=
(
Index
(
'market_idx'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
secShortName
=
Column
(
String
(
10
))
exchangeCD
=
Column
(
String
(
4
))
preClosePrice
=
Column
(
Float
(
53
))
actPreClosePrice
=
Column
(
Float
(
53
))
openPrice
=
Column
(
Float
(
53
))
highestPrice
=
Column
(
Float
(
53
))
lowestPrice
=
Column
(
Float
(
53
))
closePrice
=
Column
(
Float
(
53
))
turnoverVol
=
Column
(
BigInteger
)
turnoverValue
=
Column
(
Float
(
53
))
dealAmount
=
Column
(
BigInteger
)
turnoverRate
=
Column
(
Float
(
53
))
accumAdjFactor
=
Column
(
Float
(
53
))
negMarketValue
=
Column
(
Float
(
53
))
marketValue
=
Column
(
Float
(
53
))
chgPct
=
Column
(
Float
(
53
))
PE
=
Column
(
Float
(
53
))
PE1
=
Column
(
Float
(
53
))
PB
=
Column
(
Float
(
53
))
isOpen
=
Column
(
Integer
)
vwap
=
Column
(
Float
(
53
))
class
Model
(
Base
):
__tablename__
=
'models'
__table_args__
=
(
Index
(
'model_pk'
,
'trade_date'
,
'model_type'
,
'model_version'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
nullable
=
False
)
model_type
=
Column
(
String
(
30
),
nullable
=
False
)
model_version
=
Column
(
BigInteger
,
nullable
=
False
)
update_time
=
Column
(
DateTime
,
nullable
=
False
)
model_desc
=
Column
(
JSON
,
nullable
=
False
)
model_id
=
Column
(
Integer
,
primary_key
=
True
,
server_default
=
text
(
"nextval('models_model_id_seq'::regclass)"
))
class
Performance
(
Base
):
__tablename__
=
'performance'
__table_args__
=
(
Index
(
'performance_pk'
,
'trade_date'
,
'type'
,
'portfolio'
,
'source'
,
'universe'
,
'benchmark'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
type
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
er
=
Column
(
Float
(
53
),
nullable
=
False
)
turn_over
=
Column
(
Float
(
53
))
ic
=
Column
(
Float
(
53
))
class
PnlLog
(
Base
):
__tablename__
=
'pnl_log'
__table_args__
=
(
Index
(
'pnl_log_idx'
,
'trade_date'
,
'portfolio_name'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
excess_return
=
Column
(
Float
(
53
))
pct_change
=
Column
(
Float
(
53
))
class
PortfolioSettings
(
Base
):
__tablename__
=
'portfolio_settings'
__table_args__
=
(
Index
(
'portfolio_pk'
,
'trade_date'
,
'portfolio_name'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
model_id
=
Column
(
BigInteger
,
nullable
=
False
)
class
Positions
(
Base
):
__tablename__
=
'positions'
__table_args__
=
(
Index
(
'positions_idx'
,
'trade_date'
,
'source'
,
'universe'
,
'benchmark'
,
'portfolio'
,
'type'
,
unique
=
True
),
)
source
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
type
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
weight
=
Column
(
JSON
)
class
QuantileAnalysi
(
Base
):
__tablename__
=
'quantile_analysis'
__table_args__
=
(
Index
(
'quantile_idx'
,
'trade_date'
,
'portfolio'
,
'universe'
,
'benchmark'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
q1
=
Column
(
Float
(
53
))
q2
=
Column
(
Float
(
53
))
q3
=
Column
(
Float
(
53
))
q4
=
Column
(
Float
(
53
))
q5
=
Column
(
Float
(
53
))
q6
=
Column
(
Float
(
53
))
q7
=
Column
(
Float
(
53
))
q8
=
Column
(
Float
(
53
))
q9
=
Column
(
Float
(
53
))
q10
=
Column
(
Float
(
53
))
class
RebalanceLog
(
Base
):
__tablename__
=
'rebalance_log'
__table_args__
=
(
Index
(
'rebalance_idx'
,
'trade_date'
,
'portfolio_name'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
factor_date
=
Column
(
DateTime
,
nullable
=
False
)
weight
=
Column
(
Float
(
53
),
nullable
=
False
)
price
=
Column
(
Float
(
53
),
nullable
=
False
)
class
RiskCovDay
(
Base
):
__tablename__
=
'risk_cov_day'
__table_args__
=
(
Index
(
'risk_cov_day_idx'
,
'trade_date'
,
'FactorID'
,
'Factor'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
FactorID
=
Column
(
Integer
,
nullable
=
False
)
Factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
class
RiskCovLong
(
Base
):
__tablename__
=
'risk_cov_long'
__table_args__
=
(
Index
(
'risk_cov_long_Date_Factor_uindex'
,
'trade_date'
,
'Factor'
,
unique
=
True
),
Index
(
'risk_cov_long_Date_FactorID_uindex'
,
'trade_date'
,
'FactorID'
,
unique
=
True
)
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
FactorID
=
Column
(
Integer
)
Factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskCovShort
(
Base
):
__tablename__
=
'risk_cov_short'
__table_args__
=
(
Index
(
'risk_cov_short_Date_FactorID_uindex'
,
'trade_date'
,
'FactorID'
,
unique
=
True
),
Index
(
'risk_cov_short_Date_Factor_uindex'
,
'trade_date'
,
'Factor'
,
unique
=
True
)
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
FactorID
=
Column
(
Integer
)
Factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskExposure
(
Base
):
__tablename__
=
'risk_exposure'
__table_args__
=
(
Index
(
'risk_exposure_idx'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
BigInteger
)
RealEstate
=
Column
(
BigInteger
)
Health
=
Column
(
BigInteger
)
Transportation
=
Column
(
BigInteger
)
Mining
=
Column
(
BigInteger
)
NonFerMetal
=
Column
(
BigInteger
)
HouseApp
=
Column
(
BigInteger
)
LeiService
=
Column
(
BigInteger
)
MachiEquip
=
Column
(
BigInteger
)
BuildDeco
=
Column
(
BigInteger
)
CommeTrade
=
Column
(
BigInteger
)
CONMAT
=
Column
(
BigInteger
)
Auto
=
Column
(
BigInteger
)
Textile
=
Column
(
BigInteger
)
FoodBever
=
Column
(
BigInteger
)
Electronics
=
Column
(
BigInteger
)
Computer
=
Column
(
BigInteger
)
LightIndus
=
Column
(
BigInteger
)
Utilities
=
Column
(
BigInteger
)
Telecom
=
Column
(
BigInteger
)
AgriForest
=
Column
(
BigInteger
)
CHEM
=
Column
(
BigInteger
)
Media
=
Column
(
BigInteger
)
IronSteel
=
Column
(
BigInteger
)
NonBankFinan
=
Column
(
BigInteger
)
ELECEQP
=
Column
(
BigInteger
)
AERODEF
=
Column
(
BigInteger
)
Conglomerates
=
Column
(
BigInteger
)
COUNTRY
=
Column
(
BigInteger
)
updateTime
=
Column
(
DateTime
)
class
RiskMaster
(
Base
):
__tablename__
=
'risk_master'
factor
=
Column
(
String
(
30
),
nullable
=
False
,
unique
=
True
)
source
=
Column
(
String
(
30
),
nullable
=
False
)
alias
=
Column
(
String
(
30
),
nullable
=
False
)
type
=
Column
(
String
(
30
))
updateTime
=
Column
(
DateTime
)
description
=
Column
(
Text
)
FactorID
=
Column
(
Integer
,
primary_key
=
True
,
unique
=
True
)
vendor
=
Column
(
String
(
30
))
class
RiskReturn
(
Base
):
__tablename__
=
'risk_return'
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
unique
=
True
)
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
Float
(
53
))
RealEstate
=
Column
(
Float
(
53
))
Health
=
Column
(
Float
(
53
))
Transportation
=
Column
(
Float
(
53
))
Mining
=
Column
(
Float
(
53
))
NonFerMetal
=
Column
(
Float
(
53
))
HouseApp
=
Column
(
Float
(
53
))
LeiService
=
Column
(
Float
(
53
))
MachiEquip
=
Column
(
Float
(
53
))
BuildDeco
=
Column
(
Float
(
53
))
CommeTrade
=
Column
(
Float
(
53
))
CONMAT
=
Column
(
Float
(
53
))
Auto
=
Column
(
Float
(
53
))
Textile
=
Column
(
Float
(
53
))
FoodBever
=
Column
(
Float
(
53
))
Electronics
=
Column
(
Float
(
53
))
Computer
=
Column
(
Float
(
53
))
LightIndus
=
Column
(
Float
(
53
))
Utilities
=
Column
(
Float
(
53
))
Telecom
=
Column
(
Float
(
53
))
AgriForest
=
Column
(
Float
(
53
))
CHEM
=
Column
(
Float
(
53
))
Media
=
Column
(
Float
(
53
))
IronSteel
=
Column
(
Float
(
53
))
NonBankFinan
=
Column
(
Float
(
53
))
ELECEQP
=
Column
(
Float
(
53
))
AERODEF
=
Column
(
Float
(
53
))
Conglomerates
=
Column
(
Float
(
53
))
COUNTRY
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
RiskStat
(
Base
):
__tablename__
=
'risk_stats'
__table_args__
=
(
Index
(
'risk_stats_uindex'
,
'trade_date'
,
'type'
,
'portfolio'
,
'source'
,
'universe'
,
'benchmark'
,
'factor'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
type
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
portfolio
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
source
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
benchmark
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
factor
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
exposure
=
Column
(
Float
(
53
))
class
SecurityMaster
(
Base
):
__tablename__
=
'security_master'
exchangeCD
=
Column
(
String
(
4
))
ListSectorCD
=
Column
(
BigInteger
)
ListSector
=
Column
(
String
(
6
))
transCurrCD
=
Column
(
Text
)
secShortName
=
Column
(
String
(
10
))
secFullName
=
Column
(
Text
)
listStatusCD
=
Column
(
String
(
2
))
listDate
=
Column
(
DateTime
)
delistDate
=
Column
(
DateTime
)
equTypeCD
=
Column
(
String
(
4
))
equType
=
Column
(
String
(
10
))
exCountryCD
=
Column
(
String
(
3
))
partyID
=
Column
(
BigInteger
)
totalShares
=
Column
(
Float
(
53
))
nonrestFloatShares
=
Column
(
Float
(
53
))
nonrestfloatA
=
Column
(
Float
(
53
))
officeAddr
=
Column
(
Text
)
primeOperating
=
Column
(
Text
)
endDate
=
Column
(
DateTime
)
TShEquity
=
Column
(
Float
(
53
))
code
=
Column
(
Integer
,
primary_key
=
True
,
unique
=
True
)
class
SpecialTreatment
(
Base
):
__tablename__
=
'special_treatment'
__table_args__
=
(
Index
(
'special_treament_pk'
,
'trade_date'
,
'portfolio_name'
,
'code'
,
'treatment'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
treatment
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
comment
=
Column
(
Text
)
weight
=
Column
(
Float
(
53
))
class
SpecificReturn
(
Base
):
__tablename__
=
'specific_return'
__table_args__
=
(
Index
(
'specific_return_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
spret
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
SpecificRiskDay
(
Base
):
__tablename__
=
'specific_risk_day'
__table_args__
=
(
Index
(
'specific_risk_day_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
SRISK
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
FullFactorView
(
Base
):
__tablename__
=
'
full_factor_view
'
class
SpecificRiskLong
(
Base
):
__tablename__
=
'
specific_risk_long
'
__table_args__
=
(
Index
(
'
factor_pk
'
,
'trade_date'
,
'code'
,
unique
=
True
),
Index
(
'
specific_risk_long_Date_Code_uindex
'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
secShortName
=
Column
(
String
(
10
))
exchangeCD
=
Column
(
String
(
4
))
preClosePrice
=
Column
(
Float
(
53
))
actPreClosePrice
=
Column
(
Float
(
53
))
openPrice
=
Column
(
Float
(
53
))
highestPrice
=
Column
(
Float
(
53
))
lowestPrice
=
Column
(
Float
(
53
))
closePrice
=
Column
(
Float
(
53
))
turnoverVol
=
Column
(
BigInteger
)
turnoverValue
=
Column
(
Float
(
53
))
dealAmount
=
Column
(
BigInteger
)
turnoverRate
=
Column
(
Float
(
53
))
accumAdjFactor
=
Column
(
Float
(
53
))
negMarketValue
=
Column
(
Float
(
53
))
marketValue
=
Column
(
Float
(
53
))
chgPct
=
Column
(
Float
(
53
))
isOpen
=
Column
(
Integer
)
vwap
=
Column
(
Float
(
53
))
secShortName
=
Column
(
String
(
20
))
updateTime
=
Column
(
DateTime
)
SRISK
=
Column
(
Float
(
53
))
class
SpecificRiskShort
(
Base
):
__tablename__
=
'specific_risk_short'
__table_args__
=
(
Index
(
'specific_risk_short_Date_Code_uindex'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
exchangeCD
=
Column
(
String
(
4
))
secShortName
=
Column
(
String
(
20
))
SRISK
=
Column
(
Float
(
53
))
updateTime
=
Column
(
DateTime
)
class
Strategy
(
Base
):
__tablename__
=
'strategy'
__table_args__
=
(
Index
(
'strategy_idx'
,
'trade_date'
,
'strategyName'
,
'factor'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
strategyName
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
factor
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
weight
=
Column
(
Float
(
53
))
source
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
class
Tiny
(
Base
):
__tablename__
=
'tiny'
__table_args__
=
(
Index
(
'tiny_idx'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
CFinc1
=
Column
(
Float
(
53
))
BDTO
=
Column
(
Float
(
53
))
RVOL
=
Column
(
Float
(
53
))
CHV
=
Column
(
Float
(
53
))
VAL
=
Column
(
Float
(
53
))
EPSAfterNonRecurring
=
Column
(
Float
(
53
))
DivP
=
Column
(
Float
(
53
))
class
Universe
(
Base
):
__tablename__
=
'universe'
__table_args__
=
(
Index
(
'universe_idx'
,
'trade_date'
,
'universe'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
universe
=
Column
(
String
(
20
),
primary_key
=
True
,
nullable
=
False
)
class
Uqer
(
Base
):
__tablename__
=
'uqer'
__table_args__
=
(
Index
(
'uqer_idx'
,
'trade_date'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
Integer
,
primary_key
=
True
,
nullable
=
False
)
AccountsPayablesTDays
=
Column
(
Float
(
53
))
AccountsPayablesTRate
=
Column
(
Float
(
53
))
AdminiExpenseRate
=
Column
(
Float
(
53
))
...
...
@@ -1574,174 +1733,10 @@ class FullFactorView(Base):
STOQ
=
Column
(
Float
(
53
))
STOA
=
Column
(
Float
(
53
))
NLSIZE
=
Column
(
Float
(
53
))
ROEAfterNonRecurring
=
Column
(
Float
(
53
))
EPSAfterNonRecurring
=
Column
(
Float
(
53
))
EODPrice
=
Column
(
Float
(
53
))
LogFloatCap
=
Column
(
Float
(
53
))
BPS
=
Column
(
Float
(
53
))
SPS
=
Column
(
Float
(
53
))
DebtToAsset
=
Column
(
Float
(
53
))
DROEAfterNonRecurring
=
Column
(
Float
(
53
))
LogTotalCap
=
Column
(
Float
(
53
))
BP
=
Column
(
Float
(
53
))
SP
=
Column
(
Float
(
53
))
EPAfterNonRecurring
=
Column
(
Float
(
53
))
DivToB
=
Column
(
Float
(
53
))
DivP
=
Column
(
Float
(
53
))
EBITToSales
=
Column
(
Float
(
53
))
EBITAToSales
=
Column
(
Float
(
53
))
EVToSales
=
Column
(
Float
(
53
))
EVToEBIT
=
Column
(
Float
(
53
))
EVToEBITDA
=
Column
(
Float
(
53
))
EVToNOPLAT
=
Column
(
Float
(
53
))
EVToIC
=
Column
(
Float
(
53
))
FCFFPS
=
Column
(
Float
(
53
))
FCFFToEarningAfterNonRecurring
=
Column
(
Float
(
53
))
FCFFP
=
Column
(
Float
(
53
))
ProfitToAsset
=
Column
(
Float
(
53
))
GrossProfitRatio
=
Column
(
Float
(
53
))
LATO
=
Column
(
Float
(
53
))
FATO
=
Column
(
Float
(
53
))
TATO
=
Column
(
Float
(
53
))
EquityTO
=
Column
(
Float
(
53
))
PayableTO
=
Column
(
Float
(
53
))
RecievableTO
=
Column
(
Float
(
53
))
RevenueGrowth
=
Column
(
Float
(
53
))
GrossProfitGrowth
=
Column
(
Float
(
53
))
NetProfitGrowth
=
Column
(
Float
(
53
))
GrossCFToRevenue
=
Column
(
Float
(
53
))
CFToRevenue
=
Column
(
Float
(
53
))
CFToProfit
=
Column
(
Float
(
53
))
CFToAsset
=
Column
(
Float
(
53
))
GrossCFGrowth
=
Column
(
Float
(
53
))
CFGrowth
=
Column
(
Float
(
53
))
ICFGrowth
=
Column
(
Float
(
53
))
AveAmount60
=
Column
(
Float
(
53
))
PeriodReturn60
=
Column
(
Float
(
53
))
AmountRatio60to250
=
Column
(
Float
(
53
))
CFPS
=
Column
(
Float
(
53
))
CFP
=
Column
(
Float
(
53
))
NetCFGrowth
=
Column
(
Float
(
53
))
NetCFGrowthP
=
Column
(
Float
(
53
))
NetCash
=
Column
(
Float
(
53
))
NetCashP
=
Column
(
Float
(
53
))
BVPSGrowth
=
Column
(
Float
(
53
))
EquityPSGrowth
=
Column
(
Float
(
53
))
WholeSales
=
Column
(
Float
(
53
))
WholeProfitAfterNonRecurring
=
Column
(
Float
(
53
))
ExpenseRatio
=
Column
(
Float
(
53
))
AcidTestRatio
=
Column
(
Float
(
53
))
TimeInterestEarnedRatio
=
Column
(
Float
(
53
))
DepositReceivedVsSale
=
Column
(
Float
(
53
))
DebtRatioExcemptDepRec
=
Column
(
Float
(
53
))
SNBARatio
=
Column
(
Float
(
53
))
CFinc1
=
Column
(
Float
(
53
))
BDTO
=
Column
(
Float
(
53
))
RVOL
=
Column
(
Float
(
53
))
CHV
=
Column
(
Float
(
53
))
VAL
=
Column
(
Float
(
53
))
BETA
=
Column
(
Float
(
53
))
MOMENTUM
=
Column
(
Float
(
53
))
SIZE
=
Column
(
Float
(
53
))
EARNYILD
=
Column
(
Float
(
53
))
RESVOL
=
Column
(
Float
(
53
))
GROWTH
=
Column
(
Float
(
53
))
BTOP
=
Column
(
Float
(
53
))
LEVERAGE
=
Column
(
Float
(
53
))
LIQUIDTY
=
Column
(
Float
(
53
))
SIZENL
=
Column
(
Float
(
53
))
Bank
=
Column
(
BigInteger
)
RealEstate
=
Column
(
BigInteger
)
Health
=
Column
(
BigInteger
)
Transportation
=
Column
(
BigInteger
)
Mining
=
Column
(
BigInteger
)
NonFerMetal
=
Column
(
BigInteger
)
HouseApp
=
Column
(
BigInteger
)
LeiService
=
Column
(
BigInteger
)
MachiEquip
=
Column
(
BigInteger
)
BuildDeco
=
Column
(
BigInteger
)
CommeTrade
=
Column
(
BigInteger
)
CONMAT
=
Column
(
BigInteger
)
Auto
=
Column
(
BigInteger
)
Textile
=
Column
(
BigInteger
)
FoodBever
=
Column
(
BigInteger
)
Electronics
=
Column
(
BigInteger
)
Computer
=
Column
(
BigInteger
)
LightIndus
=
Column
(
BigInteger
)
Utilities
=
Column
(
BigInteger
)
Telecom
=
Column
(
BigInteger
)
AgriForest
=
Column
(
BigInteger
)
CHEM
=
Column
(
BigInteger
)
Media
=
Column
(
BigInteger
)
IronSteel
=
Column
(
BigInteger
)
NonBankFinan
=
Column
(
BigInteger
)
ELECEQP
=
Column
(
BigInteger
)
AERODEF
=
Column
(
BigInteger
)
Conglomerates
=
Column
(
BigInteger
)
COUNTRY
=
Column
(
BigInteger
)
d_srisk
=
Column
(
Float
(
53
))
s_srisk
=
Column
(
Float
(
53
))
l_srisk
=
Column
(
Float
(
53
))
class
Models
(
Base
):
__tablename__
=
'models'
__table_args__
=
(
Index
(
'model_pk'
,
'trade_date'
,
'model_type'
,
'model_version'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
model_type
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
model_version
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
update_time
=
Column
(
DateTime
,
nullable
=
False
)
model_desc
=
Column
(
JSON
,
nullable
=
False
)
class
DailyPortfolios
(
Base
):
__tablename__
=
'daily_portfolios'
__table_args__
=
(
Index
(
'daily_portfolios_pk'
,
'trade_date'
,
'portfolio_name'
,
'code'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
weight
=
Column
(
Float
(
53
),
nullable
=
False
)
er
=
Column
(
Float
(
53
),
nullable
=
False
)
industry
=
Column
(
String
(
50
),
nullable
=
False
)
benchmark_weight
=
Column
(
Float
(
53
),
nullable
=
False
)
is_tradable
=
Column
(
Boolean
,
nullable
=
False
)
class
PortfolioSettings
(
Base
):
__tablename__
=
'portfolio_settings'
__table_args__
=
(
Index
(
'portfolio_pk'
,
'trade_date'
,
'portfolio_name'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
model_type
=
Column
(
String
(
30
),
nullable
=
False
)
model_date
=
Column
(
DateTime
,
nullable
=
False
)
model_version
=
Column
(
BigInteger
,
nullable
=
False
)
class
SpecialTreatment
(
Base
):
__tablename__
=
'special_treatment'
__table_args__
=
(
Index
(
'special_treament_pk'
,
'trade_date'
,
'portfolio_name'
,
'code'
,
'treatment'
,
unique
=
True
),
)
trade_date
=
Column
(
DateTime
,
primary_key
=
True
,
nullable
=
False
)
portfolio_name
=
Column
(
String
(
50
),
primary_key
=
True
,
nullable
=
False
)
code
=
Column
(
BigInteger
,
primary_key
=
True
,
nullable
=
False
)
treatment
=
Column
(
String
(
30
),
primary_key
=
True
,
nullable
=
False
)
comment
=
Column
(
Text
)
weight
=
Column
(
Float
(
53
))
if
__name__
==
'__main__'
:
from
sqlalchemy
import
create_engine
engine
=
create_engine
(
'postgresql+psycopg2://postgres:
A12345678!@10.63.6.220
/alpha'
)
engine
=
create_engine
(
'postgresql+psycopg2://postgres:
we083826@192.168.0.102
/alpha'
)
Base
.
metadata
.
create_all
(
engine
)
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