analyser_hj3415 4.2.5__py3-none-any.whl → 4.2.7__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/__init__.py +0 -8
- analyser_hj3415/analyser/eval/blue.py +3 -6
- analyser_hj3415/analyser/eval/growth.py +3 -5
- analyser_hj3415/analyser/eval/mil.py +3 -6
- analyser_hj3415/analyser/eval/red.py +2 -5
- analyser_hj3415/analyser/tsa/common.py +2 -3
- analyser_hj3415/analyser/tsa/lstm.py +5 -8
- analyser_hj3415/analyser/tsa/prophet.py +5 -8
- {analyser_hj3415-4.2.5.dist-info → analyser_hj3415-4.2.7.dist-info}/METADATA +3 -3
- analyser_hj3415-4.2.7.dist-info/RECORD +17 -0
- analyser_hj3415-4.2.5.dist-info/RECORD +0 -17
- {analyser_hj3415-4.2.5.dist-info → analyser_hj3415-4.2.7.dist-info}/WHEEL +0 -0
- {analyser_hj3415-4.2.5.dist-info → analyser_hj3415-4.2.7.dist-info}/entry_points.txt +0 -0
analyser_hj3415/__init__.py
CHANGED
@@ -1,8 +0,0 @@
|
|
1
|
-
from dotenv import load_dotenv
|
2
|
-
from utils_hj3415.tools import get_env_path
|
3
|
-
from utils_hj3415.logger import mylogger
|
4
|
-
|
5
|
-
env_path = get_env_path()
|
6
|
-
if env_path is None:
|
7
|
-
mylogger.warning(f"환경변수 파일(.env)를 찾을수 없습니다. 기본 설정값으로 프로그램을 실행합니다.")
|
8
|
-
load_dotenv(env_path)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
from dataclasses import dataclass
|
3
2
|
from typing import Tuple
|
4
3
|
import math
|
@@ -9,9 +8,7 @@ from db_hj3415 import myredis
|
|
9
8
|
from analyser_hj3415.analyser.eval.common import Tools
|
10
9
|
|
11
10
|
|
12
|
-
mylogger = setup_logger(__name__,'
|
13
|
-
expire_time = tools.to_int(os.getenv('DEFAULT_EXPIRE_TIME_H', 48)) * 3600
|
14
|
-
|
11
|
+
mylogger = setup_logger(__name__,'WARNING')
|
15
12
|
|
16
13
|
@dataclass()
|
17
14
|
class BlueData:
|
@@ -246,9 +243,9 @@ class Blue:
|
|
246
243
|
- 캐시 검색 상태와 새로 생성된 데이터를 출력합니다.
|
247
244
|
"""
|
248
245
|
redis_name = f"{self.code}_blue"
|
249
|
-
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}
|
246
|
+
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}")
|
250
247
|
|
251
248
|
def fetch_generate_data(refresh_in: bool) -> dict:
|
252
249
|
return self._generate_data(refresh_in) # type: ignore
|
253
250
|
|
254
|
-
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh
|
251
|
+
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
from dataclasses import dataclass
|
3
2
|
|
4
3
|
from utils_hj3415 import tools, setup_logger
|
@@ -7,8 +6,7 @@ from db_hj3415 import myredis
|
|
7
6
|
from analyser_hj3415.analyser.eval.common import Tools
|
8
7
|
|
9
8
|
|
10
|
-
mylogger = setup_logger(__name__,'
|
11
|
-
expire_time = tools.to_int(os.getenv('DEFAULT_EXPIRE_TIME_H', 48)) * 3600
|
9
|
+
mylogger = setup_logger(__name__,'WARNING')
|
12
10
|
|
13
11
|
|
14
12
|
@dataclass()
|
@@ -172,9 +170,9 @@ class Growth:
|
|
172
170
|
"""
|
173
171
|
|
174
172
|
redis_name = f"{self.code}_growth"
|
175
|
-
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}
|
173
|
+
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}")
|
176
174
|
|
177
175
|
def fetch_generate_data(refresh_in: bool) -> dict:
|
178
176
|
return self._generate_data(refresh_in) # type: ignore
|
179
177
|
|
180
|
-
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh
|
178
|
+
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
from dataclasses import dataclass
|
3
2
|
from typing import Tuple, List, Dict
|
4
3
|
import math
|
@@ -8,9 +7,7 @@ from db_hj3415 import myredis, mymongo
|
|
8
7
|
|
9
8
|
from analyser_hj3415.analyser.eval.common import Tools
|
10
9
|
|
11
|
-
mylogger = setup_logger(__name__,'
|
12
|
-
expire_time = tools.to_int(os.getenv('DEFAULT_EXPIRE_TIME_H', 48)) * 3600
|
13
|
-
|
10
|
+
mylogger = setup_logger(__name__,'WARNING')
|
14
11
|
|
15
12
|
@dataclass
|
16
13
|
class MilData:
|
@@ -367,12 +364,12 @@ class Mil:
|
|
367
364
|
- 캐시 검색 상태와 새로 생성된 데이터를 출력합니다.
|
368
365
|
"""
|
369
366
|
redis_name = f"{self.code}_{self.REDIS_MIL_DATA_SUFFIX}"
|
370
|
-
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}
|
367
|
+
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}")
|
371
368
|
|
372
369
|
def fetch_generate_data(refresh_in: bool) -> dict:
|
373
370
|
return self._generate_data(refresh_in) # type: ignore
|
374
371
|
|
375
|
-
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh
|
372
|
+
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh)
|
376
373
|
|
377
374
|
@classmethod
|
378
375
|
def bulk_get_data(cls, codes: List[str], refresh: bool) -> Dict[str, MilData]:
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
from collections import OrderedDict
|
3
2
|
from dataclasses import dataclass
|
4
3
|
from typing import Tuple, Dict, List
|
@@ -9,9 +8,7 @@ from db_hj3415 import myredis
|
|
9
8
|
|
10
9
|
from analyser_hj3415.analyser.eval.common import Tools
|
11
10
|
|
12
|
-
|
13
11
|
mylogger = setup_logger(__name__,'INFO')
|
14
|
-
expire_time = tools.to_int(os.getenv('DEFAULT_EXPIRE_TIME_H', 48)) * 3600
|
15
12
|
|
16
13
|
|
17
14
|
@dataclass
|
@@ -269,12 +266,12 @@ class Red:
|
|
269
266
|
def get(self, refresh = False) -> RedData:
|
270
267
|
mylogger.debug(f"*** Get red data ***")
|
271
268
|
redis_name = f"{self.code}_{self.REDIS_RED_DATA_SUFFIX}_{self.expect_earn}"
|
272
|
-
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}
|
269
|
+
mylogger.debug(f"{self} redisname: '{redis_name}' / refresh : {refresh}")
|
273
270
|
|
274
271
|
def fetch_generate_data(refresh_in: bool) -> RedData:
|
275
272
|
return self._generate_data(refresh_in) # type: ignore
|
276
273
|
|
277
|
-
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh
|
274
|
+
return myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_data, refresh)
|
278
275
|
|
279
276
|
@classmethod
|
280
277
|
def bulk_get_data(cls, codes: List[str], expect_earn: float, refresh: bool) -> Dict[str, RedData]:
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import numpy as np
|
2
2
|
from dataclasses import dataclass, field
|
3
|
-
from typing import
|
3
|
+
from typing import Optional
|
4
4
|
import pandas as pd
|
5
|
-
from marshmallow import fields
|
6
|
-
from marshmallow_dataclass import class_schema
|
5
|
+
from marshmallow import fields
|
7
6
|
|
8
7
|
|
9
8
|
def is_up_by_OLS(data: dict) -> bool:
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import os
|
2
1
|
import numpy as np
|
3
2
|
import yfinance as yf
|
4
3
|
from datetime import datetime, timedelta
|
@@ -18,8 +17,7 @@ from db_hj3415 import myredis
|
|
18
17
|
from analyser_hj3415.analyser import MIs, tsa
|
19
18
|
from analyser_hj3415.analyser.tsa.common import PandasTimestampField, ChartPoint
|
20
19
|
|
21
|
-
mylogger = setup_logger(__name__,'
|
22
|
-
expire_time = tools.to_int(os.getenv('DEFAULT_EXPIRE_TIME_H', 48)) * 3600
|
20
|
+
mylogger = setup_logger(__name__,'WARNING')
|
23
21
|
|
24
22
|
|
25
23
|
@dataclass
|
@@ -433,7 +431,7 @@ class MyLSTM:
|
|
433
431
|
redis_name = f'{self.ticker}_mylstm_predictions'
|
434
432
|
|
435
433
|
mylogger.info(
|
436
|
-
f"redisname: '{redis_name}' / refresh : {refresh}
|
434
|
+
f"redisname: '{redis_name}' / refresh : {refresh}")
|
437
435
|
|
438
436
|
def fetch_final_predictions(num_in) -> tuple:
|
439
437
|
"""
|
@@ -474,7 +472,7 @@ class MyLSTM:
|
|
474
472
|
|
475
473
|
return future_data, lstm_grade
|
476
474
|
|
477
|
-
future_data, lstm_grade = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_final_predictions, num
|
475
|
+
future_data, lstm_grade = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_final_predictions, num)
|
478
476
|
|
479
477
|
return future_data, lstm_grade
|
480
478
|
|
@@ -483,7 +481,7 @@ class MyLSTM:
|
|
483
481
|
redis_name = f'{self.ticker}_{MyLSTM.REDIS_LSTM_DATA_SUFFIX}'
|
484
482
|
|
485
483
|
mylogger.info(
|
486
|
-
f"redisname: '{redis_name}' / refresh : {refresh}
|
484
|
+
f"redisname: '{redis_name}' / refresh : {refresh}")
|
487
485
|
|
488
486
|
def fetch_generate_lstm_chart_data(num_in) -> LSTMChartData:
|
489
487
|
def prepare_past_data(past_days) -> tuple:
|
@@ -541,8 +539,7 @@ class MyLSTM:
|
|
541
539
|
#print(data.grade)
|
542
540
|
return data
|
543
541
|
|
544
|
-
lstm_chart_data = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_lstm_chart_data,
|
545
|
-
num, timer=expire_time)
|
542
|
+
lstm_chart_data = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_lstm_chart_data,num)
|
546
543
|
return lstm_chart_data
|
547
544
|
|
548
545
|
def get_chart_data(self) -> Optional[LSTMChartData]:
|
@@ -8,7 +8,6 @@ from prophet import Prophet
|
|
8
8
|
from sklearn.preprocessing import StandardScaler
|
9
9
|
from dataclasses import dataclass, field
|
10
10
|
from marshmallow import fields
|
11
|
-
import os
|
12
11
|
|
13
12
|
from utils_hj3415 import tools, setup_logger
|
14
13
|
from db_hj3415 import myredis
|
@@ -17,8 +16,7 @@ from analyser_hj3415.analyser import eval, MIs, tsa
|
|
17
16
|
from analyser_hj3415.analyser.tsa.common import PandasTimestampField, ChartPoint
|
18
17
|
|
19
18
|
|
20
|
-
mylogger = setup_logger(__name__,'
|
21
|
-
expire_time = tools.to_int(os.getenv('DEFAULT_EXPIRE_TIME_H', 48)) * 3600
|
19
|
+
mylogger = setup_logger(__name__,'WARNING')
|
22
20
|
|
23
21
|
|
24
22
|
@dataclass
|
@@ -274,9 +272,9 @@ class MyProphet:
|
|
274
272
|
redis_name = f'{self.ticker}_{self.REDIS_LATEST_DATA_SUFFIX}'
|
275
273
|
|
276
274
|
mylogger.debug(
|
277
|
-
f"redisname: '{redis_name}' / refresh : {refresh}
|
275
|
+
f"redisname: '{redis_name}' / refresh : {refresh}")
|
278
276
|
|
279
|
-
prophet_data = myredis.Base.fetch_and_cache_data(redis_name, refresh, self._make_prophet_latest_data
|
277
|
+
prophet_data = myredis.Base.fetch_and_cache_data(redis_name, refresh, self._make_prophet_latest_data)
|
280
278
|
return prophet_data
|
281
279
|
|
282
280
|
def generate_chart_data(self, refresh: bool) -> ProphetChartData:
|
@@ -294,7 +292,7 @@ class MyProphet:
|
|
294
292
|
redis_name = f'{self.ticker}_myprophet_chart_data'
|
295
293
|
|
296
294
|
mylogger.debug(
|
297
|
-
f"redisname: '{redis_name}' / refresh : {refresh}
|
295
|
+
f"redisname: '{redis_name}' / refresh : {refresh}")
|
298
296
|
|
299
297
|
def fetch_generate_prophet_chart_data() -> ProphetChartData:
|
300
298
|
mylogger.debug(f'initialized: {self.initialized}')
|
@@ -328,8 +326,7 @@ class MyProphet:
|
|
328
326
|
)
|
329
327
|
return data
|
330
328
|
|
331
|
-
prophet_chart_data = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_prophet_chart_data
|
332
|
-
timer=expire_time)
|
329
|
+
prophet_chart_data = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_generate_prophet_chart_data)
|
333
330
|
return prophet_chart_data
|
334
331
|
|
335
332
|
@staticmethod
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: analyser_hj3415
|
3
|
-
Version: 4.2.
|
3
|
+
Version: 4.2.7
|
4
4
|
Summary: Stock analyser and database processing programs
|
5
5
|
Requires-Python: >=3.6
|
6
6
|
Description-Content-Type: text/markdown
|
7
|
-
Requires-Dist: utils-hj3415>=3.0
|
8
|
-
Requires-Dist: db-hj3415>=4.
|
7
|
+
Requires-Dist: utils-hj3415>=3.2.0
|
8
|
+
Requires-Dist: db-hj3415>=4.7.1
|
9
9
|
Requires-Dist: scikit-learn>=1.5.2
|
10
10
|
Requires-Dist: plotly>=5.24.1
|
11
11
|
Requires-Dist: yfinance>=0.2.44
|
@@ -0,0 +1,17 @@
|
|
1
|
+
analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
analyser_hj3415/cli.py,sha256=0oFfvaTXSh7UbFa8WcAlLpbkT6vxnSZIk7hxVL5PTr8,11410
|
3
|
+
analyser_hj3415/analyser/__init__.py,sha256=N0XyBfWJNpDS_6JYziKETWePO_jtFB1m7E8Qbwt1w0Q,1096
|
4
|
+
analyser_hj3415/analyser/eval/__init__.py,sha256=IP1d0Q3nOCAD3zK1qxrC685MkJQfUh-qaXc7xptTxk8,80
|
5
|
+
analyser_hj3415/analyser/eval/blue.py,sha256=KBoKevikS74ys9zcVls6GaEdBkW-avcxHWkSPywOcPU,10644
|
6
|
+
analyser_hj3415/analyser/eval/common.py,sha256=sNXapoofShA43ww_SLjXmIjkrAr1AhAcezdaN_X_3Us,11443
|
7
|
+
analyser_hj3415/analyser/eval/growth.py,sha256=LunZcZvhly_2PWUZBbd0gW9ZImWYT5sAu_iixVLxGuc,6226
|
8
|
+
analyser_hj3415/analyser/eval/mil.py,sha256=6_1SuWqG1fsuZUKuaABhSqNsYCgj5np35auWhnE5wdk,15289
|
9
|
+
analyser_hj3415/analyser/eval/red.py,sha256=Abf5HPsNWKnDF4cbZ8xhlNsMF6ljN_sShCAYyPAhCYs,12028
|
10
|
+
analyser_hj3415/analyser/tsa/__init__.py,sha256=pg20ZQRABedTdaIoOr5t043RNKtJ7ji_WmnZrD1IhPg,147
|
11
|
+
analyser_hj3415/analyser/tsa/common.py,sha256=iRwk88zBtEIqzSmTQWmQIWiiqZ9gN7GLtDUa5rx8IGM,1918
|
12
|
+
analyser_hj3415/analyser/tsa/lstm.py,sha256=kVAW8KeCwGhSgqfBkUsUWN6udY9Vztk7OfeC3p3wrTU,28790
|
13
|
+
analyser_hj3415/analyser/tsa/prophet.py,sha256=2WPR7OJBPKYrl_uAzfcDdezJ7oWeQWlz-eU-yriuKlw,17098
|
14
|
+
analyser_hj3415-4.2.7.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
|
15
|
+
analyser_hj3415-4.2.7.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
16
|
+
analyser_hj3415-4.2.7.dist-info/METADATA,sha256=z_9FX9YApR2fKZBnJWF2dhxBpXmdp4-wjQbjkKTEKkY,6776
|
17
|
+
analyser_hj3415-4.2.7.dist-info/RECORD,,
|
@@ -1,17 +0,0 @@
|
|
1
|
-
analyser_hj3415/__init__.py,sha256=jqHEUoBeihYOMaS0bPOe3nRVXBufZ0clxc6M6jxPY0o,320
|
2
|
-
analyser_hj3415/cli.py,sha256=0oFfvaTXSh7UbFa8WcAlLpbkT6vxnSZIk7hxVL5PTr8,11410
|
3
|
-
analyser_hj3415/analyser/__init__.py,sha256=N0XyBfWJNpDS_6JYziKETWePO_jtFB1m7E8Qbwt1w0Q,1096
|
4
|
-
analyser_hj3415/analyser/eval/__init__.py,sha256=IP1d0Q3nOCAD3zK1qxrC685MkJQfUh-qaXc7xptTxk8,80
|
5
|
-
analyser_hj3415/analyser/eval/blue.py,sha256=p5JPwkQYoO0dsOe3VnfMV3pOWLzNsAFvLCUK56f85Xo,10782
|
6
|
-
analyser_hj3415/analyser/eval/common.py,sha256=sNXapoofShA43ww_SLjXmIjkrAr1AhAcezdaN_X_3Us,11443
|
7
|
-
analyser_hj3415/analyser/eval/growth.py,sha256=tlHxLx4u5h7bNG0T8ViJujX20QllfrSaBl-TBqFNkEs,6362
|
8
|
-
analyser_hj3415/analyser/eval/mil.py,sha256=m1Ca7U7IR3A3tbRYAw8wG7SQsI-_LzwYdY9xfM9G8II,15426
|
9
|
-
analyser_hj3415/analyser/eval/red.py,sha256=iA4wpuayJalnlwn2SypsHuWPcthvxvNx2CleDraucFs,12168
|
10
|
-
analyser_hj3415/analyser/tsa/__init__.py,sha256=pg20ZQRABedTdaIoOr5t043RNKtJ7ji_WmnZrD1IhPg,147
|
11
|
-
analyser_hj3415/analyser/tsa/common.py,sha256=msUPowjFMxOqWqGn5Q_FFzijiuYBGOBrEBckxvV2deg,1979
|
12
|
-
analyser_hj3415/analyser/tsa/lstm.py,sha256=9VDFA1sfm-SSDkAU3IOv8rxYCHGUzaTWre5XfmAgTUQ,29044
|
13
|
-
analyser_hj3415/analyser/tsa/prophet.py,sha256=g6-MLOOdfCwmYGoPgfCDh3FZp1FDUbqoWr5WG2kvzEI,17350
|
14
|
-
analyser_hj3415-4.2.5.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
|
15
|
-
analyser_hj3415-4.2.5.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
16
|
-
analyser_hj3415-4.2.5.dist-info/METADATA,sha256=UbQUEVDotckBKfYt-vWl6NWtwXdXYyAFEYXT1H-adzw,6777
|
17
|
-
analyser_hj3415-4.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|