This commit is contained in:
dsyoon
2023-10-16 17:13:28 +09:00
parent 2f3952f137
commit cd440ab59e
2 changed files with 13 additions and 12 deletions

View File

@@ -253,10 +253,10 @@ if __name__ == "__main__":
#"122630": ['20230930'],
#"122630": ['20210901','20210902','20210903','20210906','20231012','20231013']
#"122630": ['20210901', '20210902', '20210903', '20210906', '20210907', '20210908', '20210909', '20210910', '20210913', '20210914', '20210915', '20210916', '20210917', '20210923', '20210924', '20210927', '20210928', '20210929', '20210930', '20211001', '20211005','20231012','20231013'],
"252670": ['20231012', '20231013'],
"251340": ['20231012', '20231013'],
"122630": ['20231012', '20231013'],
"233740": ['20231012', '20231013'],
"233740": ['20231016'],
"252670": ['20231016'],
"251340": ['20231016'],
"122630": ['20231016']
}
#simulation.simulate(stock_codes)
simulation.simulate(stock_codes)

View File

@@ -256,14 +256,15 @@ class BuySellChecker:
if i > 30 and data['macd'][i] < min_macd + (-min_macd * 0.4):
buy, weight = data['close'][i], 1
"""
if stock_code == '252670' or stock_code == '251340':
if data['macd'][i] < -4:
if data['open'][i - 1] < data['close'][i - 1] and data['volume'][i - 1] < data['volume'][i]:
buy, weight = data['close'][i], 1
elif stock_code == '122630' or stock_code == '233740':
if data['macd'][i] < -10:
if data['open'][i - 1] < data['close'][i - 1] and data['volume'][i - 1] < data['volume'][i]:
buy, weight = data['close'][i], 1
if 10 < int(data.index[i].strftime('%H')):
if stock_code == '252670' or stock_code == '251340':
if data['macd'][i] < -4:
if data['open'][i - 1] < data['close'][i - 1] and data['volume'][i - 1] < data['volume'][i]:
buy, weight = data['close'][i], 1
elif stock_code == '122630' or stock_code == '233740':
if data['macd'][i] < -10:
if data['open'][i - 1] < data['close'][i - 1] and data['volume'][i - 1] < data['volume'][i]:
buy, weight = data['close'][i], 1
return buy, weight