OPEN-SOURCE SCRIPT
Pharma vs Market Monthly Returns (XLV vs SPY)

A Bloomberg-style pharma momentum indicator built for TradingView.
This script recreates the “Pharma Index Monthly Returns” chart highlighted by Jordi Visser in his Youtube video — offering a clean, accessible poor man’s Bloomberg version of sector-rotation analysis for users without institutional data feeds.
Features
• XLV monthly returns (absolute mode)
• XLV vs SPY relative monthly returns (market-neutral mode)
• Top 5 strongest months ★ (momentum spikes)
• Top 5 weakest months ★ (capitulation signals)
• Optional 6-month rolling momentum line (regime trend)
• Full history from 1998 (XLV inception)
Use Cases
Ideal for tracking pharma/healthcare sector regimes, macro rotations, biotech cycles, and timing asymmetric entries in innovation themes (AI-pharma, computational drug discovery, biotech moonshots, etc.).
This script recreates the “Pharma Index Monthly Returns” chart highlighted by Jordi Visser in his Youtube video — offering a clean, accessible poor man’s Bloomberg version of sector-rotation analysis for users without institutional data feeds.
Features
• XLV monthly returns (absolute mode)
• XLV vs SPY relative monthly returns (market-neutral mode)
• Top 5 strongest months ★ (momentum spikes)
• Top 5 weakest months ★ (capitulation signals)
• Optional 6-month rolling momentum line (regime trend)
• Full history from 1998 (XLV inception)
Use Cases
Ideal for tracking pharma/healthcare sector regimes, macro rotations, biotech cycles, and timing asymmetric entries in innovation themes (AI-pharma, computational drug discovery, biotech moonshots, etc.).
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน