diff --git a/hts/BuySellChecker.py b/hts/BuySellChecker.py index 4e61f30..012db8d 100644 --- a/hts/BuySellChecker.py +++ b/hts/BuySellChecker.py @@ -228,12 +228,13 @@ class BuySellChecker: ################### ### RSI buy 분석 ### ################### - if data["rsi"][i - 1] < data["rsis"][i - 1] and data["rsis"][i] < data["rsi"][i]: - if data["Close"][i] < data["avg5"][i]: - buy = data["Close"][i] - else: - buy = data["Low"][i] - weight = 2 + if data["rsi"][i] < 20: + if data["rsi"][i - 1] < data["rsis"][i - 1] and data["rsis"][i] < data["rsi"][i]: + if data["Close"][i] < data["avg5"][i]: + buy = data["Close"][i] + else: + buy = data["Low"][i] + weight = 1 return buy, weight, sell diff --git a/hts/Simulation.py b/hts/Simulation.py index c0ee678..8269abd 100644 --- a/hts/Simulation.py +++ b/hts/Simulation.py @@ -166,7 +166,7 @@ if __name__ == "__main__": stock_codes = ["252670", "122630"] given_days = ['20210901','20210902','20210903','20210906','20210907','20210908','20210909','20210910','20210913', '20210914','20210915','20210916','20210917','20210923','20210924','20210927','20210928','20210929', - '20210930','20211001', '20211005','20211006', '20211007','20211008', '20211012','20211013', '20211014'] + '20210930','20211001', '20211005','20211006', '20211007','20211008', '20211012','20211013', '20211014', '20211018'] simulation = Simulation() given_days = sorted(given_days, reverse=True)