All Projects → tigerfintech → tiger_quant

tigerfintech / tiger_quant

Licence: other
Java 实盘量化框架

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to tiger quant

Awesome Algorithmic Trading
A curated list of awesome algorithmic trading frameworks, libraries, software and resources
Stars: ✭ 328 (+569.39%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Quant
Codera Quant is a Java framework for algorithmic trading strategies development, execution and backtesting via Interactive Brokers TWS API or other brokers API
Stars: ✭ 104 (+112.24%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Tradingstrategies
Algorithmic trading strategies
Stars: ✭ 120 (+144.9%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (+169.39%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Trading Backtest
A stock backtesting engine written in modern Java. And a pairs trading (cointegration) strategy implementation using a bayesian kalman filter model
Stars: ✭ 247 (+404.08%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
AutoTrader
A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.
Stars: ✭ 227 (+363.27%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Strategems.jl
Quantitative systematic trading strategy development and backtesting in Julia
Stars: ✭ 106 (+116.33%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Machine Learning And Ai In Trading
Applying Machine Learning and AI Algorithms applied to Trading for better performance and low Std.
Stars: ✭ 258 (+426.53%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (+22.45%)
Mutual labels:  trading, quantitative-finance, quantitative-trading
Fast arrow
(no longer maintained) A simple yet robust (stock+options) API client for Robinhood
Stars: ✭ 127 (+159.18%)
Mutual labels:  trading, quantitative-finance
Grademark
An API for backtesting trading strategies in JavaScript and TypeScript.
Stars: ✭ 140 (+185.71%)
Mutual labels:  trading, quantitative-trading
Interactivebrokers Algo System
Java/MySQL live algorithmic trading using Interactive Brokers API
Stars: ✭ 151 (+208.16%)
Mutual labels:  trading, quantitative-trading
crypto-trading-engine
Crypto real-time trading engine
Stars: ✭ 19 (-61.22%)
Mutual labels:  trading, quantitative-finance
Trading Server
A multi-asset, multi-strategy, event-driven trade execution and management platform for running many algorithms/bots at many venues simultaneously with unified risk management and reporting. Uses MongoDB for storage and Telegram for user notifications/trade consent.
Stars: ✭ 191 (+289.8%)
Mutual labels:  trading, quantitative-trading
Quiksharp
Коннектор к торговому терминалу ARQA QUIK (Квик), который делает доступным весь функционал QLUA из .NET (C#)
Stars: ✭ 152 (+210.2%)
Mutual labels:  trading, quantitative-trading
Mlfinlab
MlFinLab helps portfolio managers and traders who want to leverage the power of machine learning by providing reproducible, interpretable, and easy to use tools.
Stars: ✭ 2,676 (+5361.22%)
Mutual labels:  trading, quantitative-finance
Bursatil Argentina Python
Guia de ejemplos didácticos en python temática finanzas bolsa trading argentina usa
Stars: ✭ 153 (+212.24%)
Mutual labels:  trading, quantitative-finance
pybtc
No description or website provided.
Stars: ✭ 16 (-67.35%)
Mutual labels:  quantitative-finance, quantitative-trading
cira
Cira algorithmic trading made easy. A Façade library for simpler interaction with alpaca-trade-API from Alpaca Markets.
Stars: ✭ 21 (-57.14%)
Mutual labels:  trading, quantitative-finance
Abu
阿布量化交易系统(股票,期权,期货,比特币,机器学习) 基于python的开源量化交易,量化投资架构
Stars: ✭ 8,589 (+17428.57%)
Mutual labels:  trading, quantitative-trading

Tiger Quant

启动前配置

  1. 可以把tiger_quant项目导入到本地IDE中(比如Idea),有2种方式导入为maven项目:

    1. 右键单击根目录下的pom.xml(选择mark as maven project)。
    2. 在根目录对应的命令行执行编译命令:
    mvn clean compile  -Dmaven.test.skip=true

    等命令执行完成后,即可正常运行项目。

  2. 编译完成后,在本地安装mysql数据库,按照 tquant-storage 模块下的 resources/datasource/mysql_table_create.sql 中的sql来创建本地数据库和表

  3. tquant-storage 模块下的 resources/datasource/mybatis-config.xml 文件中的数据库连接信息改成本地数据库配置,用户名和密码 image

  4. 配置 tquant-gateway 模块下的 resources/tiger_gateway_setting.json Tiger OpenAPI 账号信息(参考下方配置说明)

  5. 执行tquant-loader 模块下的命令,可以下载历史数据,包括合约,K线,逐笔等数据。 比如BarLoader来举例,项目导入Idea后,需要在Idea启动配置中设置参数: bar_loader_example

然后启动 BarLoader 下载K线数据,合约和逐笔数据的下载方法也是类似方式。

以上步骤执行后,可以执行下面的启动命令来运行量化策略程序。

  1. tquant-algorithm 是策略模块,里面包含了部分策略示例

  2. 策略编写完成后,可以通过 tquant-backtester 回测模块完成功能回测(会用到K线或逐笔数据,可以通过tquant-loader模块提前导入),里面有可以直接执行的main方法。如: com.tquant.backtester.Backtesting.main ,可以参考已实现的示例,需注意下单接口要在回测模块中进行覆盖,否则会导致回测服务启动失败。

  3. 策略正式上线时,会通过 tquant-bootstrap 模块中的 com.tquant.bootstrap.TigerQuantBootstrap 来启动,也可以通过IDE方式来启动。

启动命令

tquant-bootstrap 模块中的 TigerQuantBootstrap 是项目的Main方法入口,负责项目的启动。

停止命令

  • 查出项目运行的进程 pid。 ps -ef|grep TigerQuantBootstrap
  • kill pid。 kill命令执行时会同时执行项目的stop方法回调。

策略编写

用户实现的策略需要继承自AlgoTemplate,同时要提供默认构造方法。 在algorithm/algos文件目录下实现了几个demo策略,可以参考一下。

配置说明

策略配置

策略配置文件名:algo_setting.json , 在 tquant-algorithm 模块resource目录下。

每个算法文件对应一个配置项,配置项的Key与策略Java文件名称要保持一致。 配置项中必填参数如下:

  • enable:是否启用该策略。true 启用,false 不启用

  • class:策略算法对应的文件全路径名

  • 其他参数为自选参数,在策略启动时会自动注册到策略中。

  • 配置实例

{
  "BestLimitAlgo": {
    "enable": false,
    "class":"com.tquant.algorithm.algos.BestLimitAlgo",
    "direction": "BUY",
    "volume": 100,
    "symbol": "00700"
  },
  "DmaAlgo": {
    "enable": false,
    "class":"com.tquant.algorithm.algos.DmaAlgo",
    "direction": "BUY",
    "price": 13.2,
    "volume": 100
  },
  "SpreadAlgo": {
    "enable": true,
    "class":"com.tquant.algorithm.algos.MacdAlgo",
    "symbol": "SPY",
    "bars": 100
  }
}

全局配置

全局配置文件名:global_setting.json , 在tquant-core模块 resources 目录下。

  • log.enable:是否开启日志开关。true 打开,false 关闭
  • log.level:日志级别,默认info级别。取值包括 error,warn,info
  • log.console:日志是否输出到控制台。true 输出到控制台,false 不输出到控制台
  • log.file:日志是否输出到文件。true 输出到文件,false 不输出到文件
  • log.path:日志输出到文件的路径。支持绝对路径和相对路径。默认当前项目下的log目录
  • storage.enable:是否开启持久化存储。true 开启,false 不开启

柜台配置

目前只支持Tiger券商接口,配置文件名:tiger_gateway_setting.json,在 tquant-gateway 模块 resources 目录下。

  • gateway:固定为TigerGateway
  • apiLogEnable:是否开启SDK的日志记录
  • apiLogPath:SDK日志文件输出路径,默认当前项目下的log目录

下面配置为开发者信息相关,需要先申请开发者账号,注册开发者账号地址:https://www.tigersecurities.com/openapi

  • tigerId:开发者账号ID

  • account:开发者交易账号,可以是老虎综合账号或模拟账号。

  • privateKey:开发者自己生成的RSA私钥

  • 配置实例

{
  "gateway": "TigerGateway",
  "apiLogEnable": true,
  "apiLogPath": "log/",
  "tigerId": "2015xxxx",
  "account": "20190419163707900",
  "privateKey": "MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBAL7..."
 }

外部依赖

ta4j

指标计算工具,包括常见的上百种指标计算。

环境准备

  • 支持windows、linux、mac等常见系统。
  • JDK 1.8 以及以上。

问题反馈

使用上遇到任何问题,或有任何建议,欢迎在github上反馈,也欢迎加入官方QQ群:441334668。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].