Skip to content

Latest commit

ย 

History

History
109 lines (82 loc) ยท 6.1 KB

File metadata and controls

109 lines (82 loc) ยท 6.1 KB

TradeNotes

๐Ÿ“ Personal Trading & Quant Notes | ไธชไบบๆŠ•่ต„ไบคๆ˜“ๅญฆไน ็ฌ”่ฎฐ


About This Project

TradeNotes is a personal collection of trading and investment notes, 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 cover 16 topics, 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

Topic Overview
Financial Markets & Trading Basics Global market overview, macro/fundamental/technical analysis, A-share/HK/US market comparison
Derivatives Markets โญ Options theory & pricing, buyer/seller strategies, advanced combination strategies, volatility trading, HK warrants/CBBCs
Python Quantitative Trading Python basics, data acquisition, backtesting systems, stock selection & timing, derivatives quant, live trading
AI Agent Applications AI trading overview, AI stock selection & timing, AI execution & risk management, strategy evolution, building a personal trading assistant
Trading Psychology & Kelly Criterion โญ In-depth analysis of the Kelly Criterion, trading psychology, capital management, trading system construction

Highlights

  • ๐Ÿ”ฅ Derivatives markets are the core: 8 topics, ~60 pages, accounting for 44% of the content
  • ๐ŸŽฏ Kelly Criterion as a dedicated topic: ~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

TradeNotes/
โ”œโ”€โ”€ .gitignore # Git ignore rules
โ”œโ”€โ”€ README.md # Project documentation
โ”œโ”€โ”€ tradenotes/                   # Notes split by topic
โ”‚   โ”œโ”€โ”€ 01_้‡‘่žๅธ‚ๅœบไธŽไบคๆ˜“ๅŸบ็ก€.md
โ”‚   โ”œโ”€โ”€ 02_่ก็”Ÿๅ“ๅŸบ็ก€ๆฆ‚ๅฟต.md
โ”‚   โ”œโ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ 18_ๅ‡ฏๅˆฉๅ…ฌๅผ้€ŸๆŸฅไธŽPython้‡ๅŒ–ๅบ“้€ŸๆŸฅ.md
โ”‚   โ”œโ”€โ”€ ๅ…่ดฃๅฃฐๆ˜Ž.md
โ”‚   โ””โ”€โ”€ ็‰ˆๆƒไธŽ่ฎธๅฏ่ฏ.md
โ””โ”€โ”€ code/                         # Standalone Python scripts
    โ”œโ”€โ”€ requirements.txt              Dependency list
    โ”œโ”€โ”€ 10_quant_basics/              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
    โ”œโ”€โ”€ 11_quant_strategies/            Quantitative Strategy Practice
    โ”‚   โ”œโ”€โ”€ 01_pairs_trading.py           Pairs trading (cointegration test)
    โ”‚   โ””โ”€โ”€ 02_hmm_market_regime.py       HMM market regime detection
    โ”œโ”€โ”€ 12_ai_agent/                    AI Agent Trading Applications
    โ”‚   โ””โ”€โ”€ 01_llm_financial_analysis.py  LLM financial analysis prompt
    โ”œโ”€โ”€ 13_ai_assistant/                Building a Personal AI Trading Assistant
    โ”‚   โ”œโ”€โ”€ 01_rag_knowledge_base.py      RAG knowledge base construction
    โ”‚   โ””โ”€โ”€ 02_strategy_generation.py     Automated strategy generation
    โ””โ”€โ”€ 14_kelly_criterion/             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 TradeNotes Authors

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). See LICENSE-CC-BY-NC-SA for the full license text.

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