Skip to content

Commit

Permalink
v4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-001 committed Jul 2, 2023
1 parent 732e3d5 commit f75f48a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pure_ocean_breeze/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
一个量化多因子研究的框架,包含数据、回测、因子加工等方面的功能
"""

__updated__ = "2023-06-29 21:50:43"
__version__ = "4.0.0"
__updated__ = "2023-07-03 01:22:04"
__version__ = "4.0.1"
__author__ = "chenzongwei"
__author_email__ = "[email protected]"
__url__ = "https://github.com/chen-001/pure_ocean_breeze"
Expand Down
11 changes: 6 additions & 5 deletions pure_ocean_breeze/data/write_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__updated__ = "2023-06-27 20:38:39"
__updated__ = "2023-07-02 02:35:59"

import time

Expand Down Expand Up @@ -119,9 +119,9 @@ def convert_tick_by_tick_data_to_parquet(file_name:str,PATH:str,delete_7z:bool=F
"TranID": "tranid",
"Time": "date",
"Price": "price",
"Volume": "money",
"SaleOrderVolume": "salemoney",
"BuyOrderVolume": "buymoney",
"Volume": "amount",
"SaleOrderVolume": "saleamount",
"BuyOrderVolume": "buyamount",
"Type": "action",
"SaleOrderID": "saleid",
"SaleOrderPrice": "saleprice",
Expand Down Expand Up @@ -1258,7 +1258,8 @@ def save(df, old, file):
df.code = df.code.apply(lambda x: convert_code(x)[0])
df = pd.concat([old, df], ignore_index=True)
df = df[df.date.isin(list(a.index))]
df.reset_index(drop=True).to_parquet(homeplace.daily_data_file + file)
df=df.reset_index(drop=True).replace(True,1).replace(False,0)
df.to_parquet(homeplace.daily_data_file + file)
return df

dfs_codes = save(dfs_codes, old_codes, "中信一级行业哑变量代码版.parquet")
Expand Down
7 changes: 5 additions & 2 deletions pure_ocean_breeze/labor/process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__updated__ = "2023-06-28 16:10:41"
__updated__ = "2023-07-02 02:33:46"

import warnings

Expand Down Expand Up @@ -6695,7 +6695,10 @@ def get_daily_factors(
)
self.factor_new.append(df)
# 拼接新的和旧的
self.factor = pd.concat([self.factor_old, self.factor_new]).sort_index()
if self.factor_old is not None:
self.factor = pd.concat([self.factor_old, self.factor_new]).sort_index()
else:
self.factor=self.factor_new.sort_index()
self.factor = drop_duplicates_index(self.factor.dropna(how="all"))
new_end_date = datetime.datetime.strftime(self.factor.index.max(), "%Y%m%d")
# 存入本地
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__updated__ = "2023-06-28 13:20:31"
__updated__ = "2023-07-03 01:21:54"

from setuptools import setup
import setuptools
Expand All @@ -21,7 +21,7 @@ def get_version(package):
"scipy",
"statsmodels",
"plotly",
"matplotlib",
# "matplotlib",
"pyarrow",
"loguru",
"knockknock",
Expand Down
10 changes: 9 additions & 1 deletion 更新日志/version4.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
## 更新日志🗓 — v4


* v4.0.1 — 2023.7.3

> 1. 修正了convert_tick_by_tick_data_to_parquet中成交额与成交量的混淆错误
> 2. 修复了database_update_zxindustry_member中的一些异常
> 3. 修复了pure_fall_nature中的一些异常
> 4. 取消了对matplotlib库的依赖

* v4.0.0 — 2023.6.28

> 1. 修复了初始化时可能产生的报错,将初始化函数更名为ini,可通过如下语句初始化
>
> ```python
> import pure_ocean_breeze as p
>
>
> p.ini()
> ```
> 2. 初始化函数与`Homeplace`参数新增了存储逐笔数据的路径
Expand Down

0 comments on commit f75f48a

Please sign in to comment.