Hikyuu Quant Framework 基于C++/Python的开源量化交易研究框架

Related tags

Algorithms quant
Overview
Hikyuu
https://travis-ci.org/fasiondog/hikyuu.svg?branch=master GitHub

Hikyuu Quant Framework是一款基于C++/Python的开源量化交易研究框架,用于策略分析及回测(仅受限于数据,如有数据也可用于期货等)。其核心思想基于当前成熟的系统化交易方法,将整个系统化交易抽象为由市场环境判断策略、系统有效条件、信号指示器、止损/止盈策略、资金管理策略、盈利目标策略、移滑价差算法七大组件,你可以分别构建这些组件的策略资产库,在实际研究中对它们自由组合来观察系统的有效性、稳定性以及单一种类策略的效果。

详细文档: https://hikyuu.org/

如果上述网站无法访问,请戳这里: http://fasiondog.gitee.io/hikyuu/

祝贺 HIKYUU 入选 GITEE 最有价值开源项目 GVP

Gitee

给作者加点油,每天扫扫红包,或者请作者喝杯咖啡

http://fasiondog.gitee.io/hikyuu/images/juanzeng.jpg

示例:

#创建模拟交易账户进行回测,初始资金30万
my_tm = crtTM(initCash = 300000)

#创建信号指示器(以5日EMA为快线,5日EMA自身的10日EMA最为慢线,快线向上穿越慢线时买入,反之卖出)
my_sg = SG_Flex(OP(EMA(n=5)), slow_n=10)

#固定每次买入1000股
my_mm = MM_FixedCount(1000)

#创建交易系统并运行
sys = SYS_Simple(tm = my_tm, sg = my_sg, mm = my_mm)
sys.run(sm['sz000001'], Query(-150))
http://fasiondog.gitee.io/hikyuu/images/10000-overview.png

完整示例参见:https://nbviewer.jupyter.org/github/fasiondog/hikyuu/blob/master/hikyuu/examples/notebook/000-Index.ipynb?flush_cache=True

为什么选择 Hikyuu?

  • 组合灵活,分类构建策略资产库 Hikyuu对系统化交易方法进行了良好的抽象,包含了九大策略组件:市场环境判断策略、系统有效条件、信号指示器、止损/止盈策略、资金管理策略、盈利目标策略、移滑价差算法、交易对象选择策略、资金分配策略。可以在此基础上构建自己的策略库,并进行灵活的组合和测试。在进行策略探索时,可以更加专注于某一方面的策略性能与影响。其主要功能模块如下:

    http://fasiondog.gitee.io/hikyuu/images/10002-function-arc.png
  • 性能保障,打造自己的专属应用 目前项目包含了3个主要组成部分:基于C++的核心库、对C++进行包装的Python库(hikyuu)、基于Python的交互式工具。

    • C++核心库,提供了整体的策略框架,在保证性能的同时,已经考虑了对多线程和多核处理的支持,在未来追求更高运算速度提供便利。C++核心库,可以单独剥离使用,自行构建自己的客户端工具。
    • Python库(hikyuu),提供了对C++库的包装,同时集成了talib库(如TA_SMA,对应talib.SMA),可以与numpy、pandas数据结构进行互相转换,为使用其他成熟的python数据分析工具提供了便利。
    • hikyuu.interactive 交互式探索工具,提供了K线、指标、系统信号等的基本绘图功能,用于对量化策略的探索和回测。
  • 代码简洁,探索更便捷、自由 同时支持面向对象和命令行编程范式。其中,命令行在进行策略探索时,代码简洁、探索更便捷、自由。

  • 安全、自由、隐私,搭建自己的专属云量化平台 结合 Python + Jupyter 的强大能力与云服务器,可以搭建自己专属的云量化平台。将Jupyter部署在云服务器上,随时随地的访问自己的云平台,即刻实现自己新的想法,如下图所示通过手机访问自己的云平台。结合Python强大成熟的数据分析、人工智能工具(如 numpy、scipy、pandas、TensorFlow)搭建更强大的人工智能平台。

  • 数据存储方式可扩展 目前支持本地HDF5格式、MySQL存储。默认使用HDF5,数据文件体积小、速度更快、备份更便利。截止至2017年4月21日,沪市日线数据文件149M、深市日线数据文件184M、5分钟线数据各不到2G。

