cn-trader-1.0.2
توضیحات
Back testing system for China market
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cn-trader-1.0.2 |
| نام | cn-trader |
| نسخه کتابخانه | 1.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | BigFish |
| ایمیل نویسنده | huui1998@163.com |
| آدرس صفحه اصلی | https://github.com/codfish-zz/cn-trader |
| آدرس اینترنتی | https://pypi.org/project/cn-trader/ |
| مجوز | Apache-2.0 |
<!---
# Copyright 2020-present, BigFish (huui1998@163.com).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->
<h1 align="center">
<p>cn-trader</p>
</h1>
<p align="center">
<a href="https://github.com/codfish-zz/cn-trader/blob/master/LICENSE">
<img alt="GitHub" src="https://huui1998.pythonanywhere.com/admin/uploads/cn-trader/license.svg?color=blue">
</a>
</p>
<h4 align="center">
<p>
<b>English</b> |
<a href="https://github.com/codfish-zz/cn-trader/blob/master/README_zh-hans.md">简体中文</a>
</h4>
## Overview
Python back testing system for trading strategies, based on [backtrader](https://www.backtrader.com) and [AkShare](https://www.akshare.xyz), customized for China market.
## Installation
This repository is tested on Python 3.10+, backtrader 1.9+ and AkShare 1.4+.
### With pip
```bash
pip install cn-trader
```
### With source
```bash
$ git clone https://github.com/codfish-zz/cn-trader
$ cd cn-trader
$ pip install -r requirements.txt
```
Or
```bash
$ git clone https://gitee.com/huui/cn-trader.git
$ cd cn-trader
$ pip install -r requirements.txt
```
## Quick tour
Run cn-trader with UI interface.
```python
>>> from cn_trader import ui
>>> ui.main()
```
> _Main menu_ 
> _Input stock symbol_ 
> _Change default parameters_ 
> _Show picture or not_ 
> _Show log or not_ 
> _Full picture_ 
> _Zoom the picture_ 
> _Show log and summary_ 
> _Menu auto-completing_ 
## Testing
Run single test case.
```bash
$ cd tests
$ python -m unittest tests.test_stock_mainland.StockMainlandTestCase.test_strategy_check_sma_cross
```
> _Output_ 
Run all test cases.
```bash
$ cd tests
$ python -m unittest discover -v
```
> _Output_ 
## Create new strategy
Coming soon...
نیازمندی
| مقدار | نام |
|---|---|
| - | akshare |
| - | backtrader |
| - | matplotlib |
| - | prompt-toolkit |
| - | rich |
نحوه نصب
نصب پکیج whl cn-trader-1.0.2:
pip install cn-trader-1.0.2.whl
نصب پکیج tar.gz cn-trader-1.0.2:
pip install cn-trader-1.0.2.tar.gz