Onepy is an event-driven algorithmic trading Python library.
Project description
Onepy 2.51
Onepy is an event-driven algorithmic trading Python library.
更新日志:Change Log
Install
Onepy is developed using Anaconda Python 3.6.x.
pip install plotly
pip install funcy
pip install arrow
pip install pymongo
pip install retry
pip install TA-Lib
pip install dataclasses # python 3.7不用安装
将该项目解压后,参照这里将OnePy项目文件夹添加到Python搜索目录
Getting Started
-
Tutorial Series
-
知乎专栏:OnePy
Main Features
OnePy 综合方面:
- 事件驱动回测设计 ✓
- 股票、外汇回测 ✓
- 多品种回测 ✓
- 多策略回测 ✓
- 设置手续费, 保证金/手, 杠杆大小 ✓
- 设置成交价格为 close 或者第二天 open ✓
- 设置是否打印交易日志 ✓
- Plot 画图模块 ✓
- 多进程参数优化 ✓
- 多进程Fordward analysis ✓
Tools 工具方面:
- To_MongoDB:自定义数据统一格式后存入数据库 ✓
- To_MongoDB:tushare 股票数据 CSV 存入数据库 ✓
- Tushare API 数据多线程存入 MongoDB ✓
- Oanda API 数据导入MongoDB ✓
DataHandler 数据方面:
- CSV 数据读取 ✓
- MongoDB 数据读取 ✓
Strategy 策略方面:
- 做多 buy & sell, 做空 sell & cover 指令 ✓
- 撤单 cancel_pennding, cancel_tst 指令 ✓
- 按百分比或盈亏多少钱, 设置止盈 Limit、止损 Stop 和 Trailingstop 移动止损 ✓
- 按百分比或者指定价格, 建立挂单。 ✓
- 技术指标 Cleaner 模块 ✓
- 整合 Talib 模块 ✓
Broker 执行方面:
- 模拟发送指令 ✓
- 模拟检查指令是否发送成功 ✓
- 打印交易日志 ✓
- 手续费 commission, 百分比类型和固定类型 ✓
Recorder 日志方面:
- 计算保证金, 仓位, 浮动利润, 已平仓利润, 总资金, 剩余现金, 收益率, 市值, 时间序列化 ✓
- 输出交易记录, 包括出场时间, 入场时间, 盈亏点数, 盈亏利润等 ✓
- 详细盘后交易结果分析 ✓
延展性方面:
- 在 Environment 中存有原始所有信号信息, 生成的订单信息, 便于分析 ✓
- 自定义扩展事件源 ✓
- 自定义数据源, 返回迭代器给 OnePy 即可 ✓
- 自定义策略模块 ✓
- 自定义技术指标模块 ✓
- 自定义风控模块 ✓
- 自定义经纪商模块 ✓
- 自定义日志记录模块 ✓
Quick Look
Road Map
Contact
I'm very interested in your experience with Onepy.Please feel free to contact me via chenjiayicjy@gmail.com
Chandler_Chan
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
onepy_pro-1.1.5.tar.gz
(59.9 kB
view details)
Built Distribution
OnePy_pro-1.1.5-py3-none-any.whl
(77.6 kB
view details)
File details
Details for the file onepy_pro-1.1.5.tar.gz
.
File metadata
- Download URL: onepy_pro-1.1.5.tar.gz
- Upload date:
- Size: 59.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f78b59826aba33b25b0b6ab04596616faa7f52297a65ec50496a38285dbab57f |
|
MD5 | 5283450b5476d93535fdcd5ec63b4764 |
|
BLAKE2b-256 | b2dea5179c73bc96c2c62eece2ae2c1dbc0a279eb0d2d081329f07a4ceca852a |
File details
Details for the file OnePy_pro-1.1.5-py3-none-any.whl
.
File metadata
- Download URL: OnePy_pro-1.1.5-py3-none-any.whl
- Upload date:
- Size: 77.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9286635ae1f78438c551ca32533ed2b4abb512ce3b9b1801e9be03befd9d273 |
|
MD5 | 60cc413933c0cabe0d808f80b3ad3f6b |
|
BLAKE2b-256 | a1eeb1dc38eba2655bc3bbc873cf47f784295fab188d34ade1511772ec0e6eed |