You might also like...
header only, dependency-free deep learning framework in C++14
header only, dependency-free deep learning framework in C++14

The project may be abandoned since the maintainer(s) are just looking to move on. In the case anyone is interested in continuing the project, let us k

a unified framework for modeling chemically reactive systems

Reaktoro Reaktoro is a unified framework for modeling chemically reactive systems. It provides methods for chemical equilibrium and kinetic calculatio

Async++ concurrency framework for C++11

Async++ Async++ is a lightweight concurrency framework for C++11. The concept was inspired by the Microsoft PPL library and the N3428 C++ standard pro

A task scheduling framework designed for the needs of game developers.

Intel Games Task Scheduler (GTS) To the documentation. Introduction GTS is a C++ task scheduling framework for multi-processor platforms. It is design

An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.
An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.

What is SObjectizer? What distinguishes SObjectizer? SObjectizer is not like TBB, taskflow or HPX Show me the code! HelloWorld example Ping-Pong examp

Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

A unit testing framework for C

Check Table of Contents About Installing Linking Packaging About Check is a unit testing framework for C. It features a simple interface for defining

The fastest feature-rich C++11/14/17/20 single-header testing framework
The fastest feature-rich C++11/14/17/20 single-header testing framework

master branch Windows All dev branch Windows All doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of

A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

Catch2 v3 is being developed! You are on the devel branch, where the next major version, v3, of Catch2 is being developed. As it is a significant rewo

A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

Catch2 v3 is being developed! You are on the devel branch, where the next major version, v3, of Catch2 is being developed. As it is a significant rewo

C++ Benchmark Authoring Library/Framework

Celero C++ Benchmarking Library Copyright 2017-2019 John Farrier Apache 2.0 License Community Support A Special Thanks to the following corporations f

CppUTest unit testing and mocking framework for C/C++

CppUTest CppUTest unit testing and mocking framework for C/C++ More information on the project page Slack channel: Join if link not expired Getting St

A testing micro framework for creating function test doubles

Fake Function Framework (fff) A Fake Function Framework for C Hello Fake World! Capturing Arguments Return Values Resetting a Fake Call History Defaul

Googletest - Google Testing and Mocking Framework

GoogleTest OSS Builds Status Announcements Release 1.10.x Release 1.10.x is now available. Coming Soon Post 1.10.x googletest will follow Abseil Live

Minimal unit testing framework for C

MinUnit Minunit is a minimal unit testing framework for C/C++ self-contained in a single header file. It provides a way to define and configure test s

A C++ micro-benchmarking framework

Nonius What is nonius? Nonius is an open-source framework for benchmarking small snippets of C++ code. It is very heavily inspired by Criterion, a sim

A lightweight unit testing framework for C++

Maintenance of UnitTest++, recently sporadic, is officially on hiatus until 26 November 2020. Subscribe to https://github.com/unittest-cpp/unittest-cp

🧪 single header unit testing framework for C and C++

🧪 utest.h A simple one header solution to unit testing for C/C++. Usage Just #include "utest.h" in your code! The current supported platforms are Lin

UT: C++20 μ(micro)/Unit Testing Framework
UT: C++20 μ(micro)/Unit Testing Framework

"If you liked it then you "should have put a"_test on it", Beyonce rule [Boost::ext].UT / μt | Motivation | Quick Start | Overview | Tutorial | Exampl

