Skip to main content

UNKNOWN

Project description

quantx
======

安装方式
--------
pip install -e git+git@gitlab.chinascope.net:quantx/quantx.git#egg=quantx


更新方式
--------
pip uninstall quantx
pip install -e git+git@gitlab.chinascope.net:quantx/quantx.git#egg=quantx


策略脚本示例
------
from quantx.btest.api import order_percent
from quantx.btest.core import ExchContext
from quantx.btest.data import Data


def initialize(context: ExchContext):
context.fired = False
context.cash = 1000000
context.benchmark = "000001"


def handle_bar(context: ExchContext, data: Data):
if not context.fired:
order_percent("600642", 1)
context.fired = True


if __name__ == '__main__':

from quantx.btest.exch import SimulationExch
from quantx.plotting import show_draw_result

exch = SimulationExch()
result = exch.run(
start_date="2016-01-01",
end_date="2016-03-01",
handle_bar=handle_bar,
initialize=initialize)

analyse(result)

命令行工具
----------
Usage: quantx [OPTIONS] COMMAND [ARGS]...

Options:
--help Show this message and exit.

Commands:
clean 清理数据
config 配置文件
import 导入因子数据
plot 图表
run 执行策略
update_factor 更新因子数据
update_market 更新行情数据

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantx-0.0.1.1.tar.gz (29.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page