Negociant is an automated trading platform specialized in trading the Chinese futures markets through the CTP protocols. It was originally forked off from an open source project named "vnpy" in 2017, further developed, enhanced, customized, thoroughly tested and launched for automated trading.
Note: this is retired version that is no longer supported.
Update: all Python codes are now in Python 3
-
Prepare a computer with Ubuntu 20.04 (64-bit) installed.
-
Install Anaconda 5.2.0.
-
Install MongoDB, please register MongoDB as Windows Service.
-
Install Visual C++ Redistributable Packages for VS2013 (32-bit).
-
Run install.bat to install Negociant and all dependencies.
-
Define your trading strategies in by referencing the files in negociant/trader/app/ctaStrategy/strategy.
-
Backtesting your strategy by referencing files in example/CtaBacktesting.
-
As an example, go to folder examples/TradeNH/ and edit CTP_connect.json file with your exchange config:
- brokerID: id of your broker
- mdAddress: ip address of your broker's data server
- tdAddress: ip address of your broker's trade server
- userID: your login id with the broker
-
Specify your strategy combinations to be used in CTA_setting.json.
-
Start trading by running "python runNH.py", login with your password and then you are ready to trade!
-
Python API of CTP is included.
-
Event engine and RPC framework.
-
A powerful bar engine lkBarsEngine builds data streams into trading bars with time units of your choice.
-
A powerful data recorder engine and a CTA trade engine realizes trading actions.
-
Examples about how to use Negociant for solving real world trading issues (examples).
While the system has been thoroughly tested and extensively used in live trading for years, the author here offers no warranty and absolutely no guarantee for your profits.
If you have any questions about how to use the project or any suggestions about improving it, please feel free to communicate at https://github.com/XilinJia/Negociant.
MIT