Khối Act & Risk · intermediate · 7 phút
Signal
Score, Confidence & Rationale
#act#signal#allocator
Cơ chế Score/Confidence
Nếu bạn viết strategy cho một Meta-Allocator đa mã, bạn không gọi enter/close trực tiếp mà phát Signal.
- Score (Điểm): [-1.0, 1.0]. Dương là Long, âm là Short.
- Confidence (Độ tự tin): [0.0, 1.0]. Ảnh hưởng đến tỷ trọng vốn Allocator cấp.
Cú pháp Story
quanta
score: sig_score = limit raw_momentum by -1.0 and 1.0 act: when sig_score > 0.5: quanta score sig_score with strong 0.8 note "Strong Momentum Up"
Cú pháp Truyền thống
quanta
signal(score: sig_score, confidence: 0.8, rationale: "Strong Momentum Up")
Quy tắc chuẩn hóa: Luôn dùng limit ... by -1.0 and 1.0 (hoặc hàm tanh) để đảm bảo Score không vượt biên trước khi pass vào lệnh quanta score.
Wiki liên quan