It takes about 2 minutes to read this article.
Investment and financial management is a compulsory course for almost everyone in life. If you do it well, it can bring a lot of income after bedtime. But do not enter the stock market without a wealth of investment knowledge. If you have some spare money, if the money is gone, it will not affect your quality of life. Then you can use the spare money to play stocks. Remember, you can’t use leverage. If you don’t have spare money, just play simulation Stocks.
Many programmers stare at the stock market every day. What they value is not whether the company is a good company or what the financial statements are, but whether the stock has risen or not. Time is wasted, it is not helpful to investment experience and accumulation, and my programming skills are gradually declining with the impetuous mentality. High is not good, and low is not good. It is said that programmers eat youthful meals, and no one uses them when they are old. Up.
Such a mentality, no matter in any industry, is to eat youth. However, people who insist on learning are different. They are pursuing a little progress today than yesterday, so the older they are, the more experience and knowledge they have accumulated, and the greater their value. Today, I will share a great open source project that will help you to trade in stocks while also learning Python. Why not do it.
Since WeChat does not allow external links, please read the original text to access the links in the article.
Project github address:
https://github.com/moyuanz/DevilYuan
It is convenient for you to directly obtain the source code. I have put it on the Baidu network disk, and you can get it by replying to the [quantification system] in the background of the official account.
DevilYuan stock quantification system is written by python, supports python3.4 and above, has the following functions:
Visualization (based on PyQT interface)
Multithreaded event engine
Four functions
Stock data
Stock picking
Strategy backtest
Real trading
Historical data is free from the Internet
Wind free personal interface
TuShare(TuSharePro)
Tongdaxin
Real WeChat reminder and interaction
One key hang up
Fully automated trading
Simulated transaction, supports 9 simulated accounts
Real offer and backtest share the same strategy code, support tick and minute levels
Real offer strategy writing template
Stock selection strategy writing template
Automatically download historical data to MongoDB database
Stock code table
Trading day data
Historical daily data of individual stocks, indices and ETFs
Historical data of individual stocks and ETFs
Integrated basic statistical functions
Multi-strategy for real single account
Supported operating system: Windows 7/8/10, Linux (does not support real disk)
Install Anaconda, python3.4 and above 64-bit version (32-bit should work, but it has not been tested)
Install MongoDB and configure MongoDB as a system service
If you want to download more historical data of individual stocks, it is recommended to equip a larger hard disk. According to gross estimates, there may be about 80G of individual stocks in the entire market in one year.
MogonDB client
**Note: When installing MongoDB under Windows, MongoDB Compass will be installed by default. MongoDB Compass installation is very slow, no need to install **
Real trading (Windows)
The xiadan client of Straight Flush needs to be configured as follows, otherwise it will cause a price error when placing an order and the client’s timeout lock
Before running the Straight Flush trading interface, you must manually start the Straight Flush order program and log in
System Settings> Interface Settings: Set the timeout of the interface not to operate as 0
System Settings> Transaction Settings: The default buying price/buying quantity/selling price/selling quantity are all set to empty
At the same time, the client cannot be minimized or in a streamlined mode
The client of Galaxy Securities needs to do the following configuration, otherwise it will cause price error when placing an order and the client timeout lock
Login interface settings
System Settings> Interface Settings: Set the timeout of the interface not to operate as 0
System Settings> Transaction Settings: The default buying price/buying quantity/selling price/selling quantity are all set to empty
At the same time, the client cannot be minimized or in a streamlined mode
image.png
Galaxy Securities, as the latest version of the official website may have an anti-program control interface, please install the PC client here
Straight flush, because the latest version of the official website may have an anti-program control interface, please go here to install the general flush
Install Wind personal free Python interface** (Windows, optional)**
If the Wind interface, stock code table, trading day data and historical daily data are not installed, the TuShare interface will be used. The data update speed of TuShare is relatively slow. In addition, Wind’s re-weighting factor data is more accurate. It is recommended to install Wind. However, the Wind interface has restrictions on data traffic.
**Or you can use TuSharePro, please register your token here. ** In the DY system, some strategies or functions require TuSharePro 300 points.
Register a SCKEY with Server sauce, so that the signal during the real offer can be notified by WeChat ringtone (optional)
Python packages that need to be installed
tushare
pytdx
pymongo
qdarkstyle
pytesseract
pywinauto(Windows)
talib
aiohttp
pyqrcode
mpl_finance
pypng
PyQt5
datrie
crypto
gunicorn
Because the program needs to read and write files, please go to the DevilYuan folder to run python DyMainWindow.py
with administrator privileges
QQ group:
(Finish)
Focus on valuable sharing
Welcome to subscribe and forward
Recommended Posts