Coder Social home page Coder Social logo

luluquant's Introduction

lulu量化交易

目录

  1. 项目安装
  2. 使用方法
  3. 常见Git指令

项目安装

首先,下载python到您的本地,编译器可自行选择,推荐PyCharm

其次,打开终端,执行以下操作:

  1. pip install TA-Lib
  2. pip install requests
  3. python3 trade.py
  4. pip install pandas==1.1.5 numpy==1.19.4 scipy==1.5.4
  5. pip install alpaca-backtrader-api
  6. pip install matplotlib
  7. pip install get-all-tickers
  8. pip install stock-pandas
  9. pip install -U numpy
  10. pip install yfinance

有的包在不同的文件里才用到,自己看一下import选择性安装

使用方法

  1. 安装步骤1后,进入./src/strategy/,添加、运行策略。 比如,执行吞噬线策略,则运行./src/strategy/tunShiXian.py
  2. 本项目采用BackTrade library,回测代码实例如下:
    cerebro = bt.Cerebro() #初始化
    cerebro.addstrategy(TunShiXian) #添加策略
    cerebro.adddata(data0) #添加数据

BackTrade文档: - BackTrade

  1. 获取数据,请调用 importData.py 中的函数

常见Git指令

新建一个branch
git checkout -b MyBranch 

进行您的修改后,查询已修改的文件
git status

回到别的branch
git checkout OtherBranch

添加文件
git add File

添加commit
git commit -m "your commit"

上传您的修改
git push

luluquant's People

Contributors

lumeng3 avatar alexcargf avatar

Stargazers

 avatar

Watchers

Guanxiong Liu avatar Qi Wang avatar  avatar

Forkers

webclinic017

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.