Top Related Projects
Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
An Algorithmic Trading Library for Crypto-Assets in Python
Portfolio analytics for quants, written in Python
:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
Quick Overview
QUANTAXIS is an open-source quantitative trading and investment research platform developed in Python. It provides a comprehensive set of tools for financial data acquisition, processing, analysis, and strategy backtesting, aimed at both individual investors and institutional traders.
Pros
- Comprehensive ecosystem with modules for data fetching, analysis, backtesting, and live trading
- Supports multiple asset classes including stocks, futures, and cryptocurrencies
- Integrates with various data sources and exchanges
- Active community and regular updates
Cons
- Steep learning curve for beginners due to its extensive features
- Documentation is primarily in Chinese, which may be challenging for non-Chinese speakers
- Some users report occasional stability issues with certain modules
- Performance can be slow for large-scale backtests without optimization
Code Examples
- Fetching stock data:
from QUANTAXIS import QA_fetch_stock_day_adv
data = QA_fetch_stock_day_adv('000001', '2020-01-01', '2021-01-01')
print(data.data)
- Creating a simple moving average strategy:
from QUANTAXIS import QA_Strategy
class MAStrategy(QA_Strategy):
def on_bar(self, data):
if data.close > data.close.rolling(20).mean():
self.buy(data.code, 100)
elif data.close < data.close.rolling(20).mean():
self.sell(data.code, 100)
strategy = MAStrategy(start='2020-01-01', end='2021-01-01', code='000001')
strategy.run()
- Backtesting a strategy:
from QUANTAXIS import QA_Backtest
backtest = QA_Backtest(strategy=MAStrategy, start='2020-01-01', end='2021-01-01', code_list=['000001', '600000'])
result = backtest.run()
backtest.analyze()
Getting Started
- Install QUANTAXIS:
pip install quantaxis
- Initialize the QUANTAXIS environment:
import QUANTAXIS as QA
QA.QA_util_log_info('Welcome to QUANTAXIS')
- Fetch and analyze data:
stock_data = QA.QA_fetch_stock_day_adv('000001', '2020-01-01', '2021-01-01')
print(stock_data.data.head())
- Run a simple backtest:
from QUANTAXIS.QAARP.QAStrategy import QA_Strategy
class SimpleStrategy(QA_Strategy):
def on_bar(self, data):
self.buy(data.code, 100)
backtest = QA.QA_Backtest(strategy=SimpleStrategy, start='2020-01-01', end='2021-01-01', code_list=['000001'])
result = backtest.run()
backtest.analyze()
Competitor Comparisons
Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
Pros of Lean
- More extensive documentation and community support
- Broader range of supported asset classes and data sources
- Better integration with cloud platforms and live trading systems
Cons of Lean
- Steeper learning curve for beginners
- Requires more computational resources
- Less focus on Chinese markets compared to QUANTAXIS
Code Comparison
QUANTAXIS example:
import QUANTAXIS as QA
data = QA.QA_fetch_stock_day_adv('000001', '2019-01-01', '2019-12-31')
QA.QA_SU_save_stock_day('tdx')
Lean example:
public class MyAlgorithm : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2019, 1, 1);
SetEndDate(2019, 12, 31);
AddEquity("SPY", Resolution.Daily);
}
}
QUANTAXIS focuses on simplicity and ease of use for Chinese markets, while Lean offers a more comprehensive and flexible framework for algorithmic trading across various markets. QUANTAXIS provides straightforward data fetching and saving functions, whereas Lean requires a more structured approach with algorithm initialization and asset addition.
Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
Pros of Qlib
- More extensive documentation and examples
- Stronger focus on machine learning and AI-driven quantitative investment
- Backed by Microsoft, potentially leading to better long-term support and development
Cons of Qlib
- Steeper learning curve for beginners in quantitative finance
- Less comprehensive in terms of traditional financial analysis tools
- Primarily focused on the Chinese stock market, which may limit its applicability for global investors
Code Comparison
QUANTAXIS:
import QUANTAXIS as QA
data = QA.QA_fetch_stock_day_adv('000001', '2017-01-01', '2017-12-31')
QA.QA_SU_save_stock_day('tdx')
Qlib:
from qlib.data import D
from qlib.config import REG_CN
D.calendar(start_time='2010-01-01', end_time='2017-12-31', freq='day')
D.features(["SH600000"], ["$close", "$volume"], start_time='2010-01-01', end_time='2017-12-31')
Both repositories offer powerful tools for quantitative finance, but they cater to slightly different audiences. QUANTAXIS provides a more comprehensive suite of traditional financial analysis tools, while Qlib focuses on leveraging machine learning for quantitative investment strategies. The choice between the two depends on the user's specific needs and level of expertise in both finance and machine learning.
An Algorithmic Trading Library for Crypto-Assets in Python
Pros of Catalyst
- Focuses on cryptocurrency trading and backtesting
- Provides integration with popular exchanges like Binance and Coinbase
- Offers a more specialized toolset for crypto-specific strategies
Cons of Catalyst
- Limited to cryptocurrency markets, less versatile for traditional assets
- Smaller community and fewer resources compared to QUANTAXIS
- Less frequent updates and maintenance
Code Comparison
QUANTAXIS:
from QUANTAXIS import QA_Backtest
backtest = QA_Backtest()
backtest.strategy = myStrategy
backtest.run()
Catalyst:
from catalyst import run_algorithm
run_algorithm(
capital_base=10000,
data_frequency='daily',
initialize=initialize,
handle_data=handle_data,
exchange_name='poloniex'
)
Both repositories provide quantitative trading frameworks, but they cater to different markets and use cases. QUANTAXIS offers a more comprehensive solution for Chinese markets and traditional assets, while Catalyst specializes in cryptocurrency trading. QUANTAXIS has a larger community and more frequent updates, making it potentially more suitable for general quantitative trading needs. Catalyst, on the other hand, provides a more focused approach for crypto enthusiasts and traders looking to implement strategies specifically for digital assets.
Portfolio analytics for quants, written in Python
Pros of QuantStats
- Focused on performance analytics and risk metrics
- Generates detailed HTML reports for portfolio analysis
- Lightweight and easy to integrate into existing Python projects
Cons of QuantStats
- Limited to post-trade analysis and reporting
- Lacks real-time data fetching and trading capabilities
- Smaller community and fewer contributors compared to QUANTAXIS
Code Comparison
QuantStats:
import quantstats as qs
# Extend pandas functionality with metrics
qs.extend_pandas()
# Generate tearsheet
qs.reports.html(returns, output='tearsheet.html')
QUANTAXIS:
import QUANTAXIS as QA
# Fetch stock data
data = QA.QA_fetch_stock_day_adv('000001', '2019-01-01', '2020-01-01')
# Perform backtest
backtest = QA.QA_Backtest(strategy=MyStrategy, benchmark_code='000300')
backtest.run()
Summary
QuantStats excels in performance analysis and reporting, making it ideal for portfolio managers and analysts. QUANTAXIS offers a more comprehensive suite of tools for quantitative trading, including data fetching, backtesting, and real-time trading capabilities. QuantStats is more accessible for beginners and those focused on post-trade analysis, while QUANTAXIS caters to more advanced users requiring a full-stack quantitative trading platform.
:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
Pros of backtesting.py
- Lightweight and easy to use, with a focus on simplicity
- Fast execution due to optimized Cython implementation
- Extensive documentation and examples for quick start
Cons of backtesting.py
- Limited to backtesting only, lacks real-time trading capabilities
- Fewer built-in indicators and analysis tools compared to QUANTAXIS
- Less comprehensive ecosystem and community support
Code Comparison
QUANTAXIS:
import QUANTAXIS as QA
data = QA.QA_fetch_stock_day_adv('000001', '2010-01-01', '2019-01-01')
QA.QA_Risk_analysis(data)
backtesting.py:
from backtesting import Backtest, Strategy
from backtesting.lib import crossover
class SmaCross(Strategy):
def init(self):
self.sma1 = self.I(SMA, self.data.Close, 10)
self.sma2 = self.I(SMA, self.data.Close, 20)
def next(self):
if crossover(self.sma1, self.sma2):
self.buy()
elif crossover(self.sma2, self.sma1):
self.sell()
Summary
QUANTAXIS offers a more comprehensive suite of tools for quantitative analysis and trading, including real-time capabilities and a broader ecosystem. backtesting.py, on the other hand, provides a lightweight and fast solution specifically for backtesting trading strategies, with a focus on simplicity and ease of use. The choice between the two depends on the specific needs of the project and the user's preference for either a more comprehensive toolkit or a specialized backtesting solution.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
QUANTAXIS 2.0.0
[ç¹å»å³ä¸è§StaråWatchæ¥è·è¸ªé¡¹ç®è¿å±! ç¹å»Forkæ¥å建å±äºä½ çQUANTAXIS!]
æ´å¤ææ¡£å¨QABook Release
Quantitative Financial FrameWork
æ¬é¡¹ç®å为å 个大å:
-
QASU/ QAFetch æ¯æå¤å¸åºæ°æ®åå¨/ èªå¨è¿ç»´/ æ°æ®è·å(mongodb/ clickhouse)
-
QAUtil æ¯æ交ææ¶é´, 交ææ¥å, æ¶é´ååååæ¨ç®, å¸åºè¯å«, dataframe æ°æ®è½¬æ¢ç
-
QIFI/ QAMarket ä¸å¥ç»ä¸çå¤å¸åº å¤è¯è¨è´¦æ·ä½ç³»
- qifiaccount qifi çæ åè´¦æ·ä½ç³», å¨å¤è¯è¨ä¸å rust/cpp çæ¬ç qifi account ä¿æä¸è´æ§
- qifimanager qifi å¤è´¦æ·ç®¡çä½ç³» æ¯æå¤ä¸ªè¯è¨çè´¦æ·ç»ä¸ç®¡ç
- qaposition åæ çä»ä½ç®¡ç模å, æ¯æ对äºåæ ççç²¾åå¤ç©ºæ§å¶(å¥å©åºæ¯/ cta åºæ¯/ è¡ç¥¨åºæ¯)
- marketpreset å¸åºé¢å¶åºç±», æ¹ä¾¿æ¥è¯¢æè´§/è¡ç¥¨/èæè´§å¸ åç§ tick/ ä¿è¯é/ æç»è´¹ç
-
QAFactor å åç 究å¥ä»¶
-
åå åç ç©¶å ¥åº
-
å å管ç, æµè¯
-
å åå并
-
ä¼åå¨
-
-
QAData å¤æ çå¤å¸åºçæ°æ®ç»æ, å¯ä»¥ä½ä¸ºå®æ¶è®¡ç®ååæµçå åæ°æ®åºä½¿ç¨
-
QAIndicator æ¯æèªå®ä¹ææ ç¼å, æ¹éå ¨å¸åº apply, æ¯æå å表达å¼æ建
-
QAEngine èªå®ä¹çº¿ç¨è¿ç¨åºç±», å¯ä»¥èªè¡ä¿®æ¹è®¡ç®çå¼æ¥åå±åç½å åå¸å¼è®¡ç® agent
-
QAPubSub åºäº MQ çæ¶æ¯éå, æ¯æ 1-1 1-n n-n çæ¶æ¯åå, å¯ç¨äºè®¡ç®ä»»å¡ååæ¶é, å®æ¶è®¢åæµçåºæ¯
-
QAStrategy cta/å¥å©åæµå¥ä»¶, æ¯æ QIFI 模å¼
-
QAWebServer tornadobase ç webserver å¥ä»¶, å¯ä»¥ä½ä¸ºä¸å°å¾®æå¡æ建
-
QASchedule åºäº QAWerbServer çåå°ä»»å¡è°åº¦ æ¯æèªå¨è¿ç»´, è¿ç¨ä»»å¡è°åº¦ç
æ¬çæ¬ä¸ºä¸å ¼å®¹å级ç 2.0 quantaxis, æ¶åä¸äºæ¹å
æ°æ®é¨å
-
å¢å clickhouse client èªå»ºæ°æ®æºåå
-
å¢å æ°æ®æ ¼å¼
- å¯¹äº tabular data çæ¯æ
- æ¯æå ååçæ°æ®ç»æ
-
æ¯æ tick/l2 order/transaction çæ°æ®æ ¼å¼
å¾®æå¡é¨å
-
å¢å QAWEBSEBVER
-
æ¯æå¨æçä»»å¡ææ´¾ç sechedule
-
å¢å åºäº DAG模åçpipeline
-
å¢å QAPUBSUB模å æ¯æ rabbitmq
è´¦æ·é¨å
-
å é¤ QAARP ä¸åç»´æ¤èçæ¬ account ç³»ç»
-
å级å®æ´ç qifi 模å æ¯æå¤å¸åº/è·¨å¸åºçè´¦æ·æ¨¡å
-
æ¯æä¿è¯é模å
-
æ¯æè¡ç¥¨
-
æ¯ææè´§
-
ææ[å级ä¸]
-
å®ç模æçé¨å
-
使ç¨ç¨³å®ç qifi ç»æ对æ¥
-
æ¯æ CTP æ¥å£ç
- æè´§
- ææ
-
æ¯æè¡ç¥¨é¨å
- QMT 对æ¥
-
æ¯åè´¦æ·ç订åååè·è¸ª [OMS]
-
ordergateway é£æ§è®¢åæµè§å
å¤è¯è¨é¨å
-
æ¯æäº QUANTAXIS Rust çæ¬çéä¿¡
-
åºäº arrow åº, 使ç¨å¤è¯è¨æ¯æç pyarrow æ ¼å¼, å¯¹æ¥ arrow-rs, datafusion-rs, libarrow(CPP)
-
æ¯æ RUST/ CPP è´¦æ·
-
æ¯æå ååç rust job worker
社åº/项ç®æèµ
github
QUANTAXIS æ¯ä¸ä¸ªå¼æ¾ç项ç®, å¨å¼æºç3å¹´ä¸æ大éçå°ä¼ä¼´å å ¥äºæ, 并æ交äºç¸å ³ç代ç , æ谢以ä¸çåå¦ä»¬
许å¤é®é¢ å¯ä»¥å¨ GITHUB ISSUEä¸æ¾å°, ä½ å¯ä»¥æåºæ°çissue
æèµ
å代ç ä¸æ...请ä½è åæ¯åå¡å?
(PS: æ¯ä»çæ¶å 请带ä¸ä½ çåå/æµç§°å ä¼ç»´æ¤ä¸ä¸ªèµå©å表~ )
QQ群
欢è¿å 群讨论: 563280067 群é¾æ¥
DISCORD ç¤¾åº https://discord.gg/mkk5RgN
QUANTAXIS å¼å群: 773602202 (å¦ææ³è¦è´¡ç®ä»£ç 请å è¿ä¸ªç¾¤ éè¦å¤æ³¨ä½ çGITHUB ID)
QUANTAXIS æè´§å®çå¤è´¦æ·çæ¬å°é¨ç½²ç¾¤ (请å¿æµªè´¹ç¾¤èµæº 没ææ¬å°å¤è´¦æ·é¨ç½²ç请å¿å ): 945822690
å ¬å ±å·
欢è¿å ³æ³¨å ¬ä¼å·:
QAPROå ¬å ±å·å è´¹æä¾äºä¸åæ¨éæ¥å£, å ³æ³¨å ¬å ±å·åå¤tradeå³å¯ä½¿ç¨
论å QACLUB
QUANTAXIS å æµç论å QUANTAXISCLUBä¸çº¿
å¡éè¿è®ºåè¿è¡æé®ç åææé«çåå¤ä¼å 级
Top Related Projects
Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
An Algorithmic Trading Library for Crypto-Assets in Python
Portfolio analytics for quants, written in Python
:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot