Skip to main content

StrategiesFramework

Project description

StrategiesManager

这是一个策略回测库,支持内外盘期货历史回测跟实时回测两种模式

例子:

from strategies_manager import StrategiesManager

# 自定义操作函数
def myAction(data):
    """
    自定义操作
    实现自己的策略
    :param data: 行情数据,字典类型
    :return:
    """
    print(data)

# 创建实例
manager = StrategiesManager()
# 注册自定义函数
manager.registAction(myAction)

# 实时数据使用
manager.runRealTime(stock_code='NYMEX_F_CL_2010', ktype='1Min')

# 历史数据回测使用
manager.runHistory(stock_code='NYMEX_F_CL_2010', startTime='2020-06-07', endTime='2020-08-17', ktype='1Min')

更新日志

  • 2020.08.20

    1. 历史回测数据缓存本地
  • 2020.08.17

    1. 策略框架构建
    2. 添加获取历史记录接口

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

strategies-framework-1.1.0.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

strategies_framework-1.1.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

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