Comments
  • Crush with the function `WEAVE`

    Crush with the function `WEAVE`

    env: conda venv python=3.8.13 hikyuu==1.2.7 my code:

    stk=sm['SH000001']
    k=stk.get_kdata(Q(-100))
    WEAVE(VOL(k),C(k))
    

    the error is:

    Canceled future for execute_request message before replies were done
    在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。请查看单元格中的代码,以确定故障的可能原因。有关详细信息,请单击 [此处](https://aka.ms/vscodeJupyterKernelCrash)。有关更多详细信息,请查看 Jupyter [log](command:jupyter.viewOutput)。
    

    image

    opened by JiaoyangXu-hub 0
  • [build] build script return value is incorrect

    [build] build script return value is incorrect

    environment

    os:

    > cat /etc/os-release
    
    NAME="Rocky Linux"
    VERSION="8.7 (Green Obsidian)"
    ID="rocky"
    ID_LIKE="rhel centos fedora"
    VERSION_ID="8.7"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="Rocky Linux 8.7 (Green Obsidian)"
    ANSI_COLOR="0;32"
    LOGO="fedora-logo-icon"
    CPE_NAME="cpe:/o:rocky:rocky:8:GA"
    HOME_URL="https://rockylinux.org/"
    BUG_REPORT_URL="https://bugs.rockylinux.org/"
    ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
    ROCKY_SUPPORT_PRODUCT_VERSION="8.7"
    REDHAT_SUPPORT_PRODUCT="Rocky Linux"
    REDHAT_SUPPORT_PRODUCT_VERSION="8.7"
    

    xmake version:

    > xmake --version  
    
    xmake v2.7.3+202211201753, A cross-platform build utility based on Lua
    Copyright (C) 2015-present Ruki Wang, tboox.org, xmake.io
                             _
        __  ___ __  __  __ _| | ______
        \ \/ / |  \/  |/ _  | |/ / __ \
         >  <  | \__/ | /_| |   <  ___/
        /_/\_\_|_|  |_|\__ \|_|\_\____|
                             by ruki, xmake.io
        
        👉  Manual: https://xmake.io/#/getting_started
        🙏  Donate: https://xmake.io/#/sponsor
        
    

    source package version:

    https://github.com/fasiondog/hikyuu/archive/refs/tags/1.2.6.tar.gz
    

    problem

    run command:

    cd /packages/hikyuu \
        && tar zxf hikyuu-1.2.6.tar.gz \
        && tar zxf boost_1_69_0.tar.gz -C hikyuu-1.2.6/ \
        && cd hikyuu-1.2.6 \
        && python setup.py build -j 24 \
        && python setup.py test \
        && python setup.py install
    

    result:

    0960642931DADA479B46222E0E2E33EE

    expect:

    returns a non-zero value, indicating that the current command failed to execute

    opened by LiaoSirui 0
  • [build] The data required for the test case is not included in the source code package

    [build] The data required for the test case is not included in the source code package

    the data required for the test case is not included in the source code package, so the test cannot be run directly

    environment

    os:

    > cat /etc/os-release
    
    NAME="Rocky Linux"
    VERSION="8.7 (Green Obsidian)"
    ID="rocky"
    ID_LIKE="rhel centos fedora"
    VERSION_ID="8.7"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="Rocky Linux 8.7 (Green Obsidian)"
    ANSI_COLOR="0;32"
    LOGO="fedora-logo-icon"
    CPE_NAME="cpe:/o:rocky:rocky:8:GA"
    HOME_URL="https://rockylinux.org/"
    BUG_REPORT_URL="https://bugs.rockylinux.org/"
    ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
    ROCKY_SUPPORT_PRODUCT_VERSION="8.7"
    REDHAT_SUPPORT_PRODUCT="Rocky Linux"
    REDHAT_SUPPORT_PRODUCT_VERSION="8.7"
    

    xmake version:

    > xmake --version  
    
    xmake v2.7.3+202211201753, A cross-platform build utility based on Lua
    Copyright (C) 2015-present Ruki Wang, tboox.org, xmake.io
                             _
        __  ___ __  __  __ _| | ______
        \ \/ / |  \/  |/ _  | |/ / __ \
         >  <  | \__/ | /_| |   <  ___/
        /_/\_\_|_|  |_|\__ \|_|\_\____|
                             by ruki, xmake.io
        
        👉  Manual: https://xmake.io/#/getting_started
        🙏  Donate: https://xmake.io/#/sponsor
        
    

    source package version:

    https://github.com/fasiondog/hikyuu/archive/refs/tags/1.2.6.tar.gz
    

    problem

    run command:

    cd /packages/hikyuu \
        && tar zxf hikyuu-1.2.6.tar.gz \
        && tar zxf boost_1_69_0.tar.gz -C hikyuu-1.2.6/ \
        && cd hikyuu-1.2.6 \
        && python setup.py build -j 24 \
        && python setup.py test \
        && python setup.py install
    

    result:

    4351C2539368A0EBBA004C03702F4F6E

    opened by LiaoSirui 0
  • Mac编译安装后执行HikyuuTDX报错

    Mac编译安装后执行HikyuuTDX报错

    $ HikyuuTDX Traceback (most recent call last): File "/usr/local/bin/HikyuuTDX", line 5, in from hikyuu.gui.HikyuuTDX import start File "/usr/local/lib/python3.9/site-packages/hikyuu/init.py", line 51, in from .util import * File "/usr/local/lib/python3.9/site-packages/hikyuu/util/init.py", line 51, in from .util import * ModuleNotFoundError: No module named 'hikyuu.util.util' (base)

    opened by wjlxyz 0
Releases(1.2.7)
  • 1.2.7(Nov 20, 2022)

  • 1.2.6(Nov 17, 2022)

    1. 新增发布 linux 下 pypi 包,linux 下也可以通过 pip install hikyuu 进行安装
    2. 获取股票代码表失败时增加保护
    3. 增加GUI异常保护
    4. fixed linux 下 mysql 数据库引擎报错(数据表名称都改为小写)
    5. fixed #I5YE01 bokeh_draw.py 鼠标滑动是的时间显示问题
    Source code(tar.gz)
    Source code(zip)
  • 1.2.5(Sep 3, 2022)

    1. 增加北京交易所数据
    2. 改进数据下载,修复 pytdx 数据下载缺失部分数据
    3. 恢复财务数据下载
    4. 增加 start_insight_sdk.py, 从华泰 insight 获取实时数据
    5. 完善 hikyuuTdx 中 nng 消息的启停与释放
    6. hku_catch 增加指示重新抛出异常的参数
    7. 修正 demo
    Source code(tar.gz)
    Source code(zip)
  • 1.2.4(Jun 30, 2022)

  • 1.2.3(Mar 7, 2022)

    1. 指标支持动态参数

    在通道信等证券行情软件中,其技术指标中的窗口参数通常支持整数,也支持使用指标,如:

    T1:=HHVBARS(H,120); {120内的最高点距今天的天数}
    L120:=LLV(L,T1+1); {120内的最高点至今,这个区间的最低点}
    

    现在,在 Hikyuu 中,也可以使用指标作为参数:

    T1 = HHVBARS(H, 120)
    L120 = LLV(L, T1+1)
    L120.set_context(k)
    L120.plot()
    

    注意事项

    由于无法区分 Indicator(ind) 形式时,ind 究竟是指标参数还是待计算的输出数据,此时如果希望 ind 作为参数,需要通过 IndParam 进行显示指定,如:EMA(IndParam(ind))。

    最佳的的方式,则是通过指定参数名,来明确说明使用的是参数:

    x = EMA(c)  # 以收盘价作为计算的输入
    y = EMA(IndParam(c)) # 以收盘价作为 n 参数
    z = EMA(n=c) # 以收盘价作为参数 n
    
    
    1. 完善 PF、AF、SE

    现在可以正常使用资产组合。:

    # 创建一个系统策略
    my_mm = MM_FixedCount(100)
    my_sg = my_sg = SG_Flex(EMA(n=5), slow_n=10)
    my_sys = SYS_Simple(sg=my_sg, mm=my_mm)
    
    # 创建一个选择算法,用于在每日选定交易系统
    # 此处是固定选择器,即每日选出的都是指定的交易系统
    my_se = SE_Fixed([s for s in blocka if s.valid], my_sys)
    
    # 创建一个资产分配器,用于确定如何在选定的交易系统中进行资产分配
    # 此处创建的是一个等比例分配资产的分配器,即按相同比例在选出的系统中进行资金分配
    my_af = AF_EqualWeight()
    
    # 创建资产组合
    # 创建一个从2001年1月1日开始的账户,初始资金200万元。这里由于使用的等比例分配器,意味着将账户剩余资金在所有选中的系统中平均分配,
    # 如果初始资金过小,将导致每个系统都没有充足的资金完成交易。
    my_tm = crtTM(Datetime(200101010000), 2000000)
    my_pf = PF_Simple(tm=my_tm, af=my_af, se=my_se)
    
    # 运行投资组合
    q = Query(-500)
    %time my_pf.run(Query(-500))
    
    x = my_tm.get_funds_curve(sm.get_trading_calendar(q))
    PRICELIST(x).plot()
    
    1. 修复fedora 34编译找不到路径报错,waning 提示
    2. fixed mysql 升级脚本错误
    3. fixed 复权后计算的净收益不对,并在使用前复权数据进行回测时给出警告(前复权回测属于未来函数)
    Source code(tar.gz)
    Source code(zip)
    hikyuu-1.2.3-cp310-none-win_amd64.whl(8.77 MB)
    hikyuu-1.2.3-cp38-none-win_amd64.whl(8.77 MB)
    hikyuu-1.2.3-cp39-none-win_amd64.whl(8.77 MB)
  • 1.2.1(Feb 2, 2022)

  • 1.2.0(Jan 10, 2022)

    1. HikyuuTdx 执行导入时自动保存配置,避免第一次使用 hikyuu 必须退出先退出 Hikyuutdx 的问题
    2. 增加创业板 301 开头股票代码
    3. 修复 window 显示缩放时 Hikyuutdx 显示不全的问题
    4. 修复 HHVLLV/LLVBARS/HHVBARS 计算错误
    5. 优化指标重设上下文时的计算,上下文未变化的情况下由指标本身计算标识判断是否重计算
    6. 修复分笔、分时数据转换 to_df 函数无效的问题
    7. HikyuuTdx 导入至 hdf5 时增加数据保护,遇到出错的表直接删除,下次可自动恢复导入
    8. 修复使用通达信的权息数据后复权失效的问题
    9. remove hikyuu_extern_libs submodule, windows下HDF5, mysql改用下载依赖包的方式
    10. 优化 HikyuuTDX GUI控制台日志,捕获子进程日志输出
    Source code(tar.gz)
    Source code(zip)
    hikyuu-1.2.0-cp37-none-win_amd64.whl(8.57 MB)
    hikyuu-1.2.0-cp38-none-win_amd64.whl(8.57 MB)
    hikyuu-1.2.0-cp39-none-win_amd64.whl(8.57 MB)
  • 1.1.9(Nov 10, 2021)

    1. 补充科创板
    2. 完善基础设施,增加MQThreadPool、MQStealThreadPool,优化StealThreadPool
    3. 优化 DbConnect,增加DBCondition
    4. Datetime增加hex()返回兼容oracle的Datetime格式存储
    5. fixed 技术指标 RSI,KDJ
    6. fixed select function
    7. fixed实时采集数据错误
    8. fixed createdb.sql 上证A股代码表前缀
    9. 取消编译时指定的AVX指令集,防止不支持的CPU架构
    Source code(tar.gz)
    Source code(zip)
    hdf5-1.10.4-win-x64.zip(2.45 MB)
    hdf5-1.12.2-linux-x64.zip(2.50 MB)
    hdf5-1.12.2-win-x64.zip(2.64 MB)
    hdf5_D-1.10.4-win-x64.zip(4.19 MB)
    hdf5_D-1.12.2-win-x64.zip(17.86 MB)
    hikyuu-1.1.9-cp36-none-win_amd64.whl(8.77 MB)
    hikyuu-1.1.9-cp37-none-win_amd64.whl(8.77 MB)
    hikyuu-1.1.9-cp38-none-win_amd64.whl(8.80 MB)
    hikyuu-1.1.9-cp39-none-win_amd64.whl(8.80 MB)
    mysql-8.0.21-win-x64.zip(3.39 MB)
    mysql-8.0.31-linux-x86_64.zip(3.70 MB)
  • 1.1.8(Feb 27, 2021)

  • 1.1.7(Feb 12, 2021)

  • 1.1.6(Feb 9, 2021)

    1. 优化 hikyuu.interactive 启动加载速度
    2. 完善 HikyuuTDX 预加载设置参数,可根据机器内存大小自行设置需加载至内存的K线数据,加快 hikyuu 运行速度
    3. HikyuuTDX 支持定时行情采集,定时采集服务运行时,hikyuu.interactive 自动连接采集服务获取最新的 K 线数据
    4. HikyuuTDX 支持定时导入,避免每日手工导入数据的繁琐
    5. hikyuu.interactive 每日0:00定时重新加载内存数据,可24小时运行无需终止
    6. fixed 使用MySQL时无法按日期查询获取K线数据
    Source code(tar.gz)
    Source code(zip)
    hikyuu-1.1.6-cp36-none-win_amd64.whl(8.49 MB)
    hikyuu-1.1.6-cp37-none-win_amd64.whl(8.56 MB)
    hikyuu-1.1.6-cp38-none-win_amd64.whl(8.45 MB)
    hikyuu-1.1.6-cp39-none-win_amd64.whl(8.66 MB)
  • 1.1.5(Nov 9, 2020)

    1. 导入工具修复权息信息导入

    2. 支持 MySQL 作为存储引擎(通过导入工具配置)

    3. 整改 python api 命名,类按大写驼峰,方法和函数统一为小写加下划线

    4. 增加 TimeDelta,方便日期时间计算,如:Datetime(202011090000) + TimeDelta(1)。python中可以使用 datetime.timedelta

    5. Portfolio(资产组合算法)、Allocatefunds(资金分配算法)、Selector(交易对象选择算法)可用

    6. 交易数量从整型改为float,方便支持数字币、外汇等

    7. 增加策略算法仓库,欢迎大家提交PR贡献公共策略:https://gitee.com/fasiondog/hikyuu_hub

      增加本地仓库:add_local_hub('dev', '/home/fasiondog/workspace/stockhouse') 更新参考:update_hub('default') 获取指定仓库的策略部件:st = get_part('default.st.fixed_percent')

    8. 其他BUG修复与优化

    Source code(tar.gz)
    Source code(zip)
    hikyuu-1.1.5-cp36-none-win_amd64.whl(8.24 MB)
    hikyuu-1.1.5-cp37-none-win_amd64.whl(8.24 MB)
    hikyuu-1.1.5-cp38-none-win_amd64.whl(8.27 MB)
    hikyuu-1.1.5-cp39-none-win_amd64.whl(8.27 MB)
  • 1.1.3(Jun 10, 2019)

    1. 原表示浮点数的 Null 值更改为和 numpy 一致,在c++中为 std::nan, python中 为numpy::nan
    2. Indicator 支持按日期获取数据,如:c['2019-6-11'] 或 c[Datetime(201906110000)] (注:由于 indicator的四则运算无法判定绑定的上下文,所以四则运算产生的结果无法获取对应日期,此时需要先执行 setContext 对结果指定上下文)
    3. Datetime 增加 startOfDay, endOfDay 方法
    4. 从 Indicator, SYS, TM 等支持 set/getParam 的对象中引出 haveParam方法至Python
    5. 增加了近 40 个 通达信基础指标实现,方便移植和试验网上大量通达信指标公式。具体详见:https://hikyuu.readthedocs.io/zh_CN/latest/indicator/overview.html
    Source code(tar.gz)
    Source code(zip)
    Hikyuu-1.1.3-cp35-none-win_amd64.whl(6.72 MB)
    Hikyuu-1.1.3-cp36-none-win_amd64.whl(6.73 MB)
    Hikyuu-1.1.3-cp37-none-win_amd64.whl(6.73 MB)
  • 1.1.2(Apr 18, 2019)

    1. 修复 Indicator 无法作为原型使用,导致部分预定义的 SG 等无法正在运行的BUG。如:

      #以下两种写法等效: (EMA() + MA())(C) #原型法 EMA(C) + MA(C) #普通写法

    2. 交互模式下,增加预定义的全局变量 O、H、L、C、A、V,分别代表 OPEN()、HIGH()、LOW()、CLOSE()、AMO()、VOL(),编写自定义指标时更快捷。默认绑定的上下文为 sh000001(上证指数),可使用 set_gloabl_context 更改绑定的默认上下文。如:

      x = EMA(C) + MA(C) x.plot() #绘制的是 sh000001 x.setContext("sz000001") #设置指标 x 的上下文为 sz000001 set_gloabl_context("sz000001") #更改 O,H,L,C,A,V默认绑定的上下文

    3. 交互模式下,增加 Datetime 同名缩写 D。原 Datetime(201901010000) 可简写为 D(201901010000)

    4. 优化 HHV、LLV、SUM、COUNT 指标实现,去除双重循环

    5. 新增内建指标:HHVBARS, LLVBARS, ROUND,ROUNDUP, ROUNDDOWN, FLOOR, CEILING, BETWEEN, POW, STD, SQRT, LOG, LN

    6. 修复 IF 两个参数为 price_t 时的计算错误

    Source code(tar.gz)
    Source code(zip)
    Hikyuu-1.1.2-cp35-none-win_amd64.whl(6.50 MB)
    Hikyuu-1.1.2-cp36-none-win_amd64.whl(6.51 MB)
    Hikyuu-1.1.2-cp37-none-win_amd64.whl(6.50 MB)
  • 1.1.1(Apr 7, 2019)

    对应版本的帮助文档: https://hikyuu.readthedocs.io/zh_CN/1.1.1/

    1. HikyuuTDX 新增当前财务信息及历史财务信息下载

    2. Stock 新增 getFinanceInfo、getHistoryFinanceInfo 支持当前及历史财务信息

    3. 新增 LIUTONGPAN(流通盘)、HSL(换手率)、COUNT、IF、SUM、NOT、EXP、SGN、ABS、MAX、MIN指标

    4. Kdata添加便捷方法获取OPEN/CLOSE等基本行情数据,如:

      k = sm['sh000001'].getKData(Query(-100)) c = k.close # 返回的是 Indicator 实例,即 CLOSE(k)

    5. 实现 select 函数,示例:

      #选出涨停股 C = CLOSE() x = select(C / REF(C, 1) - 1 >= 0.0995))

    6. 优化 Indicator 实现(取消 Operand),可以事先指定 KData,亦可后续通过 setContext 切换上下文,重新指定 KData。例如:

      #示例:移植通达信 DMI(趋向指标系统) #MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N); #HD :=HIGH-REF(HIGH,1); #LD :=REF(LOW,1)-LOW; #DMP:=SUM(IF(HD>0&&HD>LD,HD,0),N); #DMM:=SUM(IF(LD>0&&LD>HD,LD,0),N); #PDI: DMP100/MTR; #MDI: DMM100/MTR; N = 14 C = CLOSE() H = HIGH() L = LOW() MTR = SUM(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),N); HD = H-REF(H,1) LD = REF(L,1)-L DMP = SUM(IF(HD>0 & HD>LD, HD, 0), N) DMM = SUM(IF(LD>0 & LD>HD, LD, 0), N) PDI = DMP100/MTR MDI = DMM100/MTR

      PDI.setContext(sm['sz000001'], Query(-100)) MDI.setContext(sm['sz000001'], Query(-100))

      PDI.plot() MDI.plot(new=False)

    7. Parameter 支持 Stock、Query、KData

    Source code(tar.gz)
    Source code(zip)
    Hikyuu-1.1.1-cp35-none-win_amd64.whl(6.41 MB)
    Hikyuu-1.1.1-cp36-none-win_amd64.whl(6.41 MB)
    Hikyuu-1.1.1-cp37-none-win_amd64.whl(6.41 MB)
  • 1.1.0(Feb 28, 2019)

    1. 复权增加周线及其以上支持
    2. 支持历史分笔、分时数据
    3. 添加日志打印的等级控制
    4. MoneyManagerBase增加对成本计算
    5. Datetime增加 dateOfWeek,startOfWeek,endOfWeek,nextWeek,preWeek等系列便捷方法
    6. fix:Stock.realtimeUpdate中未判断缓存未空的情况
    7. fix:io重定向中未进行重复open的判定
    8. fix:Block分类显示乱码
    9. 简化源码安装方式,支持 python setup.py
    10. 全新的快速数据下载工具(支持GUI及命令行,如下图所示),下载当日权息、日线、分钟线、分笔、分时数据耗时2~4分钟(视个人网络有所不同),同时不再需要通过证券客户端下载盘后数据。具体参见: https://hikyuu.readthedocs.io/zh_CN/latest/quickstart.html avatar
    Source code(tar.gz)
    Source code(zip)
    Hikyuu-1.1.0-cp35-none-manylinux1_x86_64.whl(396.17 KB)
    Hikyuu-1.1.0-cp35-none-win_amd64.whl(6.32 MB)
    Hikyuu-1.1.0-cp36-none-win_amd64.whl(6.32 MB)
    Hikyuu-1.1.0-cp37-none-win_amd64.whl(6.32 MB)
  • 1.0.9(Nov 15, 2018)

    1. 更新周线、月线等周线及其之上的K线BAR记录,从以开始时间为准,改为以结束时间为准。(如从老版本升级,需手工删除sh_day.h5、sz_day.h5文件中的week、month等目录,只保留data目录。可运行 tools/delelte_index.py 完成删除,运行前请自行修改相关文件路径等信息)。
    2. 实现将C++中的日志输出重定向至Python,使Jupyter notebook可以看到C++部分的打印信息提示。注意:部分情景可能导致notebook因打印信息过多失去响应,此时可在产生较多打印信息的命令之前运行“iodog.close()”关闭重定向,后续可以再使用“iodog.open()”重新打开重定向信息输出。
    3. Datetime增加nextDay、dayOfWeek、dayOfYear、endOfMonth方法。
    4. TradeManager增加直接加入交易记录的方法(addTradeRecord)。
    5. 升级使用的依赖库 boost、libmysql、hdf5
    6. 使用xmake重构编译工程并调整代码结构
    7. 试验linux下pip打包安装。linux下可使用 pip install hikyuu 命令完成安装,安装前需安装依赖的软件包(sudo apt-get install -y libhdf5-dev libhdf5-serial-dev libmysqlclient-dev)
    8. 支持MacOSX下源码编译
    Source code(tar.gz)
    Source code(zip)
    hikyuu-macOS-py36.zip(3.14 MB)
CloudDisk 基于C/C++实现的高负载的分布式云存储(网络云盘)

CloudDisk 基于C/C++实现的高负载的分布式云存储(网络云盘) 项目介绍 为了满足海量用户、海量文件的云端存储需求,特提出一个基于Nginx和FastDFS的分布式云存储解决方案,用户可以实现文件上传、下载与分享。服务器已经部署在云端,下载Win32客户端注册登录即可使用。 架构 将Ngi

null 4 Sep 25, 2022
Kigs framework is a C++ modular multipurpose cross platform framework.

Kigs framework is a C++ modular multi-purpose cross-platform framework. It was used as a basis for many professionnal projects. The main goal was to b

null 74 Nov 28, 2022
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.

Cutelyst - The Qt Web Framework A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework. Qt's meta obje

Cutelyst 809 Dec 19, 2022
TreeFrog Framework : High-speed C++ MVC Framework for Web Application

Small but Powerful and Efficient TreeFrog Framework is a high-speed and full-stack web application framework based on C++ and Qt, which supports HTTP

TreeFrog Framework 1.1k Dec 22, 2022
Cute Framework (CF for short) is the cutest framework available for making 2D games in C/C++

Cute Framework (CF for short) is the cutest framework available for making 2D games in C/C++. CF comprises of different features, where the various features avoid inter-dependencies. In this way using CF is about picking and choosing which pieces are needed for your game

null 314 Dec 26, 2022
TengineGst is a streaming media analytics framework, based on GStreamer multimedia framework, for creating varied complex media analytics pipelines.

TengineGst is a streaming media analytics framework, based on GStreamer multimedia framework, for creating varied complex media analytics pipelines. It ensures pipeline interoperability and provides optimized media, and inference operations using Tengine Toolkit Inference Engine backend, across varied architecture - CPU, iGPU and VPU.

OAID 69 Dec 17, 2022
Framework for Enterprise Application Development in c++, HTTP1/HTTP2/HTTP3 compliant, Supports multiple server backends

The ffead-cpp Framework ffead-cpp is a web-framework, application framework, utilities all bundled into one. It also provides an embedded HTTP/Web-Soc

Sumeet Chhetri 540 Dec 19, 2022
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VS

JUCE 4.7k Jan 1, 2023
An eventing framework for building high performance and high scalability systems in C.

NOTE: THIS PROJECT HAS BEEN DEPRECATED AND IS NO LONGER ACTIVELY MAINTAINED As of 2019-03-08, this project will no longer be maintained and will be ar

Facebook Archive 1.7k Dec 14, 2022
An Open Source Machine Learning Framework for Everyone

Documentation TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, a

null 170.2k Jan 7, 2023