Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #115

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Dev #115

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ print(res_df)

> 对于项目有支持,包括但不仅限:内容贡献,bug提交,思想交流等等,对项目有影响的个人和机构

| Simon | [bigbigbigfish](https://github.com/bigbigbigfish) | [LuneZ99](https://github.com/LuneZ99) | 匿名用户 | thue | [Triones009](https://github.com/Triones009) | **[adaaaaaa](https://github.com/adaaaaaa)** | **[LeslieWuboy](https://github.com/LeslieWuboy)** | [yinzhengxin](https://github.com/yinzhengxin) |
| ------------------------------------- | ------------------------------------------------- | --------------------------------------------- | -------- | --------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------------- | --------------------------------------------- |
| [yxm0513](https://github.com/yxm0513) | [hanxuanliang](https://github.com/hanxuanliang) | [akihara-sam](https://github.com/akihara-sam) | Andy | [baei2048](https://github.com/baei2048) | [zpsakura](https://github.com/zpsakura) | [Yzx-1024](https://github.com/Yzx-1024) | | |
| Simon | [bigbigbigfish](https://github.com/bigbigbigfish) | [LuneZ99](https://github.com/LuneZ99) | 匿名用户 | thue | [Triones009](https://github.com/Triones009) | **[adaaaaaa](https://github.com/adaaaaaa)** | **[LeslieWuboy](https://github.com/LeslieWuboy)** | [yinzhengxin](https://github.com/yinzhengxin) |
| ------------------------------------- | ------------------------------------------------- | --------------------------------------------- | -------- | --------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------------------- | --------------------------------------------- |
| [yxm0513](https://github.com/yxm0513) | [hanxuanliang](https://github.com/hanxuanliang) | [akihara-sam](https://github.com/akihara-sam) | Andy | [baei2048](https://github.com/baei2048) | [zpsakura](https://github.com/zpsakura) | [Yzx-1024](https://github.com/Yzx-1024) | [Snowfall-in-June](https://github.com/Snowfall-in-June) | |

----------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion adata/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

VERSION = (2, 7, 1)
VERSION = (2, 7, 2)
PRERELEASE = None # alpha, beta or rc
REVISION = None

Expand Down
12 changes: 11 additions & 1 deletion adata/stock/market/capital_flow/stock_capital_flow_east.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,19 @@ def get_capital_flow(self, stock_code: str = '000001', start_date=None, end_date
df = df.astype({'main_net_inflow': 'float64', 'sm_net_inflow': 'float64',
'mid_net_inflow': 'float64', 'lg_net_inflow': 'float64', 'max_net_inflow': 'float64'
})

# 4. 范围筛选
df['trade_date'] = pd.to_datetime(df['trade_date'])
if start_date is not None:
start_date = pd.to_datetime(start_date)
df = df[df['trade_date'] >= start_date]
if end_date is not None:
end_date = pd.to_datetime(end_date)
df = df[df['trade_date'] <= end_date]
df['trade_date'] = pd.to_datetime(df['trade_date']).dt.strftime('%Y-%m-%d')
return df


if __name__ == '__main__':
print(StockCapitalFlowEast().get_capital_flow_min(stock_code='300059'))
print(StockCapitalFlowEast().get_capital_flow(stock_code='000001'))
print(StockCapitalFlowEast().get_capital_flow(stock_code='000001', start_date='2024-12-01'))
17 changes: 17 additions & 0 deletions adata/stock/market/concept_capital_flow/concept_flow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
"""
@desc: 概念资金流向

东方财富:概念
https://data.eastmoney.com/bkzj/gn.html
@author: 1nchaos
@time: 2024/11/14
@log: change log
"""


class ConceptCapitalFlow(object):
"""概念资金流向"""

def __init__(self) -> None:
super().__init__()