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 trade signal of mixed indicators, holding time, and yield curve
hiquant stock 600036 -wr -bias -mix
-
Backtrade with one portoflio
-
Backtrade with multiple portoflios
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hiquant-0.2.620.tar.gz
.
File metadata
- Download URL: hiquant-0.2.620.tar.gz
- Upload date:
- Size: 47.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5174d3816b870d167d17b70ba21937bd3f4b61a9589d7fb1cb9ebc29a1307a8 |
|
MD5 | 250b0a1369903a8c50f92c524dbab807 |
|
BLAKE2b-256 | 084ec6ad9f6ecd3aba993120bb7f6b95af3e77f6b6df9dc6bc767c287e27062e |
Provenance
File details
Details for the file hiquant-0.2.620-py3-none-any.whl
.
File metadata
- Download URL: hiquant-0.2.620-py3-none-any.whl
- Upload date:
- Size: 73.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdbb1649b9776577a92445bb190eba563c02cac0fe6791bc3d4423b1e2ab1682 |
|
MD5 | 9ed916277dc720ed210b550ad35881b5 |
|
BLAKE2b-256 | 3626a96a393acbaec773c8f1d82f4e86fb94afbc98896d54235115c37903823d |