- Implemented a complete demo for fetching A-share stock and index data using Baostock.
- Included login/logout mechanism, data fetching for selected stocks and indices, and data cleaning processes.
- Added functionality to store cleaned data into CSV files.
- Provided detailed comments and print statements for user guidance and understanding.
- Implemented a comprehensive demo for acquiring financial data using Tushare Pro.
- Included sections for registration, token configuration, and data fetching for A-shares, indices, and fundamental data.
- Added data cleaning and alignment processes, along with local database construction.
- Provided a comparison between Tushare and AKShare, highlighting key differences and use cases.
- Enhanced the personal investor guide with additional sections on LLM-assisted quantitative analysis and risk management strategies.
- Included detailed explanations of practical scenarios for using LLM in quantitative analysis.
- Expanded the risk management section to cover volatility targeting, hard stop-loss, and maximum drawdown triggers.
- Added appendices comparing market entry books with the demo series.
- Introduced a new document on DeepSeek and Python for quantitative trading, covering foundational concepts, tools, and practical case studies.
- Implemented a comprehensive backtesting framework for ETF rotation strategies including relative momentum, dual momentum, and equal weight benchmark.
- Generated synthetic price data for various A-share sector ETFs and a bond ETF.
- Calculated momentum scores using different lookback periods for robustness.
- Developed a transaction cost model specific to A-share ETFs, accounting for commissions, stamp duty, and slippage.
- Conducted backtests for three strategies and calculated performance metrics including CAGR, volatility, Sharpe ratio, and maximum drawdown.
- Added visualizations for cumulative NAV, performance radar, drawdown curves, and monthly turnover.
- Summarized key takeaways and next steps for further development.
- Introduced a detailed guide for beginners transitioning from demo to real trading in the A股 market.
- Included sections on unique A股 trading rules, backtesting pitfalls, risk management, real data integration, fundamental factors, execution strategies, recommended tools, and a complete learning path.
- Highlighted critical areas for new traders to focus on, including T+1 settlement, trading costs, and the importance of risk management.
- Provided practical examples and code snippets for data access and processing using popular libraries.
- Implemented a data pipeline for quantitative trading covering:
- Price adjustment for corporate actions (splits & dividends)
- Calculation of simple and log returns
- Handling of multi-stock panels and missing values
- Outlier detection and treatment methods (Z-score, MAD, Winsorize)
- Trading calendar creation and cross-market alignment
- End-to-end DataPipeline class for data cleaning and analysis
- Included visualizations for price adjustments, return comparisons, and missing value handling
- Added detailed comments and documentation in Chinese for clarity