Giter Club home page Giter Club logo

jquant_redis's Introduction

基于聚宽的期货数据平台

目录结构

  • strategy 所有策略代码
    • stop_loss.py 基于止损值的策略
  • mq 消息队列实现类 生产者-消费者模式
    • consumer.py 消费者
    • producer.py 生产者
  • model 抽象出的业务类
    • stock.py 股票类
    • stop_loss.py 止损值指标类
  • config/dev.ini 数据库配置文件
  • test 非正式代码
    • com.py 消费者测试类
    • pub.py 生产者测试类
    • consumer.py 待修改的消费者类
    • producer.py 待修改的生产者类
    • trade.py 模拟实时分钟数据计算每分钟的止损值
  • util 工具类
    • create_table.py 创建表
    • init_table.py 初始化表数据
    • db_util.py 数据库工具类
    • jquant_util.py 聚宽认证装饰器
    • redis_util.py 初始化redis连接池
    • mysingleton.py 单例装饰器方法
    • order.py wh9聚宽接口,包括账号关联和按照参数下单
  • service.py 服务端实时从聚宽获取分钟级数据, 并缓存到redis, 通过redis构建消息队列
  • client.py 客户端接收服务端推送的消息(分钟级期货数据), 通过策略使用数据生成买入卖出信号

redis测试服务器

将机房的bigdata1服务器作为redis的测试服务器, 连接信息如下:

Host: 122.207.108.56

Port: 12479

如何修改redis配置文件

sudo /etc/init.d/redis stop
sudo vim /etc/redis/redis.conf
sudo /etc/init.d/redis start

How to run

python ./client.py
python ./service.py

jquant_redis's People

Contributors

lawlietqwq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.