Skip to content

Commit

Permalink
V0.9.55 更新一批代码 (#206)
Browse files Browse the repository at this point in the history
* 0.9.55 start coding

* 飞书API (#202)

Co-authored-by: jun <>

* 0.9.55 新增飞书多维表格API接口

* 增加gm 可实盘模板 (#205)

* 0.9.55 update

* 0.9.55 新增 fernet 加密解密方法

* 0.9.55 update

---------

Co-authored-by: JunTurbo <[email protected]>
Co-authored-by: xie lee <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2024
1 parent 3681728 commit 277defc
Show file tree
Hide file tree
Showing 14 changed files with 1,629 additions and 110 deletions.
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

0 comments on commit 277defc

Please sign in to comment.