Skip to main content

Zillionare Trader Client

Project description

大富翁交易客户端

trade-client是大富翁量化框架中用来交易的客户端。它对回测和实盘提供了几乎相同的接口,从而使得经过回测的策略,可以无缝切换到实盘环境中。

功能

  • 进行实盘和回测交易
  • 获取账号基本信息,比如本金、资产、持仓、盈亏及盈亏比等。
  • 交易函数,比如买入(限价和市价)、卖出(限价和市价)、撤单等
  • 查询委托、成交、持仓(当日和指定日期)
  • 查询一段时间内的账户评估指标,比如sharpe, sortino, calmar, voliality, win rate, max drawdown等。
  • 查询参照标的同期指标。

!!!Warning 在回测模式下,注意可能引起账户数据改变的操作,比如buysell等,必须严格按时间顺序执行,比如下面的例子: client.buy(..., order_time=datetime.datetime(2022, 3, 1, 9, 31)) client.buy(..., order_time=datetime.datetime(2022, 3, 4, 14, 31)) client.buy(..., order_time=datetime.datetime(2022, 3, 4, 14, 32)) client.sell(..., order_time=datetime.datetime(2022, 3, 7, 9, 31)) 是正确的执行顺序,但下面的执行顺序必然产生错误的结果(实际上服务器也会进行检测并报错误) client.buy(..., order_time=datetime.datetime(2022, 3, 1, 14, 31)) client.buy(..., order_time=datetime.datetime(2022, 3, 1, 9, 31)) client.sell(..., order_time=datetime.datetime(2022, 3, 7, 9, 31)) 策略需要自行决定是否允许这样的情况发生,以及如果发生失,会产生什么样的后果。

Credits

This package was created with zillionare/python project wizard project template.

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

zillionare_trader_client-0.4.3.tar.gz (175.5 kB view details)

Uploaded Source

Built Distribution

zillionare_trader_client-0.4.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file zillionare_trader_client-0.4.3.tar.gz.

File metadata

  • Download URL: zillionare_trader_client-0.4.3.tar.gz
  • Upload date:
  • Size: 175.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.16 Linux/5.4.0-146-generic

File hashes

Hashes for zillionare_trader_client-0.4.3.tar.gz
Algorithm Hash digest
SHA256 4f0513ca1460d68d0b73c5075156a9a2ee60dd43a2ea84bfd75e242dd66f1173
MD5 cab1e5ae88fcf99900e69fe9eb0d6c4f
BLAKE2b-256 5f59aea7966547546239db9e38df314af800ee19b98b7c19baa2e4679f7a1e3d

See more details on using hashes here.

File details

Details for the file zillionare_trader_client-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for zillionare_trader_client-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8b55b61d2858b0818dfaf424323f21800d603d543f8d447393ce70872e03eed8
MD5 509ffbe280ab9e19a3c2f332a0e55e77
BLAKE2b-256 56edf2d97ac37c6db8165f8eab2bb9c27c8f195d4e06480de3f2d053ec4b51a1

See more details on using hashes here.

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