Skip to content

Commit

Permalink
Merge pull request #1 from youyuanrsq/main
Browse files Browse the repository at this point in the history
剥离paper_account模块
  • Loading branch information
vnpy committed Nov 2, 2021
2 parents c3e34f3 + e11c50f commit 47ab776
Show file tree
Hide file tree
Showing 9 changed files with 672 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .flake8
@@ -0,0 +1,5 @@
[flake8]
exclude = build,__pycache__,__init__.py
ignore =
E501 line too long, fixed by black
W503 line break before binary operator
32 changes: 32 additions & 0 deletions README.md
@@ -1,2 +1,34 @@
# vnpy_paperaccount

vn.py框架的本地模拟交易模块

<p align="center">
<img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png"/>
</p>

<p align="center">
<img src ="https://img.shields.io/badge/version-1.0.0-blueviolet.svg"/>
<img src ="https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg"/>
<img src ="https://img.shields.io/badge/python-3.7-blue.svg" />
<img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
</p>

## 说明

PaperAccount是用于本地模拟交易的功能模块,用户可以通过其UI界面基于实盘行情进行本地化的模拟交易。

## 安装

安装需要基于2.7.0版本以上的[VN Studio](https://www.vnpy.com)

直接使用pip命令:

```
pip install vnpy_paperaccount
```

下载解压后在cmd中运行

```
python setup.py install
```
37 changes: 37 additions & 0 deletions setup.cfg
@@ -0,0 +1,37 @@
[metadata]
name = vnpy_paperaccount
version = 1.0.0
url = https://www.vnpy.com
license = MIT
author = Xiaoyou Chen
author_email = xiaoyou.chen@mail.vnpy.com
description = paper account application for vn.py quant trading framework.
long_description = file: README.md
long_description_content_type = text/markdown
keywords =
quant
quantitative
investment
trading
algotrading
classifiers =
Development Status :: 5 - Production/Stable
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Office/Business :: Financial :: Investment
Programming Language :: Python :: Implementation :: CPython
License :: OSI Approved :: MIT License
Natural Language :: Chinese (Simplified)

[options]
packages = find:
zip_safe = False
install_requires =
importlib_metadata

[options.package_data]
* = *.ico
4 changes: 4 additions & 0 deletions setup.py
@@ -0,0 +1,4 @@
from setuptools import setup


setup()
46 changes: 46 additions & 0 deletions vnpy_paperaccount/__init__.py
@@ -0,0 +1,46 @@
# MIT License

# Copyright (c) 2021 vn.py

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


from pathlib import Path

import importlib_metadata
from vnpy.trader.app import BaseApp

from .engine import PaperEngine, APP_NAME


try:
__version__ = importlib_metadata.version("vnpy_paperaccount")
except importlib_metadata.PackageNotFoundError:
__version__ = "dev"


class PaperAccountApp(BaseApp):
""""""
app_name = APP_NAME
app_module = __module__
app_path = Path(__file__).parent
display_name = "模拟交易"
engine_class = PaperEngine
widget_name = "PaperManager"
icon_name = "paper.ico"

0 comments on commit 47ab776

Please sign in to comment.