提交 2aafe8bd 编写于 作者: Z zengbin93

0.4.1 优化KlineAnalyze性能

上级 0fdb2b3c
# coding: utf-8
import sys
import warnings
sys.path.insert(0, ".")
sys.path.insert(0, "..")
import czsc
warnings.warn(f"czsc version is {czsc.__version__}")
from cobra.data.kline import get_kline
from czsc import KlineAnalyze
import pandas as pd
from czsc.analyze import KlineAnalyze
from datetime import datetime, timedelta
......
......@@ -11,7 +11,7 @@ from czsc.analyze import is_bei_chi, find_zs
warnings.warn(f"czsc version is {czsc.__version__}")
df = get_kline(ts_code="000001.SH", end_dt="2020-04-28 15:00:00", freq='D', asset='I')
ka = KlineAnalyze(df, name="日线")
ka = KlineAnalyze(df, name="日线", bi_mode='old')
print(ka)
......@@ -20,7 +20,7 @@ def test_kline_analyze():
assert ka.xd[-1]['fx_mark'] == 'd'
# 测试背驰识别
assert not ka.bi_bei_chi()
assert ka.bi_bei_chi()
assert ka.xd_bei_chi()
print(ka.zs[-2])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册