analyser_hj3415 4.3.1__py3-none-any.whl → 4.3.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/.DS_Store +0 -0
- analyser_hj3415/analyser/tsa/__init__.py +2 -1
- analyser_hj3415/analyser/tsa/myprophet.py +6 -7
- {analyser_hj3415-4.3.1.dist-info → analyser_hj3415-4.3.3.dist-info}/METADATA +1 -1
- {analyser_hj3415-4.3.1.dist-info → analyser_hj3415-4.3.3.dist-info}/RECORD +7 -6
- {analyser_hj3415-4.3.1.dist-info → analyser_hj3415-4.3.3.dist-info}/WHEEL +0 -0
- {analyser_hj3415-4.3.1.dist-info → analyser_hj3415-4.3.3.dist-info}/entry_points.txt +0 -0
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from collections import OrderedDict
|
2
|
-
|
2
|
+
import datetime
|
3
3
|
from typing import Tuple, List, Dict, Union
|
4
4
|
|
5
5
|
import yfinance as yf
|
@@ -18,12 +18,11 @@ from analyser_hj3415.analyser.tsa.common import PandasTimestampField, ChartPoint
|
|
18
18
|
|
19
19
|
mylogger = setup_logger(__name__,'WARNING')
|
20
20
|
|
21
|
-
|
22
21
|
@dataclass
|
23
22
|
class ProphetLatestData:
|
24
23
|
ticker: str
|
25
24
|
|
26
|
-
date: datetime.date
|
25
|
+
date: datetime.date = field(metadata={"marshmallow_field": fields.Date()})
|
27
26
|
price: float
|
28
27
|
yhat: float
|
29
28
|
yhat_upper: float
|
@@ -105,10 +104,10 @@ class MyProphet:
|
|
105
104
|
pd.DataFrame: 가져온 주가 데이터프레임.
|
106
105
|
"""
|
107
106
|
# 오늘 날짜 가져오기
|
108
|
-
today = datetime.today()
|
107
|
+
today = datetime.datetime.today()
|
109
108
|
|
110
109
|
# 4년 전 날짜 계산 (4년 = 365일 * 4)
|
111
|
-
four_years_ago = today - timedelta(days=365 * 4)
|
110
|
+
four_years_ago = today - datetime.timedelta(days=365 * 4)
|
112
111
|
|
113
112
|
return yf.download(
|
114
113
|
tickers=self.ticker,
|
@@ -250,7 +249,7 @@ class MyProphet:
|
|
250
249
|
except Exception:
|
251
250
|
data = ProphetLatestData(
|
252
251
|
ticker=self.ticker,
|
253
|
-
date=datetime.now().date(),
|
252
|
+
date=datetime.datetime.now().date(),
|
254
253
|
price=float('nan'),
|
255
254
|
yhat=float('nan'),
|
256
255
|
yhat_lower=float('nan'),
|
@@ -342,7 +341,7 @@ class MyProphet:
|
|
342
341
|
"""
|
343
342
|
try:
|
344
343
|
# %Y-%m-%d 형식으로 문자열을 datetime 객체로 변환 시도
|
345
|
-
datetime.strptime(date_string, '%Y-%m-%d')
|
344
|
+
datetime.datetime.strptime(date_string, '%Y-%m-%d')
|
346
345
|
return True
|
347
346
|
except ValueError:
|
348
347
|
# 변환이 실패하면 ValueError가 발생, 형식이 맞지 않음
|
@@ -1,3 +1,4 @@
|
|
1
|
+
analyser_hj3415/.DS_Store,sha256=fppknfhS_OdwBFgHHQaBDBRZG0WleCeML46EOj8nxIo,6148
|
1
2
|
analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
3
|
analyser_hj3415/cli.py,sha256=0oFfvaTXSh7UbFa8WcAlLpbkT6vxnSZIk7hxVL5PTr8,11410
|
3
4
|
analyser_hj3415/analyser/__init__.py,sha256=N0XyBfWJNpDS_6JYziKETWePO_jtFB1m7E8Qbwt1w0Q,1096
|
@@ -7,11 +8,11 @@ analyser_hj3415/analyser/eval/common.py,sha256=sNXapoofShA43ww_SLjXmIjkrAr1AhAce
|
|
7
8
|
analyser_hj3415/analyser/eval/growth.py,sha256=LunZcZvhly_2PWUZBbd0gW9ZImWYT5sAu_iixVLxGuc,6226
|
8
9
|
analyser_hj3415/analyser/eval/mil.py,sha256=6_1SuWqG1fsuZUKuaABhSqNsYCgj5np35auWhnE5wdk,15289
|
9
10
|
analyser_hj3415/analyser/eval/red.py,sha256=Abf5HPsNWKnDF4cbZ8xhlNsMF6ljN_sShCAYyPAhCYs,12028
|
10
|
-
analyser_hj3415/analyser/tsa/__init__.py,sha256=
|
11
|
+
analyser_hj3415/analyser/tsa/__init__.py,sha256=7j-WshikzsDGGo_wuFoMPNmYfY-bLSEMd6o1MKSQKLI,150
|
11
12
|
analyser_hj3415/analyser/tsa/common.py,sha256=iRwk88zBtEIqzSmTQWmQIWiiqZ9gN7GLtDUa5rx8IGM,1918
|
12
13
|
analyser_hj3415/analyser/tsa/lstm.py,sha256=howngiVaEFKccYif6vrREm6skZiDzxazq44SdY_82yQ,28906
|
13
|
-
analyser_hj3415/analyser/tsa/myprophet.py,sha256=
|
14
|
-
analyser_hj3415-4.3.
|
15
|
-
analyser_hj3415-4.3.
|
16
|
-
analyser_hj3415-4.3.
|
17
|
-
analyser_hj3415-4.3.
|
14
|
+
analyser_hj3415/analyser/tsa/myprophet.py,sha256=Ik4FfAjMLjkfM8f70KOevnRLSK1XTOE7PD3TWyf2sz4,17163
|
15
|
+
analyser_hj3415-4.3.3.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
|
16
|
+
analyser_hj3415-4.3.3.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
17
|
+
analyser_hj3415-4.3.3.dist-info/METADATA,sha256=ddtBF-RDF82kmk44xiWKaufQ1WV11iNnVbu9k-waicA,6811
|
18
|
+
analyser_hj3415-4.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|