Auto Quant
Project description
AutoQuant
AutoQuant is an out-of-the-box quantitative investment platform.
It contains the full ML pipeline of data processing, strategy building(includes AI & traditionals), back-testing, and covers the entire chain of quantitative investment: alpha seeking, risk modeling, portfolio optimization, and order execution.
With AutoQuant, users can easily try ideas to create better Quant investment strategies.
Quick Start
Installation
pip install --upgrade autoquant
Data Preparation
from autoquant.collector import Collector
from autoquant import Market
from datetime import date
collector = Collector.default()
data = collector.daily_prices(
market=Market.SZ,
code='002594',
start=date(2021, 11, 1),
end=date(2021, 11, 5)
)
data = collector.quarter_statement(
market=Market.SH,
code='601318',
quarter=date(2021, 9, 30)
)
Backtest
from autoquant.collector import Collector
from autoquant.workflow import Workflow
from autoquant.broker import Broker
from autoquant import Market
from datetime import date
from autoquant.workflow import Workflow
from autoquant.strategy import MA_CrossOver
class SmaCross(MA_CrossOver):
params = dict(fast=5, slow=20)
collector = Collector.default()
broker = Broker.default(kick_start=100000, commission=0.01)
data = collector.daily_prices(market=Market.SZ, code='002594', start=date(2020, 1, 1), end=date(2021, 11, 1))
w = Workflow().with_broker(broker).with_strategy(SmaCross).backtest(data)
w.visualize()
Advanced Topics
Market
AutoQuant support Shanghai, Shenzhen, HongKong and US markets now. Use Market Enum in codes:
from autoquant import Market
Market.SZ
Market.SH
Market.HK
Market.US
Metrics
- Gross Rate Of Return
- CAGR(Compound Annual Growth Rate)
Price Provider
- BaostockProvider
- TushareProvider
Financial Statement Provider
- SnowballProvider
Contribution Guide
Test
Test all
PYTHONPATH=./ pytest
Test specified test
PYTHONPATH=./ pytest tests/<YOUR_DISIRE_FILE>.py -k "<YOUR_DISIRE_TEST_CASE>" -s
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
AutoQuant-0.3.1.tar.gz
(9.3 kB
view details)
Built Distribution
AutoQuant-0.3.1-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file AutoQuant-0.3.1.tar.gz
.
File metadata
- Download URL: AutoQuant-0.3.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 694d9537e1829ef474d22bb0d40f868075fc82b5d3e7d423ad8328ba045f0748 |
|
MD5 | d919d52a8db4e9206b872dabad7652e8 |
|
BLAKE2b-256 | 5b95837c09794ecae41411ae6f5e8c89b93378e5d38197cfee2bd8af0598fdbe |
File details
Details for the file AutoQuant-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: AutoQuant-0.3.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45d5d674134d44c8d542b1fef52734c4095aeb44c8903e32f018c3f87853e0db |
|
MD5 | f8d2623d87192d86ea963a0ebeffb1a0 |
|
BLAKE2b-256 | dfefef4cdc6b0a2f4946efc3b0236116b2db53a4c06c31aaa7dc852fc9710530 |