Giter VIP home page Giter VIP logo

sqlib's Introduction

sqlib

ProjectName and Description

sqlib方案

"sqlib介绍

一个"完美的"README去快速开始你的项目!
探索本项目的文档 »

查看Demo · 报告Bug · 提出新特性

本篇README.md面向开发者

目录

上手指南

请将所有链接中的“shaojintian/Best_README_template”改为“your_github_name/your_repository”

开发前的配置要求
  1. 本版本支持Ubuntu,其他系统未作详细测试。
  2. 依赖微软量化交易平台qlib。
安装步骤
  1. 安装qlib
  2. Clone the repo
git clone https://github.com/vinsvison/sqlib.git

文件目录说明

filetree 
├── ARCHITECTURE.md
├── LICENSE.txt
├── README.md
├── /account/
├── /bbs/
├── /docs/
│  ├── /rules/
│  │  ├── backend.txt
│  │  └── frontend.txt
├── manage.py
├── /oa/
├── /static/
├── /templates/
├── useless.md
└── /util/

开发的架构

请阅读ARCHITECTURE.md 查阅为该项目的架构。

部署

1、qlib安装

具体参考:https://qlib.readthedocs.io/en/latest/start/installation.html 可以直接 pip install qlib 若需要修改源码的,建议源码安装。

pip install numpy
pip install --upgrade cython
git clone https://github.com/microsoft/qlib.git && cd qlib
python setup.py install

特别说明:支持python==3.8版本。

2、安装mlflow

具体参考:https://github.com/Toumash/mlflow-docker

根据自己的实际情况修改.env

执行几个sh脚本后,运行docker-compose up -d

特别说明:也可以直接 pip install mlflow 然后mlflow ui 启动服务 image

3、安装prefect

启动postgres

docker run -d --name prefect-postgres -v prefectdb:/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=prefect -e POSTGRES_DB=prefect postgres:latest
安装prefect包
pip install prefect
设置prefect数据库
prefect config set PREFECT_API_DATABASE_CONNECTION_URL="postgresql+asyncpg://postgres:prefect@localhost:5432/prefect"
启动
docker start prefect-postgres
prefect server start
image
部署prefect

Deployment configuration saved to prefect.yaml! You can now deploy using this deployment configuration with:

部署配置已保存到 prefect.yaml!您现在可以使用此部署配置进行部署:

    $ prefect deploy -n default

You can also make changes to this deployment configuration by making changes to the prefect.yaml file.

您还可以通过更改 prefect.yaml 文件来更改此部署配置。

To execute flow runs from this deployment, start a worker in a separate terminal that pulls work from the 'default' work pool:

要从此部署执行流程运行,请在单独的终端中启动一个工作程序,从“默认”工作池中提取工作:

    $ prefect worker start --pool 'default'

To schedule a run for this deployment, use the following command:

要安排此部署的运行,请使用以下命令:

    $ prefect deployment run 'qlib_workflow/default'

4、安装superset容器, 并设置登录用户名密码等

docker run -d -p 8080:8088 -v /home/idea/qlib/qlib_t/sqlib:/home/superset/app -e "SUPERSET_SECRET_KEY=sqlib1234" --name superset amancevice/superset

docker exec -it superset superset-init 
进入superset容器, 并安装duckdb-engine
docker exec -it superset bash

pip install duckdb-engine -i https://pypi.tuna.tsinghua.edu.cn/simple

exit
重启superset容器
docker restart superset

使用到的框架

  • qlib
  • mlflow
  • prefect
  • superset
  • duckdb

sqlib股票回测评估系统-2023-08-31T13-31-35 247Z

贡献者

请阅读CONTRIBUTING.md 查阅为该项目做出贡献的开发者。

如何参与开源项目

贡献使开源社区成为一个学习、激励和创造的绝佳场所。你所作的任何贡献都是非常感谢的。

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

版本控制

该项目使用Git进行版本管理。您可以在repository参看当前可用版本。

作者

[email protected]

知乎:zhihu.com/people/ideaplat  qq group : 851540137

您也可以在贡献者名单中参看所有参与该项目的开发者。

版权说明

该项目签署了MIT 授权许可,详情请参阅 LICENSE.txt

鸣谢

sqlib's People

Contributors

toughstyle avatar zhostev avatar

Stargazers

 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.