Skip to main content

Hiquant is an outbox python tool and libraries for quant trade and study

Project description

Hiquant

阅读此文档的中文版本

Hiquant is an out-of-box toolset for assiting stock investment and a library for study on quantitative trading.

It can run on any OS with Python 3, suggest Python v3.7+.

This software is developed on Mac, and the examples in this document are written with Mac environment. They are similiar for Linux, but might be a little difference on Windows.

Features

  • Data acquisition: Obtain the list of stocks and indices, and obtain financial reports, historical market quotations, real-time market data, and PE/PB data from financial websites
  • Value analysis: extract key financial data from financial reports, calculate annual profit, ROE, net asset growth rate and other indicators, and screen out "value investment" stocks based on specified filter conditions
  • Valuation analysis: Calculate PE/PB percentiles from PE/PB data, and select “cheap valuation” stocks based on specified filter conditions
  • Stock pool: Contains a command to create a "stock pool" csv file, and provides operations such as merging, removing, and intersection
  • Strategy Pool: Contains some trading strategy codes for demo purposes, and provides a command to create a new strategy from the template, which is convenient for users to write their own strategies
  • Multi-portfolio: Contains some fund strategy configurations for demo purposes, and provides a command to create a new configuration from the template
  • Simulated backtesting: Use historical market data to simulate backtesting of one or more portfolio strategies, output data analysis of investment returns, and draw yield curves for comparison
  • Tracking reminder: Synchronize real-time market data, calculate trading decisions based on strategies, and send email notifications to remind users to trade
  • TODO: Automated trading: call the quantitative trading interface to realize automated trading (not yet implemented, planned)
  • TODO: Global market: currently only supports China’s A-share market, and will increase support for markets in other countries (not yet implemented, planned)

Other additional features:

  • K-line chart: draw the K-line chart of stocks/indices, including drawing common technical indicators, and comparing the profit results of trading based on the indicators
  • Multi-indicator combination: When drawing a K-line chart, you can also mix signals from multiple indicators for trading, and display trading actions, holding time, and yield curve
  • K-line patterns: graphically display the 61 K-line patterns provided by TALib, count the number of occurrences of each pattern in the local daily data, and verify the correctness of these patterns for trend prediction
  • Indicator test: Use historical data and technical indicators to test the stocks in the stock pool and find the most effective technical indicators for each stock

Installation

pip install hiquant

Or, clone from GitHub:

git clone https://github.com/floatinghotpot/hiquant.git
cd hiquant
pip install -e .

Quick start

hiquant create myFund
cd myFund

hiquant list stock
hiquant list index

hiquant stock 600036 -ma -macd -kdj
hiquant stock 600519 -all
hiquant stock 600036 -wr -bias -mix

hiquant stockpool create stockpool/mystocks.csv 600036 600519 600276 300357 002258
hiquant finance view stockpool/mystocks.csv
hiquant pepb view stockpool/mystocks.csv

hiquant strategy create strategy/mystrategy.py
hiquant fund create etc/myfund.conf
hiquant fund backtrade etc/myfund.conf

Usage

Read following docs for more details:

Develop with Hiquant

Read this document on how to develop with Hiquant:

Screenshots

Draw stock indicators and yield curve

hiquant stock 600036 -ma -macd -kdj

Draw stock

Draw trade signal of mixed indicators, holding time, and yield curve

hiquant stock 600036 -wr -bias -mix

Draw stock

Backtrade with one portoflio Draw stock

Backtrade with multiple portoflios Draw stock

Credits

Great appreciate developers of following projects. This project is based on their great works: Pandas, Matplotlib, Mplfinance, Akshare, etc.

Thanks SINA financial and Legu for providing data service from their websites.

Thanks the warm-hearted knowledge sharing on Zhihu and Baidu websites.

Disclaimer

This software and related codes are for research purposes only and do not constitute any investment advice.

If anyone invests money in actual investment based on this, please bear all risks by yourself.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hiquant-0.2.618.tar.gz (47.2 kB view hashes)

Uploaded Source

Built Distribution

hiquant-0.2.618-py3-none-any.whl (73.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page