Skip to content

Stage 1: Research

Giai đoạn Research là nơi bạn kiểm định hypothesis từ Stage 0 bằng dữ liệu thực tế. Dùng Jupyter Notebook với QuantBook library để phân tích và visualize.

Input & Output

InputOutput
Hypothesis từ Stage 0Jupyter Notebook với evidence
Datasets đã mapPrototype Python code cho signal
Threshold dự kiếnBiểu đồ + thống kê mô tả

QuantBook

QuantBook là thư viện Python tích hợp trong Research Environment, cung cấp:

  • QuantBook() — Khởi tạo session research

  • AddEquity(), AddCrypto(), v.v. — Thêm dữ liệu

  • History() — Lấy dữ liệu lịch sử dạng DataFrame

  • Indicator — Tính toán chỉ báo

  • Tích hợp matplotlib, seaborn cho plotting

Ví dụ Research Notebook

text
qb = QuantBook()
spy = qb.AddEquity("SPY")
history = qb.History(spy.Symbol, 252, Resolution.Daily)

# Tính SMA 50 và SMA 200
sma50 = history['close'].rolling(50).mean()
sma200 = history['close'].rolling(200).mean()

# Signal: Golden Cross
signal = (sma50 > sma200).astype(int)
print(f"Win Rate: {signal.mean():.2%}")

Research Assistant Node

QuantConnect cung cấp Research Assistant Node — một AI agent chuyên dụng giúp bạn:

  • Viết Jupyter notebooks tự động

  • Phân tích dữ liệu thăm dò (EDA)

  • Kiểm định thống kê (t-test, correlation)

  • Visualize kết quả

Powered by dautu.tech