docs.rs failed to build czsc-1.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
czsc
🚀 这是 czsc 量化分析框架的官方推荐入口(facade crate)。 Rust 用户只需
cargo add czsc即可获得全部公共 API。
CZSC(缠中说禅)量化分析框架的 Rust 入口。
本 crate 是一个 facade:本身不实现任何功能,只把 czsc Rust workspace 中
的 5 个业务 crate(czsc-core / czsc-utils / czsc-ta /
czsc-signals / czsc-trader)汇总到一个 crate 名下,让纯 Rust 用户
不用一行一行加 5 个依赖。
想用 Python 接口?请直接
pip install czsc,那是基于maturin编译的 CPython 扩展,与本 facade 同源但接口面不同。
用法
[]
= "1.0"
use ;
use CZSC as Analyzer;
let bars: = /* ... */;
let analyzer = new;
println!;
也可以按子模块组织 import:
use BI;
use ema;
use TRADER_SIGNAL_REGISTRY;
use ;
命名空间速查
| 路径 | 等价于 |
|---|---|
czsc::analyze |
czsc_core::analyze |
czsc::objects::* |
czsc_core::objects::* |
czsc::error_chain |
czsc_core::error_chain |
czsc::ta |
czsc_ta::pure |
czsc::bar_generator |
czsc_utils::bar_generator |
czsc::freq_data |
czsc_utils::freq_data |
czsc::trading_time |
czsc_utils::trading_time |
czsc::signals |
czsc_signals |
czsc::trader |
czsc_trader 的对外公共面 |
顶层 czsc::* 还直接挂了最常用的核心类型:CZSC / RawBar / NewBar /
Freq / FX / BI / ZS / Mark / Direction / Operate / Event /
Position / Market / BarGenerator / CzscSignals / SignalConfig /
is_trading_time。
Features
- (default) —— 纯 Rust API
python—— 透传给czsc-core/czsc-utils/czsc-ta,给嵌入 PyO3 的下游使用。一般用户不需要
工作区其它 crate
| crate | 说明 |
|---|---|
czsc-core |
缠论核心数据结构与算法 |
czsc-utils |
BarGenerator / freq_data / trading_time |
czsc-ta |
技术分析算子 |
czsc-signals |
30+ 量化信号函数 |
czsc-trader |
交易引擎与信号编译 |
czsc-derive |
错误派生宏(内部用) |
czsc-signal-macros |
信号注册宏(内部用) |