import sys
sys.path.insert(0, 'D:/Project/益盟/回测框架/KYBT/util')
from kySDK import *
"""
print(getMostRecentTradingDayFromKy())


itemString = '''SecuCode,
SecuAbbr,SecuMarket,TradeDate,TradeStatus,PreClosePrice,
OpenPrice,ClosePrice,HighPrice,LowPrice,TurnoverVolume,TurnoverValue,TurnoverDeals,Amplitude,ChangeRatio,
FlowShares,FlowMarketValue,TotalEquity,IssueEquity,TotalValue,RecordID,RiseOrDown'''

index = 'SHSE.000016'
index  = 'SHSE.000001'

stockPool = tuple(stockCode[-6:] for stockCode in getIndexPoolFromKy(index))

query = '''
SELECT %s
    
FROM
    [dbo].[EM_QUOTE_STOCK_DAILY]
WHERE
TradeDate = '%s 00:00:00.000'
AND
SecuCode IN %s
'''%(itemString,getMostRecentTradingDayFromKy(),stockPool)

print(query)
"""

def myfun(x):
    print(sum(x))

myfun([1,2,3])

class myclass():
    a = 1
    def myfunc(self):
        print(self.a)

c = myclass()
c.myfunc()


