analyser_hj3415 2.10.2__py3-none-any.whl → 2.10.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- analyser_hj3415/score.py +20 -18
- {analyser_hj3415-2.10.2.dist-info → analyser_hj3415-2.10.3.dist-info}/METADATA +1 -1
- {analyser_hj3415-2.10.2.dist-info → analyser_hj3415-2.10.3.dist-info}/RECORD +5 -5
- {analyser_hj3415-2.10.2.dist-info → analyser_hj3415-2.10.3.dist-info}/WHEEL +0 -0
- {analyser_hj3415-2.10.2.dist-info → analyser_hj3415-2.10.3.dist-info}/entry_points.txt +0 -0
analyser_hj3415/score.py
CHANGED
@@ -83,40 +83,22 @@ class Score:
|
|
83
83
|
else:
|
84
84
|
is_update_c108 = is_within_last_three_days(c108_recent_date.date())
|
85
85
|
|
86
|
-
score_logger.info("Dart 최근 데이터 추출중..")
|
87
|
-
# dart가 최근에 업데이트 되었는지...
|
88
|
-
dart_recent_date = self.dart.get_recent_date()
|
89
|
-
# print('code - ', code, ' | dart recent date - ', dart_recent_date.date())
|
90
|
-
if dart_recent_date is None:
|
91
|
-
is_update_dart = False
|
92
|
-
else:
|
93
|
-
is_update_dart = is_within_last_three_days(dart_recent_date.date())
|
94
|
-
|
95
86
|
score_logger.info("Red score 계산중..")
|
96
87
|
red_score = self.red.get(verbose=False).score
|
97
88
|
|
98
89
|
score_logger.info("Mil data 계산중..")
|
99
90
|
mil_data = self.mil.get(verbose=False)
|
100
91
|
|
101
|
-
score_logger.info("Lstm 최근 데이터 조회중..")
|
102
|
-
if myredis.Base.exists(f'{self.code}_mylstm_predictions'):
|
103
|
-
is_lstm_up = self.lstm.is_up()
|
104
|
-
else:
|
105
|
-
is_lstm_up = None
|
106
|
-
|
107
92
|
score_logger.info("\tProphet 최근 데이터 조회중..")
|
108
93
|
prophet_score = self.prophet.scoring()
|
109
94
|
|
110
95
|
return {
|
111
|
-
'code': self.code,
|
112
96
|
'name': self.name,
|
113
97
|
'시가총액': 시가총액,
|
114
98
|
'is_update_c108': is_update_c108,
|
115
|
-
'is_update_dart': is_update_dart,
|
116
99
|
'red_score': red_score,
|
117
100
|
'이익지표': mil_data.이익지표,
|
118
101
|
'주주수익률': mil_data.주주수익률,
|
119
|
-
'is_lstm_up': is_lstm_up,
|
120
102
|
'prophet_score': prophet_score,
|
121
103
|
}
|
122
104
|
data_dict = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_score, timer=expire_time_h * 3600)
|
@@ -124,6 +106,26 @@ class Score:
|
|
124
106
|
|
125
107
|
@classmethod
|
126
108
|
def ranking(self, refresh=False, expire_time_h=24, top='all') -> OrderedDict:
|
109
|
+
"""
|
110
|
+
prophet score 기준으로 정렬하여 ordered dict로 반환함
|
111
|
+
|
112
|
+
Parameters:
|
113
|
+
refresh (bool): Specifies whether to refresh the ranking data. Defaults
|
114
|
+
to `False`.
|
115
|
+
expire_time_h (int): Time in hours after which the cached data should
|
116
|
+
expire. Defaults to `24` hours.
|
117
|
+
top (Union[str, int]): Determines how many top rankings to return.
|
118
|
+
Defaults to `'all'`. If an integer is provided, it limits the
|
119
|
+
ranking to the specified count.
|
120
|
+
|
121
|
+
Returns:
|
122
|
+
OrderedDict: A dictionary containing the rankings, sorted in
|
123
|
+
descending order by `prophet_score`.
|
124
|
+
|
125
|
+
Raises:
|
126
|
+
ValueError: Raised if the parameter `top` is neither `'all'` nor an
|
127
|
+
integer.
|
128
|
+
"""
|
127
129
|
print("**** Start score_ranking... ****")
|
128
130
|
redis_name = 'score_ranking'
|
129
131
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
analyser_hj3415/cli.py,sha256=eRaFtkioooe2Rgzq5J3Lxd2oX17OnIwDZPo2msutjM0,12497
|
3
3
|
analyser_hj3415/eval.py,sha256=9rWNTa3vbUnegOfpfVtWLXmt8cxU2zWZD5yEsFlfTzQ,38796
|
4
|
-
analyser_hj3415/score.py,sha256=
|
4
|
+
analyser_hj3415/score.py,sha256=YG5SmovRUxne0lzqftlb3zesxRZZD54nLe7sZWxws5Y,6379
|
5
5
|
analyser_hj3415/tsa.py,sha256=X62ypwSWRMAAU72IJoBdEeyU8rVaaMRqZ3XsslziBfM,28111
|
6
6
|
analyser_hj3415/workroom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
analyser_hj3415/workroom/mysklearn.py,sha256=wJXKz5MqqTzADdG2mqRMMzc_G9RzwYjj5_j4gyOopxQ,2030
|
8
8
|
analyser_hj3415/workroom/mysklearn2.py,sha256=1lIy6EWEQHkOzDS-av8U0zQH6DuCLKWMI73dnJx5KRs,1495
|
9
9
|
analyser_hj3415/workroom/score.py,sha256=P6nHBJYmyhigGtT4qna4BmNtvt4B93b7SKyzdstJK24,17376
|
10
10
|
analyser_hj3415/workroom/trash.py,sha256=zF-W0piqkGr66UP6-iybo9EXh2gO0RP6R1FnIpsGkl8,12262
|
11
|
-
analyser_hj3415-2.10.
|
12
|
-
analyser_hj3415-2.10.
|
13
|
-
analyser_hj3415-2.10.
|
14
|
-
analyser_hj3415-2.10.
|
11
|
+
analyser_hj3415-2.10.3.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
|
12
|
+
analyser_hj3415-2.10.3.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
13
|
+
analyser_hj3415-2.10.3.dist-info/METADATA,sha256=M9hC2Wu9HrNES0QvJND1rRnrmCNZ08OYAO0KgGUlJtM,6777
|
14
|
+
analyser_hj3415-2.10.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|