akshare 1.15.72__py3-none-any.whl → 1.15.74__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.
Potentially problematic release.
This version of akshare might be problematic. Click here for more details.
- akshare/__init__.py +3 -1
- akshare/economic/macro_australia.py +74 -62
- akshare/index/index_option_qvix.py +78 -72
- akshare/stock/stock_dzjy_em.py +1 -1
- {akshare-1.15.72.dist-info → akshare-1.15.74.dist-info}/METADATA +1 -1
- {akshare-1.15.72.dist-info → akshare-1.15.74.dist-info}/RECORD +9 -9
- {akshare-1.15.72.dist-info → akshare-1.15.74.dist-info}/LICENSE +0 -0
- {akshare-1.15.72.dist-info → akshare-1.15.74.dist-info}/WHEEL +0 -0
- {akshare-1.15.72.dist-info → akshare-1.15.74.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2982,9 +2982,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2982
2982
|
1.15.70 fix: fix stock_research_report_em interface
|
|
2983
2983
|
1.15.71 fix: fix stock_dzjy_sctj interface
|
|
2984
2984
|
1.15.72 fix: fix stock_us_spot interface
|
|
2985
|
+
1.15.73 fix: fix stock_dzjy_hygtj interface
|
|
2986
|
+
1.15.74 fix: fix macro_australia_retail_rate_monthly interface
|
|
2985
2987
|
"""
|
|
2986
2988
|
|
|
2987
|
-
__version__ = "1.15.
|
|
2989
|
+
__version__ = "1.15.74"
|
|
2988
2990
|
__author__ = "AKFamily"
|
|
2989
2991
|
|
|
2990
2992
|
import sys
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2025/1/17 15:30
|
|
5
5
|
Desc: 东方财富-经济数据-澳大利亚
|
|
6
6
|
https://data.eastmoney.com/cjsj/foreign_5_0.html
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
import pandas as pd
|
|
9
10
|
import requests
|
|
10
11
|
|
|
11
|
-
from akshare.utils import demjson
|
|
12
|
-
|
|
13
12
|
|
|
14
13
|
# 零售销售月率
|
|
15
14
|
def macro_australia_retail_rate_monthly() -> pd.DataFrame:
|
|
@@ -47,18 +46,19 @@ def macro_australia_retail_rate_monthly() -> pd.DataFrame:
|
|
|
47
46
|
"发布日期",
|
|
48
47
|
"现值",
|
|
49
48
|
"前值",
|
|
50
|
-
|
|
51
|
-
|
|
52
49
|
]
|
|
53
|
-
temp_df = temp_df[
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
temp_df = temp_df[
|
|
51
|
+
[
|
|
52
|
+
"时间",
|
|
53
|
+
"前值",
|
|
54
|
+
"现值",
|
|
55
|
+
"发布日期",
|
|
56
|
+
]
|
|
57
|
+
]
|
|
59
58
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
60
59
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
61
|
-
temp_df[
|
|
60
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
61
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
62
62
|
return temp_df
|
|
63
63
|
|
|
64
64
|
|
|
@@ -98,17 +98,19 @@ def macro_australia_trade() -> pd.DataFrame:
|
|
|
98
98
|
"发布日期",
|
|
99
99
|
"现值",
|
|
100
100
|
"前值",
|
|
101
|
-
|
|
102
101
|
]
|
|
103
|
-
temp_df = temp_df[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
temp_df = temp_df[
|
|
103
|
+
[
|
|
104
|
+
"时间",
|
|
105
|
+
"前值",
|
|
106
|
+
"现值",
|
|
107
|
+
"发布日期",
|
|
108
|
+
]
|
|
109
|
+
]
|
|
109
110
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
110
111
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
111
|
-
temp_df[
|
|
112
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
113
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
112
114
|
return temp_df
|
|
113
115
|
|
|
114
116
|
|
|
@@ -148,17 +150,19 @@ def macro_australia_unemployment_rate() -> pd.DataFrame:
|
|
|
148
150
|
"发布日期",
|
|
149
151
|
"现值",
|
|
150
152
|
"前值",
|
|
151
|
-
|
|
152
153
|
]
|
|
153
|
-
temp_df = temp_df[
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
temp_df = temp_df[
|
|
155
|
+
[
|
|
156
|
+
"时间",
|
|
157
|
+
"前值",
|
|
158
|
+
"现值",
|
|
159
|
+
"发布日期",
|
|
160
|
+
]
|
|
161
|
+
]
|
|
159
162
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
160
163
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
161
|
-
temp_df[
|
|
164
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
165
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
162
166
|
return temp_df
|
|
163
167
|
|
|
164
168
|
|
|
@@ -198,17 +202,19 @@ def macro_australia_ppi_quarterly() -> pd.DataFrame:
|
|
|
198
202
|
"发布日期",
|
|
199
203
|
"现值",
|
|
200
204
|
"前值",
|
|
201
|
-
|
|
202
205
|
]
|
|
203
|
-
temp_df = temp_df[
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
temp_df = temp_df[
|
|
207
|
+
[
|
|
208
|
+
"时间",
|
|
209
|
+
"前值",
|
|
210
|
+
"现值",
|
|
211
|
+
"发布日期",
|
|
212
|
+
]
|
|
213
|
+
]
|
|
209
214
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
210
215
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
211
|
-
temp_df[
|
|
216
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
217
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
212
218
|
return temp_df
|
|
213
219
|
|
|
214
220
|
|
|
@@ -216,7 +222,7 @@ def macro_australia_ppi_quarterly() -> pd.DataFrame:
|
|
|
216
222
|
def macro_australia_cpi_quarterly() -> pd.DataFrame:
|
|
217
223
|
"""
|
|
218
224
|
东方财富-经济数据-澳大利亚-消费者物价指数季率
|
|
219
|
-
|
|
225
|
+
https://data.eastmoney.com/cjsj/foreign_5_4.html
|
|
220
226
|
:return: 消费者物价指数季率
|
|
221
227
|
:rtype: pandas.DataFrame
|
|
222
228
|
"""
|
|
@@ -248,17 +254,19 @@ def macro_australia_cpi_quarterly() -> pd.DataFrame:
|
|
|
248
254
|
"发布日期",
|
|
249
255
|
"现值",
|
|
250
256
|
"前值",
|
|
251
|
-
|
|
252
257
|
]
|
|
253
|
-
temp_df = temp_df[
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
temp_df = temp_df[
|
|
259
|
+
[
|
|
260
|
+
"时间",
|
|
261
|
+
"前值",
|
|
262
|
+
"现值",
|
|
263
|
+
"发布日期",
|
|
264
|
+
]
|
|
265
|
+
]
|
|
259
266
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
260
267
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
261
|
-
temp_df[
|
|
268
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
269
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
262
270
|
return temp_df
|
|
263
271
|
|
|
264
272
|
|
|
@@ -298,17 +306,19 @@ def macro_australia_cpi_yearly() -> pd.DataFrame:
|
|
|
298
306
|
"发布日期",
|
|
299
307
|
"现值",
|
|
300
308
|
"前值",
|
|
301
|
-
|
|
302
309
|
]
|
|
303
|
-
temp_df = temp_df[
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
310
|
+
temp_df = temp_df[
|
|
311
|
+
[
|
|
312
|
+
"时间",
|
|
313
|
+
"前值",
|
|
314
|
+
"现值",
|
|
315
|
+
"发布日期",
|
|
316
|
+
]
|
|
317
|
+
]
|
|
309
318
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
310
319
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
311
|
-
temp_df[
|
|
320
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
321
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
312
322
|
return temp_df
|
|
313
323
|
|
|
314
324
|
|
|
@@ -348,21 +358,23 @@ def macro_australia_bank_rate() -> pd.DataFrame:
|
|
|
348
358
|
"发布日期",
|
|
349
359
|
"现值",
|
|
350
360
|
"前值",
|
|
351
|
-
|
|
352
361
|
]
|
|
353
|
-
temp_df = temp_df[
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
362
|
+
temp_df = temp_df[
|
|
363
|
+
[
|
|
364
|
+
"时间",
|
|
365
|
+
"前值",
|
|
366
|
+
"现值",
|
|
367
|
+
"发布日期",
|
|
368
|
+
]
|
|
369
|
+
]
|
|
359
370
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
360
371
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
361
|
-
temp_df[
|
|
372
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
373
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
362
374
|
return temp_df
|
|
363
375
|
|
|
364
376
|
|
|
365
|
-
if __name__ ==
|
|
377
|
+
if __name__ == "__main__":
|
|
366
378
|
macro_australia_retail_rate_monthly_df = macro_australia_retail_rate_monthly()
|
|
367
379
|
print(macro_australia_retail_rate_monthly_df)
|
|
368
380
|
|
|
@@ -7,7 +7,22 @@ Desc: 50 ETF 期权波动率指数 QVIX
|
|
|
7
7
|
http://1.optbbs.com/s/vix.shtml?50ETF
|
|
8
8
|
http://1.optbbs.com/s/vix.shtml?300ETF
|
|
9
9
|
"""
|
|
10
|
+
|
|
10
11
|
import pandas as pd
|
|
12
|
+
from functools import lru_cache
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@lru_cache
|
|
16
|
+
def __get_optbbs_daily() -> pd.DataFrame:
|
|
17
|
+
"""
|
|
18
|
+
读取原始数据
|
|
19
|
+
http://1.optbbs.com/d/csv/d/k.csv
|
|
20
|
+
:return: 原始数据
|
|
21
|
+
:rtype: pandas.DataFrame
|
|
22
|
+
"""
|
|
23
|
+
url = "http://1.optbbs.com/d/csv/d/k.csv"
|
|
24
|
+
temp_df = pd.read_csv(url, encoding="gbk")
|
|
25
|
+
return temp_df
|
|
11
26
|
|
|
12
27
|
|
|
13
28
|
def index_option_50etf_qvix() -> pd.DataFrame:
|
|
@@ -17,8 +32,7 @@ def index_option_50etf_qvix() -> pd.DataFrame:
|
|
|
17
32
|
:return: 50ETF 期权波动率指数 QVIX
|
|
18
33
|
:rtype: pandas.DataFrame
|
|
19
34
|
"""
|
|
20
|
-
|
|
21
|
-
temp_df = pd.read_csv(url).iloc[:, :5]
|
|
35
|
+
temp_df = __get_optbbs_daily().iloc[:, :5]
|
|
22
36
|
temp_df.columns = [
|
|
23
37
|
"date",
|
|
24
38
|
"open",
|
|
@@ -26,11 +40,11 @@ def index_option_50etf_qvix() -> pd.DataFrame:
|
|
|
26
40
|
"low",
|
|
27
41
|
"close",
|
|
28
42
|
]
|
|
29
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
30
|
-
temp_df[
|
|
31
|
-
temp_df[
|
|
32
|
-
temp_df[
|
|
33
|
-
temp_df[
|
|
43
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
44
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
45
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
46
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
47
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
34
48
|
return temp_df
|
|
35
49
|
|
|
36
50
|
|
|
@@ -47,7 +61,7 @@ def index_option_50etf_min_qvix() -> pd.DataFrame:
|
|
|
47
61
|
"time",
|
|
48
62
|
"qvix",
|
|
49
63
|
]
|
|
50
|
-
temp_df[
|
|
64
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
51
65
|
return temp_df
|
|
52
66
|
|
|
53
67
|
|
|
@@ -58,8 +72,7 @@ def index_option_300etf_qvix() -> pd.DataFrame:
|
|
|
58
72
|
:return: 300 ETF 期权波动率指数 QVIX
|
|
59
73
|
:rtype: pandas.DataFrame
|
|
60
74
|
"""
|
|
61
|
-
|
|
62
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 9, 10, 11, 12]]
|
|
75
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 9, 10, 11, 12]]
|
|
63
76
|
temp_df.columns = [
|
|
64
77
|
"date",
|
|
65
78
|
"open",
|
|
@@ -67,11 +80,11 @@ def index_option_300etf_qvix() -> pd.DataFrame:
|
|
|
67
80
|
"low",
|
|
68
81
|
"close",
|
|
69
82
|
]
|
|
70
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
71
|
-
temp_df[
|
|
72
|
-
temp_df[
|
|
73
|
-
temp_df[
|
|
74
|
-
temp_df[
|
|
83
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
84
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
85
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
86
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
87
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
75
88
|
return temp_df
|
|
76
89
|
|
|
77
90
|
|
|
@@ -88,7 +101,7 @@ def index_option_300etf_min_qvix() -> pd.DataFrame:
|
|
|
88
101
|
"time",
|
|
89
102
|
"qvix",
|
|
90
103
|
]
|
|
91
|
-
temp_df[
|
|
104
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
92
105
|
return temp_df
|
|
93
106
|
|
|
94
107
|
|
|
@@ -99,8 +112,7 @@ def index_option_500etf_qvix() -> pd.DataFrame:
|
|
|
99
112
|
:return: 500 ETF 期权波动率指数 QVIX
|
|
100
113
|
:rtype: pandas.DataFrame
|
|
101
114
|
"""
|
|
102
|
-
|
|
103
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 67, 68, 69, 70]]
|
|
115
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 67, 68, 69, 70]]
|
|
104
116
|
temp_df.columns = [
|
|
105
117
|
"date",
|
|
106
118
|
"open",
|
|
@@ -108,11 +120,11 @@ def index_option_500etf_qvix() -> pd.DataFrame:
|
|
|
108
120
|
"low",
|
|
109
121
|
"close",
|
|
110
122
|
]
|
|
111
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
112
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
113
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
114
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
115
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
123
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
124
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
125
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
126
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
127
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
116
128
|
return temp_df
|
|
117
129
|
|
|
118
130
|
|
|
@@ -129,7 +141,7 @@ def index_option_500etf_min_qvix() -> pd.DataFrame:
|
|
|
129
141
|
"time",
|
|
130
142
|
"qvix",
|
|
131
143
|
]
|
|
132
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
144
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
133
145
|
return temp_df
|
|
134
146
|
|
|
135
147
|
|
|
@@ -140,8 +152,7 @@ def index_option_cyb_qvix() -> pd.DataFrame:
|
|
|
140
152
|
:return: 创业板 期权波动率指数 QVIX
|
|
141
153
|
:rtype: pandas.DataFrame
|
|
142
154
|
"""
|
|
143
|
-
|
|
144
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 71, 72, 73, 74]]
|
|
155
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 71, 72, 73, 74]]
|
|
145
156
|
temp_df.columns = [
|
|
146
157
|
"date",
|
|
147
158
|
"open",
|
|
@@ -149,11 +160,11 @@ def index_option_cyb_qvix() -> pd.DataFrame:
|
|
|
149
160
|
"low",
|
|
150
161
|
"close",
|
|
151
162
|
]
|
|
152
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
153
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
154
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
155
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
156
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
163
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
164
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
165
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
166
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
167
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
157
168
|
return temp_df
|
|
158
169
|
|
|
159
170
|
|
|
@@ -170,7 +181,7 @@ def index_option_cyb_min_qvix() -> pd.DataFrame:
|
|
|
170
181
|
"time",
|
|
171
182
|
"qvix",
|
|
172
183
|
]
|
|
173
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
184
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
174
185
|
return temp_df
|
|
175
186
|
|
|
176
187
|
|
|
@@ -181,8 +192,7 @@ def index_option_kcb_qvix() -> pd.DataFrame:
|
|
|
181
192
|
:return: 科创板 期权波动率指数 QVIX
|
|
182
193
|
:rtype: pandas.DataFrame
|
|
183
194
|
"""
|
|
184
|
-
|
|
185
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 83, 84, 85, 86]]
|
|
195
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 83, 84, 85, 86]]
|
|
186
196
|
temp_df.columns = [
|
|
187
197
|
"date",
|
|
188
198
|
"open",
|
|
@@ -190,11 +200,11 @@ def index_option_kcb_qvix() -> pd.DataFrame:
|
|
|
190
200
|
"low",
|
|
191
201
|
"close",
|
|
192
202
|
]
|
|
193
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
194
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
195
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
196
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
197
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
203
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
204
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
205
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
206
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
207
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
198
208
|
return temp_df
|
|
199
209
|
|
|
200
210
|
|
|
@@ -211,7 +221,7 @@ def index_option_kcb_min_qvix() -> pd.DataFrame:
|
|
|
211
221
|
"time",
|
|
212
222
|
"qvix",
|
|
213
223
|
]
|
|
214
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
224
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
215
225
|
return temp_df
|
|
216
226
|
|
|
217
227
|
|
|
@@ -222,8 +232,7 @@ def index_option_100etf_qvix() -> pd.DataFrame:
|
|
|
222
232
|
:return: 深证100ETF 期权波动率指数 QVIX
|
|
223
233
|
:rtype: pandas.DataFrame
|
|
224
234
|
"""
|
|
225
|
-
|
|
226
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 75, 76, 77, 78]]
|
|
235
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 75, 76, 77, 78]]
|
|
227
236
|
temp_df.columns = [
|
|
228
237
|
"date",
|
|
229
238
|
"open",
|
|
@@ -231,11 +240,11 @@ def index_option_100etf_qvix() -> pd.DataFrame:
|
|
|
231
240
|
"low",
|
|
232
241
|
"close",
|
|
233
242
|
]
|
|
234
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
235
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
236
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
237
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
238
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
243
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
244
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
245
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
246
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
247
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
239
248
|
return temp_df
|
|
240
249
|
|
|
241
250
|
|
|
@@ -252,7 +261,7 @@ def index_option_100etf_min_qvix() -> pd.DataFrame:
|
|
|
252
261
|
"time",
|
|
253
262
|
"qvix",
|
|
254
263
|
]
|
|
255
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
264
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
256
265
|
return temp_df
|
|
257
266
|
|
|
258
267
|
|
|
@@ -263,8 +272,7 @@ def index_option_300index_qvix() -> pd.DataFrame:
|
|
|
263
272
|
:return: 中证300股指 期权波动率指数 QVIX
|
|
264
273
|
:rtype: pandas.DataFrame
|
|
265
274
|
"""
|
|
266
|
-
|
|
267
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 17, 18, 19, 20]]
|
|
275
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 17, 18, 19, 20]]
|
|
268
276
|
temp_df.columns = [
|
|
269
277
|
"date",
|
|
270
278
|
"open",
|
|
@@ -272,11 +280,11 @@ def index_option_300index_qvix() -> pd.DataFrame:
|
|
|
272
280
|
"low",
|
|
273
281
|
"close",
|
|
274
282
|
]
|
|
275
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
276
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
277
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
278
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
279
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
283
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
284
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
285
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
286
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
287
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
280
288
|
return temp_df
|
|
281
289
|
|
|
282
290
|
|
|
@@ -293,7 +301,7 @@ def index_option_300index_min_qvix() -> pd.DataFrame:
|
|
|
293
301
|
"time",
|
|
294
302
|
"qvix",
|
|
295
303
|
]
|
|
296
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
304
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
297
305
|
return temp_df
|
|
298
306
|
|
|
299
307
|
|
|
@@ -304,8 +312,7 @@ def index_option_1000index_qvix() -> pd.DataFrame:
|
|
|
304
312
|
:return: 中证1000股指 期权波动率指数 QVIX
|
|
305
313
|
:rtype: pandas.DataFrame
|
|
306
314
|
"""
|
|
307
|
-
|
|
308
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 25, 26, 27, 28]]
|
|
315
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 25, 26, 27, 28]]
|
|
309
316
|
temp_df.columns = [
|
|
310
317
|
"date",
|
|
311
318
|
"open",
|
|
@@ -313,11 +320,11 @@ def index_option_1000index_qvix() -> pd.DataFrame:
|
|
|
313
320
|
"low",
|
|
314
321
|
"close",
|
|
315
322
|
]
|
|
316
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
317
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
318
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
319
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
320
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
323
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
324
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
325
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
326
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
327
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
321
328
|
return temp_df
|
|
322
329
|
|
|
323
330
|
|
|
@@ -334,7 +341,7 @@ def index_option_1000index_min_qvix() -> pd.DataFrame:
|
|
|
334
341
|
"time",
|
|
335
342
|
"qvix",
|
|
336
343
|
]
|
|
337
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
344
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
338
345
|
return temp_df
|
|
339
346
|
|
|
340
347
|
|
|
@@ -345,8 +352,7 @@ def index_option_50index_qvix() -> pd.DataFrame:
|
|
|
345
352
|
:return: 上证50股指 期权波动率指数 QVIX
|
|
346
353
|
:rtype: pandas.DataFrame
|
|
347
354
|
"""
|
|
348
|
-
|
|
349
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 79, 80, 81, 82]]
|
|
355
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 79, 80, 81, 82]]
|
|
350
356
|
temp_df.columns = [
|
|
351
357
|
"date",
|
|
352
358
|
"open",
|
|
@@ -354,11 +360,11 @@ def index_option_50index_qvix() -> pd.DataFrame:
|
|
|
354
360
|
"low",
|
|
355
361
|
"close",
|
|
356
362
|
]
|
|
357
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
358
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
359
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
360
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
361
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
363
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
364
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
365
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
366
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
367
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
362
368
|
return temp_df
|
|
363
369
|
|
|
364
370
|
|
|
@@ -375,7 +381,7 @@ def index_option_50index_min_qvix() -> pd.DataFrame:
|
|
|
375
381
|
"time",
|
|
376
382
|
"qvix",
|
|
377
383
|
]
|
|
378
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
384
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
379
385
|
return temp_df
|
|
380
386
|
|
|
381
387
|
|
akshare/stock/stock_dzjy_em.py
CHANGED
|
@@ -609,7 +609,7 @@ if __name__ == "__main__":
|
|
|
609
609
|
)
|
|
610
610
|
print(stock_dzjy_mrmx_df)
|
|
611
611
|
|
|
612
|
-
stock_dzjy_mrtj_df = stock_dzjy_mrtj(start_date="
|
|
612
|
+
stock_dzjy_mrtj_df = stock_dzjy_mrtj(start_date="20220105", end_date="20220105")
|
|
613
613
|
print(stock_dzjy_mrtj_df)
|
|
614
614
|
|
|
615
615
|
stock_dzjy_hygtj_df = stock_dzjy_hygtj(symbol="近三月")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=F9xOijKtCdpH32MYlpYbZ1y_KgHe8ORkuoFb8OGXnas,186185
|
|
2
2
|
akshare/datasets.py,sha256=rKuRNZrqi6IMsZ9nyvO3Rx02js0tH3zMLjz8HQNAoPQ,963
|
|
3
3
|
akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
|
|
4
4
|
akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
|
|
@@ -50,7 +50,7 @@ akshare/data/crypto_info.zip,sha256=egMaxGtQiac_yDsbuHxNUkLQem_D7UWrJtJ4ofe1Rw4,
|
|
|
50
50
|
akshare/data/ths.js,sha256=AWPkHf3L2Il1UUL0F5qDqNn1dfU0OlZBNUbMf8AmI3Y,39664
|
|
51
51
|
akshare/economic/__init__.py,sha256=7dWJSrPs7KTj9_Ffs-ZS3aYDrf3v4nOnZYqwUZ3DJms,82
|
|
52
52
|
akshare/economic/cons.py,sha256=0JM61Eiro0xqXGnCaDSoLsw5iQWKAtqhRHcXmDfJgyw,16594
|
|
53
|
-
akshare/economic/macro_australia.py,sha256=
|
|
53
|
+
akshare/economic/macro_australia.py,sha256=qniqZn2DKPe0ahKqO_5OTgVug3kOUAJt7knSwe_3Y-0,11648
|
|
54
54
|
akshare/economic/macro_bank.py,sha256=wG_u5w5YjeFRn1wr-Re7ty_s2CbQ0Qphxs_bIF_20UQ,11495
|
|
55
55
|
akshare/economic/macro_canada.py,sha256=nNaZ3yZIvgTtRiQhwoEybMX6UpqszPKeixzYITv9ox0,15195
|
|
56
56
|
akshare/economic/macro_china.py,sha256=O3pgTke7VbHMJKY3ZRU6hC_noOXnaQFPr0u2qJsebEY,148855
|
|
@@ -159,7 +159,7 @@ akshare/index/index_eri.py,sha256=7X0KNDBntEkE_qSb2jb6IBv-S8PsevLFdxGT8nKT3W0,21
|
|
|
159
159
|
akshare/index/index_hog.py,sha256=kb867BVagt70_ycZMn22ks5Z9jlVbMiuTsvq5ygjeig,1657
|
|
160
160
|
akshare/index/index_kq_fz.py,sha256=Y-cbxWLpRyGcFcMSDxZZQXdAuD85IuQH5xC2rhtGbRc,3395
|
|
161
161
|
akshare/index/index_kq_ss.py,sha256=m4hAMNnzHk8JNAnKjkYYVeyG4zUC5zR5i0-u-OxmaGU,3333
|
|
162
|
-
akshare/index/index_option_qvix.py,sha256=
|
|
162
|
+
akshare/index/index_option_qvix.py,sha256=UHqLJXObn31Oa-RAB4Lgk5LwZ2FYAr1p--JvEfRpdUQ,14387
|
|
163
163
|
akshare/index/index_research_fund_sw.py,sha256=kVYjBl3vZg6CyYBCrxZiSv8taHMnqmG7PQ-LVmMNd3I,4603
|
|
164
164
|
akshare/index/index_research_sw.py,sha256=Mm1YtiP-PXhDysJwmFidX3RZSZZ92AyXpjl_tVrjdwA,21758
|
|
165
165
|
akshare/index/index_spot.py,sha256=meTBTCp2DPVTX_N3qpCLtkI-0q3XhrJ3gndNugRBGKg,1767
|
|
@@ -235,7 +235,7 @@ akshare/stock/stock_cg_equity_mortgage.py,sha256=Pui5aWKKPwGuKjF_GNpejDzsMGNPrxi
|
|
|
235
235
|
akshare/stock/stock_cg_guarantee.py,sha256=ts7qcQhhyN1PHB7Q4XlMn38HhfVvubOvky9RZfmUP94,3844
|
|
236
236
|
akshare/stock/stock_cg_lawsuit.py,sha256=6Y92pPw0JgyrInteqHuU07G1jwmdX2wjaDtrJN8y6Hg,4129
|
|
237
237
|
akshare/stock/stock_dividend_cninfo.py,sha256=_vipLQu94qBDoPkaIWZKRFA0mFfgroUMnn5EdLcjAc4,3195
|
|
238
|
-
akshare/stock/stock_dzjy_em.py,sha256=
|
|
238
|
+
akshare/stock/stock_dzjy_em.py,sha256=QMo2w-_I9UnmCr1IXk_InFeW5ok_GpRE9HdWFDUdGyM,22556
|
|
239
239
|
akshare/stock/stock_fund_em.py,sha256=Dnn72I85snGaMHCEmbXNANCfiHCuh7EkWn8t5EwO-HQ,48854
|
|
240
240
|
akshare/stock/stock_fund_hold.py,sha256=iFEmRFber7MF6aPi0QOJxpvYjO7I26KouUvC-xTQdCk,6056
|
|
241
241
|
akshare/stock/stock_gsrl_em.py,sha256=oy5vO681ZPTEehZgz10T8jgIQ8dNm_E7MXGr1PGoHqI,1951
|
|
@@ -378,8 +378,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
|
|
|
378
378
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
|
379
379
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
|
380
380
|
tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
|
381
|
-
akshare-1.15.
|
|
382
|
-
akshare-1.15.
|
|
383
|
-
akshare-1.15.
|
|
384
|
-
akshare-1.15.
|
|
385
|
-
akshare-1.15.
|
|
381
|
+
akshare-1.15.74.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
382
|
+
akshare-1.15.74.dist-info/METADATA,sha256=RsZENaH6zjGF_SgHh2X8mLRBfPjR6Q16Gv63Z73ta_M,13679
|
|
383
|
+
akshare-1.15.74.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
384
|
+
akshare-1.15.74.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
385
|
+
akshare-1.15.74.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|