analyser_hj3415 2.5.4__py2.py3-none-any.whl → 2.5.6__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- analyser_hj3415/analysers/eval.py +1 -1
- analyser_hj3415/analysers/score.py +1 -1
- analyser_hj3415/cli.py +17 -2
- {analyser_hj3415-2.5.4.dist-info → analyser_hj3415-2.5.6.dist-info}/METADATA +1 -1
- {analyser_hj3415-2.5.4.dist-info → analyser_hj3415-2.5.6.dist-info}/RECORD +8 -8
- {analyser_hj3415-2.5.4.dist-info → analyser_hj3415-2.5.6.dist-info}/LICENSE +0 -0
- {analyser_hj3415-2.5.4.dist-info → analyser_hj3415-2.5.6.dist-info}/WHEEL +0 -0
- {analyser_hj3415-2.5.4.dist-info → analyser_hj3415-2.5.6.dist-info}/entry_points.txt +0 -0
@@ -42,7 +42,7 @@ def red(code: str) -> dict:
|
|
42
42
|
|
43
43
|
# 사업가치 계산 - 지배주주지분 당기순이익 / 기대수익률
|
44
44
|
from analyser_hj3415 import cli
|
45
|
-
EXPECT_EARN = cli.AnalyserSettingsManager(cli.SETTINGS_FILE).get_value('EXPECT_EARN')
|
45
|
+
EXPECT_EARN = utils.to_float(cli.AnalyserSettingsManager(cli.SETTINGS_FILE).get_value('EXPECT_EARN'))
|
46
46
|
사업가치 = round(utils.nan_to_zero(지배주주당기순이익) / EXPECT_EARN, 2)
|
47
47
|
|
48
48
|
# 재산가치 계산 - 유동자산 - (유동부채*1.2) + 고정자산중 투자자산
|
@@ -94,7 +94,7 @@ def mil(code: str) -> Tuple[int, int, int, int]:
|
|
94
94
|
score1 = 0
|
95
95
|
else:
|
96
96
|
from analyser_hj3415 import cli
|
97
|
-
EXPECT_EARN = cli.AnalyserSettingsManager(cli.SETTINGS_FILE).get_value('EXPECT_EARN')
|
97
|
+
EXPECT_EARN = utils.to_float(cli.AnalyserSettingsManager(cli.SETTINGS_FILE).get_value('EXPECT_EARN'))
|
98
98
|
주주수익률평가 = math.ceil(mil_dict['주주수익률'] - (EXPECT_EARN * 100))
|
99
99
|
score1 = 0 if 0 > 주주수익률평가 else 주주수익률평가
|
100
100
|
|
analyser_hj3415/cli.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3
3
|
|
4
4
|
from utils_hj3415 import noti, utils
|
5
5
|
from utils_hj3415.utils import SettingsManager
|
6
|
-
from analyser_hj3415.myredis import red_ranking, mil_n_score
|
6
|
+
from analyser_hj3415.myredis import red_ranking, mil_n_score, red_n_score
|
7
7
|
from db_hj3415 import myredis
|
8
8
|
|
9
9
|
|
@@ -45,6 +45,10 @@ def analyser_manager():
|
|
45
45
|
# red - ranking 파서
|
46
46
|
ranking_parser = red_subparser.add_parser('ranking', help='red 랭킹 책정 및 레디스 저장')
|
47
47
|
ranking_parser.add_argument('--noti', action='store_true', help='작업 완료 후 메시지 전송 여부')
|
48
|
+
# mil - score 파서
|
49
|
+
score_parser = red_subparser.add_parser('score', help='red score 책정 및 레디스 저장')
|
50
|
+
score_parser.add_argument('code', type=str, help='종목코드 or all')
|
51
|
+
score_parser.add_argument('--noti', action='store_true', help='작업 완료 후 메시지 전송 여부')
|
48
52
|
|
49
53
|
# mil 명령어 서브파서
|
50
54
|
mil_parser = type_subparsers.add_parser('mil', help='millennial 타입')
|
@@ -70,7 +74,18 @@ def analyser_manager():
|
|
70
74
|
args = parser.parse_args()
|
71
75
|
|
72
76
|
if args.type == 'red':
|
73
|
-
if args.command == '
|
77
|
+
if args.command == 'score':
|
78
|
+
if args.code == 'all':
|
79
|
+
print("**** red_n_score all code ****")
|
80
|
+
for i, code in enumerate(myredis.Corps.list_all_codes()):
|
81
|
+
print(f'{i} / {code}')
|
82
|
+
red_n_score(code)
|
83
|
+
else:
|
84
|
+
assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
|
85
|
+
print(args.code, red_n_score(args.code))
|
86
|
+
if args.noti:
|
87
|
+
noti.telegram_to('manager', f"오늘의 red and score({args.code})를 레디스캐시에 저장했습니다.(유효 12시간)")
|
88
|
+
elif args.command == 'ranking':
|
74
89
|
result = red_ranking()
|
75
90
|
print(result)
|
76
91
|
if args.noti:
|
@@ -1,14 +1,14 @@
|
|
1
1
|
analyser_hj3415/.DS_Store,sha256=qr9-0FPn5CFKe6kEu8_dWCNhzQ0sN7bwQgffKsaJEEo,6148
|
2
2
|
analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
analyser_hj3415/cli.py,sha256=
|
3
|
+
analyser_hj3415/cli.py,sha256=cXXOZGJjjC9xQrT9-NwgnBbgMDwnpm7hSybAoYcZNAs,5591
|
4
4
|
analyser_hj3415/myredis.py,sha256=T5ESGx1QBrO7mTMlSzqIm975Wks-X9WqrPWVWgFRHUE,10758
|
5
5
|
analyser_hj3415/tools.py,sha256=T7QYJekKvWNlJtiqu_FaiX3FGfDc71NY4vrbEDfBEt0,13705
|
6
6
|
analyser_hj3415/trash.py,sha256=zF-W0piqkGr66UP6-iybo9EXh2gO0RP6R1FnIpsGkl8,12262
|
7
|
-
analyser_hj3415/analysers/eval.py,sha256=
|
7
|
+
analyser_hj3415/analysers/eval.py,sha256=XhGq9hD0jNm53B3FLv--iJkoZP3s2YDb7tEohJ7jhWM,13373
|
8
8
|
analyser_hj3415/analysers/report.py,sha256=yY-AeDHOqDPrm4lpvZv3NPTJK1Z7lKsjoO5ck8AP6u4,9007
|
9
|
-
analyser_hj3415/analysers/score.py,sha256=
|
10
|
-
analyser_hj3415-2.5.
|
11
|
-
analyser_hj3415-2.5.
|
12
|
-
analyser_hj3415-2.5.
|
13
|
-
analyser_hj3415-2.5.
|
14
|
-
analyser_hj3415-2.5.
|
9
|
+
analyser_hj3415/analysers/score.py,sha256=sH79RYTDrBD06tdKADsAd9lAvgFGN7385lLJsE3qy_Q,15998
|
10
|
+
analyser_hj3415-2.5.6.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
|
11
|
+
analyser_hj3415-2.5.6.dist-info/LICENSE,sha256=QVKTp0dTnB5xG8RLgG17LwSWCKNEzYoVVM6KjoCPKc0,1079
|
12
|
+
analyser_hj3415-2.5.6.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
|
13
|
+
analyser_hj3415-2.5.6.dist-info/METADATA,sha256=XXkxKktn5RulkiOpRAtV5SB5RntQklUc2WT_Vf_RtkI,6417
|
14
|
+
analyser_hj3415-2.5.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|