Skip to content

xhqing/TradeNote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TradeNote

A Comprehensive Handbook on Trading & Quantitative Finance | 投资交易知识与量化实践手册


About This Project

TradeNote is a concise handbook on trading and investment knowledge, with a focus on in-depth strategy analysis of derivatives (US stock options, Hong Kong warrants/CBBCs, etc.), the mathematical principles and practical applications of the Kelly Criterion, while also covering Python quantitative trading and AI Agent trading assistance. These notes are divided into five volumes with 16 chapters, approximately 135 pages in total.

This project is intended for the following users:

  • 🎯 Beginners who want to systematically learn trading and investment knowledge
  • 📈 Traders who want to deeply understand derivatives
  • 🐍 Developers who want to implement quantitative trading strategies using Python
  • 🤖 Technologists interested in AI Agent applications in financial trading

Content Structure

Volume Name Chapters Pages Overview
I Trading & Investment Fundamentals Chapter 1 ~10 pp Global market overview, macro/fundamental/technical analysis, A-share/HK/US market comparison
II Derivatives Markets Chapters 2–9 ~60 pp Options theory & pricing, buyer/seller strategies, advanced combination strategies, volatility trading, HK warrants/CBBCs
III Python Quantitative Trading Chapters 10–11 ~18 pp Python basics, data acquisition, backtesting systems, stock selection & timing, derivatives quant, live trading
IV AI Agent Applications Chapters 12–13 ~18 pp AI trading overview, AI stock selection & timing, AI execution & risk management, strategy evolution, building a personal trading assistant
V Trading Psychology & Kelly Criterion ⭐ Chapters 14–16 ~26 pp In-depth analysis of the Kelly Criterion, trading psychology, capital management, trading system construction

Highlights

  • 🔥 Derivatives markets are the core: 8 chapters, ~60 pages, accounting for 44% of the content
  • 🎯 Kelly Criterion as a standalone chapter: ~12 pages of systematic analysis, from mathematical derivation to derivatives practice and Python implementation
  • 💻 Theory meets practice: Each section includes Python code examples and real-world case studies
  • 🌏 Cross-market perspective: Covers A-share, Hong Kong, and US markets simultaneously

File Structure

TradeNote/
├── .gitignore # Git ignore rules
├── README.md # Project documentation
├── TradeNote.md # Full notes text (all 16 chapters + appendices)
└── code/                         # Standalone Python scripts
    ├── requirements.txt              Dependency list
    ├── ch10_quant_basics/            Chapter 10: Quantitative Trading Basics & Backtesting
    │   ├── 01_numpy_basics.py            NumPy Sharpe ratio calculation
    │   ├── 02_pandas_basics.py           Pandas data processing & moving averages
    │   ├── 03_matplotlib_basics.py       Matplotlib visualization
    │   ├── 04_data_fetch.py              AKShare/yfinance data acquisition
    │   ├── 05_data_clean_store.py        Data cleaning & storage
    │   ├── 06_simple_backtest.py         Simple backtesting engine
    │   └── 07_performance_metrics.py     Performance evaluation metrics
    ├── ch11_quant_strategies/        Chapter 11: Quantitative Strategy Practice
    │   ├── 01_pairs_trading.py           Pairs trading (cointegration test)
    │   └── 02_hmm_market_regime.py       HMM market regime detection
    ├── ch12_ai_agent/                Chapter 12: AI Agent Trading Applications
    │   └── 01_llm_financial_analysis.py  LLM financial analysis prompt
    ├── ch13_ai_assistant/            Chapter 13: Building a Personal AI Trading Assistant
    │   ├── 01_rag_knowledge_base.py      RAG knowledge base construction
    │   └── 02_strategy_generation.py     Automated strategy generation
    └── ch14_kelly_criterion/         Chapter 14: In-depth Analysis of the Kelly Criterion ⭐
        ├── 01_kelly_classic.py           Classic/continuous/fractional Kelly
        ├── 02_kelly_multi_asset.py       Multi-asset Kelly (with constrained optimization)
        ├── 03_kelly_monte_carlo.py       Monte Carlo simulation comparison
        ├── 04_kelly_bayesian.py          Bayesian dynamic Kelly
        ├── 05_kelly_derivatives.py       Derivatives Kelly (tail risk/fat-tailed/robust correction)
        └── 06_kelly_case_studies.py      5 real-world case studies

⚠️ Disclaimer

All content in this repository is for educational and reference purposes only and does not constitute any form of investment advice or recommendation.

  • Financial markets carry risks; past performance does not guarantee future returns
  • Any trading strategy may result in partial or total loss of principal
  • Users should fully understand the relevant risks and make independent judgments based on their own financial situation and risk tolerance before engaging in actual trading
  • The authors and contributors shall not be held liable for any direct or indirect losses arising from the use of the content in this repository

Investing involves risks; enter the market with caution.


📄 Copyright & License

Copyright (c) 2026 TradeNote Authors

This project uses a dual-license model:

Scope License License File
Code (all files under code/) GNU Affero General Public License v3.0 (AGPL-3.0) LICENSE-AGPL
Documentation (all other content, including TradeNote.md) Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) LICENSE-CC-BY-NC-SA

Code — AGPL-3.0

  • You may use, modify, and distribute the code under the terms of AGPL-3.0
  • Copyleft: any modified version must also be licensed under AGPL-3.0
  • Network use is distribution: if you run a modified version on a server and others interact with it, you must make the source code available

Documentation — CC BY-NC-SA 4.0

You are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made
  • NonCommercial — You may not use the material for commercial purposes
  • ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original

About

📖 投资交易知识与量化实践手册 | A comprehensive handbook on trading & quantitative finance — 衍生品深度策略(期权/轮证/期货)、凯利公式数学推导与实战、Python量化交易、AI Agent交易辅助 | Derivatives strategies, Kelly Criterion, Python quant trading & AI Agent

Topics

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE-AGPL
Unknown
LICENSE-CC-BY-NC-SA

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages