BI

class czsc.objects.BI(symbol: str, fx_a: czsc.objects.FX, fx_b: czsc.objects.FX, fxs: List, direction: czsc.enum.Direction, bars: List[czsc.objects.NewBar] = <factory>, cache: dict = <factory>)[source]

Bases: object

Attributes Summary

angle

笔的斜边与竖直方向的夹角,角度越大,力度越大

change

笔的涨跌幅

fake_bis

笔的内部分型连接得到近似次级别笔列表

high

hypotenuse

笔的斜边长度

length

笔的无包含关系K线数量

low

power

power_price

价差力度

power_volume

成交量力度

raw_bars

构成笔的原始K线序列

rsq

笔的原始K线 close 单变量线性回归 r2

Methods Summary

get_cache_with_default(key, default)

带有默认值计算的缓存读取

get_price_linear([price_key])

计算 price 的单变量线性回归特征

Attributes Documentation

angle

笔的斜边与竖直方向的夹角,角度越大,力度越大

change

笔的涨跌幅

fake_bis

笔的内部分型连接得到近似次级别笔列表

high
hypotenuse

笔的斜边长度

length

笔的无包含关系K线数量

low
power
power_price

价差力度

power_volume

成交量力度

raw_bars

构成笔的原始K线序列

rsq

笔的原始K线 close 单变量线性回归 r2

Methods Documentation

get_cache_with_default(key, default: Callable)[source]

带有默认值计算的缓存读取

Parameters:
  • key – 缓存 key

  • default – 如果没有缓存数据,用来计算默认值并更新缓存的函数

Returns:

get_price_linear(price_key='close')[source]

计算 price 的单变量线性回归特征

Parameters:

price_key – 指定价格类型,可选值 open close high low

Return value:

单变量线性回归特征,样例如下 {‘slope’: 1.565, ‘intercept’: 67.9783, ‘r2’: 0.9967}

slope 标识斜率 intercept 截距 r2 拟合优度