init
This commit is contained in:
@@ -493,6 +493,7 @@ class AnalyzerSqlite:
|
|||||||
CODE = item[0]
|
CODE = item[0]
|
||||||
NAME = item[1]
|
NAME = item[1]
|
||||||
print (idx, CODE, NAME)
|
print (idx, CODE, NAME)
|
||||||
|
print("Analysis # :", idx, ", CODE: ", CODE, ", NAME: ", NAME)
|
||||||
|
|
||||||
top = "0"
|
top = "0"
|
||||||
if CODE in self.top500:
|
if CODE in self.top500:
|
||||||
@@ -854,8 +855,7 @@ class AnalyzerSqlite:
|
|||||||
|
|
||||||
sorted_stock = sorted(stock["PRICE"], key=lambda x: x['ymd'], reverse=True)
|
sorted_stock = sorted(stock["PRICE"], key=lambda x: x['ymd'], reverse=True)
|
||||||
for price in sorted_stock:
|
for price in sorted_stock:
|
||||||
cursor.execute('SELECT * FROM ' + stockAnalysisTableName + ' WHERE CODE=? and ymd=?',
|
cursor.execute('SELECT * FROM ' + stockAnalysisTableName + ' WHERE CODE=? and ymd=?', (stock['CODE'], price['ymd'],))
|
||||||
(stock['CODE'], price['ymd'],))
|
|
||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
if result == None:
|
if result == None:
|
||||||
sql = "INSERT INTO " + stockAnalysisTableName + "(CODE, NAME, ymd, avg5, avg10, avg20, avg60, avg120, avg200, avg240, "
|
sql = "INSERT INTO " + stockAnalysisTableName + "(CODE, NAME, ymd, avg5, avg10, avg20, avg60, avg120, avg200, avg240, "
|
||||||
@@ -891,7 +891,7 @@ class AnalyzerSqlite:
|
|||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
|
||||||
stock = {"CODE": item[0], "NAME": item[1], "PRICE":[]}
|
stock = {"CODE": item[0], "NAME": item[1], "PRICE":[]}
|
||||||
print("# :", rowid, ", CODE: ", stock['CODE'], ", NAME: ", stock['NAME'])
|
print("Daily # :", rowid, ", CODE: ", stock['CODE'], ", NAME: ", stock['NAME'])
|
||||||
|
|
||||||
sql = 'SELECT ymd, close, diff, open, high, low, volume FROM ' + stockTableName + ' where CODE=? order by ymd desc '
|
sql = 'SELECT ymd, close, diff, open, high, low, volume FROM ' + stockTableName + ' where CODE=? order by ymd desc '
|
||||||
#if result is not None:
|
#if result is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user