Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
F
fof
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
fof
Commits
8bb09c9a
Commit
8bb09c9a
authored
Nov 29, 2021
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed wrong class
parent
43955e6c
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
41 deletions
+48
-41
010 股票型基金.ipynb
010 股票型基金.ipynb
+0
-0
020 混合型基金.ipynb
020 混合型基金.ipynb
+0
-0
030 债券型基金.ipynb
030 债券型基金.ipynb
+0
-0
040 货币基金.ipynb
040 货币基金.ipynb
+8
-8
050 另类投资基金.ipynb
050 另类投资基金.ipynb
+8
-8
060 QDII基金.ipynb
060 QDII基金.ipynb
+10
-10
070 FOF基金.ipynb
070 FOF基金.ipynb
+9
-9
utility.py
utility.py
+13
-6
No files found.
010 股票型基金.ipynb
View file @
8bb09c9a
This diff is collapsed.
Click to expand it.
020 混合型基金.ipynb
View file @
8bb09c9a
This diff is collapsed.
Click to expand it.
030 债券型基金.ipynb
View file @
8bb09c9a
This diff is collapsed.
Click to expand it.
040 货币基金.ipynb
View file @
8bb09c9a
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
1
,
"execution_count":
8
,
"id": "51382765-24b4-4e5e-a118-077b276e0774",
"metadata": {},
"outputs": [],
...
...
@@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count":
2
,
"execution_count":
9
,
"id": "47939edc-07d2-4c8e-b061-187806e124ea",
"metadata": {},
"outputs": [],
...
...
@@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
10
,
"id": "9a596482-dd98-49dc-b717-c17177f2cd64",
"metadata": {},
"outputs": [],
...
...
@@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
11
,
"id": "7e1a0517-e3de-4ea7-ae3c-9c2292c63260",
"metadata": {},
"outputs": [],
...
...
@@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
12
,
"id": "b0d0d48b-708b-447a-922b-500fbfb97600",
"metadata": {},
"outputs": [],
...
...
@@ -64,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count":
6
,
"execution_count":
13
,
"id": "5ccf2dc7-fea9-4d52-b15d-e8ff55fac3dc",
"metadata": {},
"outputs": [],
...
...
@@ -76,7 +76,7 @@
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
14
,
"id": "9d34507e-9efd-479a-8b25-a095de5a552c",
"metadata": {},
"outputs": [
...
...
@@ -148,7 +148,7 @@
"场外货币型基金 542 542 496 542 542 542"
]
},
"execution_count":
7
,
"execution_count":
14
,
"metadata": {},
"output_type": "execute_result"
}
...
...
050 另类投资基金.ipynb
View file @
8bb09c9a
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
1
,
"execution_count":
8
,
"id": "76b46662-651d-4bcd-b554-f116051cf297",
"metadata": {},
"outputs": [],
...
...
@@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count":
2
,
"execution_count":
9
,
"id": "f5d4b805-d5a3-4b4c-8429-7044e9bef831",
"metadata": {},
"outputs": [],
...
...
@@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
10
,
"id": "72d3f785-aee7-44d9-a393-3abbdb4d60a4",
"metadata": {},
"outputs": [],
...
...
@@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
11
,
"id": "f5f5cc7d-c2d4-4c7f-b8a9-dd133407f9c6",
"metadata": {},
"outputs": [],
...
...
@@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
12
,
"id": "52607b95-9d62-4f68-8256-984827dd0bea",
"metadata": {},
"outputs": [],
...
...
@@ -64,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count":
6
,
"execution_count":
13
,
"id": "60fe66ee-a8d3-4a33-8c5a-555f68d9758c",
"metadata": {},
"outputs": [],
...
...
@@ -76,7 +76,7 @@
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
14
,
"id": "1bb62bc7-2515-415a-8eec-087d2d1787b6",
"metadata": {},
"outputs": [
...
...
@@ -177,7 +177,7 @@
"量化对冲基金 10 17 17 17 "
]
},
"execution_count":
7
,
"execution_count":
14
,
"metadata": {},
"output_type": "execute_result"
}
...
...
060 QDII基金.ipynb
View file @
8bb09c9a
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
2
,
"execution_count":
10
,
"id": "b81e5b9e-b8f5-4198-b98c-2e26f025875c",
"metadata": {},
"outputs": [],
...
...
@@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
11
,
"id": "8bf4331c-c1db-47b4-b72d-10d5ccb72657",
"metadata": {},
"outputs": [],
...
...
@@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
12
,
"id": "d228ec88-a55b-4451-8a69-1a0e490b9161",
"metadata": {},
"outputs": [],
...
...
@@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
13
,
"id": "7763ee34-dbba-4297-b2d8-16fc98be8a3b",
"metadata": {},
"outputs": [],
...
...
@@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count":
6
,
"execution_count":
14
,
"id": "e12d8f3b-0570-40db-9ec3-d6804b78c686",
"metadata": {},
"outputs": [],
...
...
@@ -64,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
15
,
"id": "b3f87023-d068-4014-975c-22db615c3273",
"metadata": {},
"outputs": [
...
...
@@ -75,7 +75,7 @@
" 'QDII房地产信托基金', '灵活配置型基金(股票上限95%)(A类)'], dtype=object)"
]
},
"execution_count":
7
,
"execution_count":
15
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -86,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count":
8
,
"execution_count":
16
,
"id": "0efd51eb-a03c-440b-b083-a36df52f9185",
"metadata": {},
"outputs": [],
...
...
@@ -100,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count":
9
,
"execution_count":
17
,
"id": "850b9707-8849-48b5-9b39-9111ab78ccc1",
"metadata": {},
"outputs": [
...
...
@@ -235,7 +235,7 @@
"QDII股票型基金 53 40 53 53 53 "
]
},
"execution_count":
9
,
"execution_count":
17
,
"metadata": {},
"output_type": "execute_result"
}
...
...
070 FOF基金.ipynb
View file @
8bb09c9a
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
1
,
"execution_count":
9
,
"id": "de082674-0285-4894-905a-52da1ab1727d",
"metadata": {},
"outputs": [],
...
...
@@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count":
2
,
"execution_count":
10
,
"id": "11d2dbfe-b1c7-41b1-8df3-b6f40b096f83",
"metadata": {},
"outputs": [],
...
...
@@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
11
,
"id": "004a8f9f-4011-48c6-a5dd-327cce42de51",
"metadata": {},
"outputs": [],
...
...
@@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
12
,
"id": "acf00858-6782-4ecb-8a87-9045810ce589",
"metadata": {},
"outputs": [],
...
...
@@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count":
7
,
"execution_count":
13
,
"id": "08bfc149-90e5-405d-a1f2-6ec750c26f9e",
"metadata": {},
"outputs": [],
...
...
@@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count":
21
,
"execution_count":
14
,
"id": "493e2114-8eaa-4c5c-bec4-2e297eaf3c99",
"metadata": {},
"outputs": [
...
...
@@ -115,7 +115,7 @@
"Index: []"
]
},
"execution_count":
21
,
"execution_count":
14
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -126,7 +126,7 @@
},
{
"cell_type": "code",
"execution_count":
8
,
"execution_count":
15
,
"id": "fc897e0e-46f1-48a2-be9a-6381086c94bf",
"metadata": {},
"outputs": [
...
...
@@ -304,7 +304,7 @@
"3902 稳健成长型 "
]
},
"execution_count":
8
,
"execution_count":
15
,
"metadata": {},
"output_type": "execute_result"
}
...
...
utility.py
View file @
8bb09c9a
...
...
@@ -92,11 +92,18 @@ def fd_typeclass(security_ids, trade_dt=None):
sec_id_strs
=
","
.
join
([
"'"
+
s
+
"'"
for
s
in
security_ids
])
query
=
f
"""
select SECURITYID, L1CODE, L1NAME, L2CODE, L2NAME, L3CODE, L3NAME from TQ_FD_TYPECLASS
select TQ_FD_BASICINFO.SECODE as SECURITYID,
TQ_FD_TYPECLASS.L1CODE,
TQ_FD_TYPECLASS.L1NAME,
TQ_FD_TYPECLASS.L2CODE,
TQ_FD_TYPECLASS.L2NAME,
TQ_FD_TYPECLASS.L3CODE,
TQ_FD_TYPECLASS.L3NAME from TQ_FD_TYPECLASS join TQ_FD_BASICINFO on TQ_FD_BASICINFO.SECURITYID = TQ_FD_TYPECLASS.SECURITYID
WHERE
ISVALID = 1 AND
SECURITYID in ({sec_id_strs}) AND
(ENDDATE >= '{trade_dt}' or ENDDATE = '19000101')
TQ_FD_TYPECLASS.ISVALID = 1 AND
TQ_FD_BASICINFO.ISVALID = 1 AND
TQ_FD_BASICINFO.SECODE in ({sec_id_strs}) AND
(TQ_FD_TYPECLASS.ENDDATE >= '{trade_dt}' or TQ_FD_TYPECLASS.ENDDATE = '19000101')
"""
return
read_sql
(
query
)
...
...
@@ -163,9 +170,9 @@ def fd_qtfdnav(security_ids, trade_dt):
sec_id_strs
=
","
.
join
([
"'"
+
s
+
"'"
for
s
in
security_ids
])
query
=
f
"""
SELECT SECODE as SECURITYID, UNITNAV,
ACCUNITNAV from TQ_QT_FDNAV
SELECT SECODE as SECURITYID, UNITNAV,
UNITACCNAV, REPAIRUNITNAV, NAVGRTD from TQ_FD_DERIVEDN
WHERE
NAV
DATE = '{trade_dt}' AND
END
DATE = '{trade_dt}' AND
ISVALID = 1 AND
SECODE in ({sec_id_strs})
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment