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

V0.9.55 更新一批代码 #206

Merged
merged 8 commits into from
Jul 12, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Python package

on:
push:
branches: [ master, V0.9.54 ]
branches: [ master, V0.9.55 ]
pull_request:
branches: [ master ]

Expand Down
9 changes: 7 additions & 2 deletions czsc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
ExitsOptimize,
)
from czsc.utils import (
mac_address,
overlap,

format_standard_kline,
Expand Down Expand Up @@ -105,6 +106,10 @@

optuna_study,
optuna_good_params,

generate_fernet_key,
fernet_encrypt,
fernet_decrypt,
)

# 交易日历工具
Expand Down Expand Up @@ -187,10 +192,10 @@
)


__version__ = "0.9.54"
__version__ = "0.9.55"
__author__ = "zengbin93"
__email__ = "[email protected]"
__date__ = "20240616"
__date__ = "20240706"


def welcome():
Expand Down
3 changes: 1 addition & 2 deletions czsc/connectors/cooperation.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ def stocks_daily_klines(sdt="20170101", edt="20240101", **kwargs):
for year in years:
ttl = 3600 * 6 if year == str(datetime.now().year) else -1
kline = dc.pro_bar(trade_year=year, adj=adj, v=2, ttl=ttl)
kline["price"] = kline["open"].shift(-1)
kline["price"] = kline["price"].fillna(kline["close"])
res.append(kline)

dfk = pd.concat(res, ignore_index=True)
Expand All @@ -223,6 +221,7 @@ def stocks_daily_klines(sdt="20170101", edt="20240101", **kwargs):
dfk = dfk[~dfk["code"].str.endswith(".BJ")].reset_index(drop=True)

dfk = dfk.rename(columns={"code": "symbol"})
dfk["price"] = dfk["close"]
nxb = kwargs.get("nxb", [1, 2, 5, 10, 20, 30, 60])
if nxb:
dfk = czsc.update_nxb(dfk, nseq=nxb)
Expand Down
Loading
Loading