Quantopian's open source zipline is ok, but the local backtesting program can do US stock research, but A shares are not suitable.
Online operation:
If you want to test US stocks online, you can use Quantopian, but sometimes the link is not very stable.
Due to the unique trading mechanism of A shares, no python package can run back test locally. First, you can go to the JoinQuant quantitative trading platform. The A-share backtesting framework they wrote also provides the processed data, which is very good and saves the process of data cleaning. In addition to A shares, there are data of fund futures, which can be rotated, hedged and so on. Second, write your own back test framework. The advantage is that it is flexible and can be changed at will. The disadvantage is that it requires a certain programming foundation.
Summary:
JoinQuant and Quantopian data can be obtained in DataFrame format, and both provide notebook and back-test mode, and back-test research can be completed online.