init
This commit is contained in:
@@ -527,11 +527,11 @@ class AnalyzerSqlite:
|
||||
if len(stock_daily['volume']) < c_index:
|
||||
c_index = len(stock_daily['volume'])
|
||||
avg = sum(stock_daily['volume'][1:c_index]) / len(stock_daily['volume'][1:c_index])
|
||||
if avg + avg/2 < stock_daily['volume'][0]:
|
||||
if 0 < avg + avg/2 and avg + avg/2 < stock_daily['volume'][0]:
|
||||
dir_code = "13"
|
||||
dir_name = "daily_이전에_없던_거래량"
|
||||
final_status_count += 1
|
||||
status = "{:.2f}".format(stock_daily['volume'][0]/avg + avg/2)
|
||||
status = "{:.2f}".format(stock_daily['volume'][0]/(avg + avg/2))
|
||||
self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_daily, status)
|
||||
|
||||
# daily_이격도
|
||||
@@ -942,9 +942,9 @@ if __name__ == "__main__":
|
||||
stockFileName = os.path.join(RESOURCE_PATH, 'stock.db')
|
||||
analyzer = AnalyzerSqlite(stockFileName)
|
||||
|
||||
analyzer.analyzeDaily()
|
||||
analyzer.analyzeGrouping("weekly")
|
||||
analyzer.analyzeGrouping("monthly")
|
||||
#analyzer.analyzeDaily()
|
||||
#analyzer.analyzeGrouping("weekly")
|
||||
#analyzer.analyzeGrouping("monthly")
|
||||
|
||||
# HTML 출력
|
||||
outPath = os.path.join(PROJECT_HOME, "resources", "analysis")
|
||||
|
||||
Reference in New Issue
Block a user