Crates.io | quantaxis-rs |
lib.rs | quantaxis-rs |
version | 0.3.4 |
source | src |
created_at | 2021-01-01 08:34:49.710282 |
updated_at | 2021-02-24 01:08:08.456572 |
description | quantaxis in rust |
homepage | https://github.com/yutiansut |
repository | https://github.com/yutiansut/quantaxis-rs |
max_upload_size | |
id | 330026 |
size | 440,297 |
兼容python版本的QUANTAXIS回测
兼容基于QIFI协议的所有项目
power by yutiansut/somewheve
2020
import QUANTAXIS as QA
mp = QA.QAARP.MARKET_PRESET()
for k,i in mp.table.items():
print(f"""market_preset.insert(
"{k}".to_string(),
CodePreset {{
name: "{i['name']}".to_string(),
unit_table: {int(i['unit_table'])},
price_tick: {float(i['price_tick'])},
buy_frozen_coeff: {i['buy_frozen_coeff']},
sell_frozen_coeff:{i['sell_frozen_coeff']},
exchange: "{i['exchange']}".to_string(),
commission_coeff_peramount: {float(i['commission_coeff_peramount'])},
commission_coeff_pervol:{float(i['commission_coeff_pervol'])},
commission_coeff_today_peramount: {float(i['commission_coeff_today_peramount'])},
commission_coeff_today_pervol: {float(i['commission_coeff_today_pervol'])},
}},
);""")