OPEN-SOURCE SCRIPT
تم تحديثه

Custom Sector Comparison Index (CSCI)

63
Compare any stock against a custom basket of its true peers.

Most traders compare stocks to broad indexes like the S&P 500 (SPY) or the Nasdaq (QQQ). But if you are analyzing a niche sector—like Residential REITs, Gold Miners, or AI Semis—broad indexes are too noisy.

This indicator allows you to build your own Custom Equal-Weight Index made up of up to 12 specific symbols. It then plots the performance of the stock you are currently viewing against that custom index, starting from a specific "Anchor Date" of your choosing.

Why use this?
Standard relative strength tools force you to compare against a single symbol (like SPY). But if you want to know if Centerspace (CSR) is lagging its direct competitors, comparing it to SPY (which contains Tech and Healthcare) is useless. Comparing it to VNQ (which contains Cell Towers and Malls) is also imperfect.

With this tool, you can create a "Pure Residential REIT" index and see exactly how your stock is performing against the group.

Key Features:
Fully Configurable: Input up to 12 different symbols to build your custom index.

Smart Filtering: Automatically ignores blank slots. You can build a basket of 3 stocks or 12 stocks without breaking the math.

Custom Anchor Date: Set the specific start date for the comparison (e.g., YTD, Q3 start, or a specific market event).

Visual Performance Gap: Green shading indicates your stock is outperforming the basket; Red shading indicates underperformance.

Example Use Case: Residential REITs
I developed this to analyze the "Residential REIT" sector. I wanted to see if Invitation Homes (INVH) was trading at a discount due to fundamentals or if the whole sector was down.

I configured the basket with 9 of its closest peers:

NYSE:VRE, NYSE:UDR, NYSE:MAA

NYSE:EQR, NYSE:CSR, NYSE:ESS

NYSE:CPT, NYSE:AVB, NYSE:AMH

The Result: The indicator draws a gray line representing the average return of those 9 "Big Boys." I can then load CSR on the chart and immediately see if it is lagging the pack (a potential value buy) or leading it.

How to Use:
Add the indicator to your chart.

Open Settings (Double-click the line).

Start Date: Set the date you want the "race" to begin (where all returns reset to 0%).

Symbols: Type in the tickers for your custom basket (e.g., NVDA, AMD, INTC). Leave unused slots blank.

Analyze:

Gray Line: The average performance of your basket.

Blue Line: The performance of the current symbol on your chart.

Pro Tip: You can save different "Presets" in the indicator settings for different sectors (e.g., save one preset as "Semis" and another as "Oil Majors") so you don't have to re-type symbols every time.
ملاحظات الأخبار
Compare any stock against a custom basket of its true peers.

Most traders compare stocks to broad indexes like the S&P 500 (SPY) or the Nasdaq (QQQ). But if you are analyzing a niche sector—like Residential REITs, Gold Miners, or AI Semis—broad indexes are too noisy.

This indicator allows you to build your own Custom Equal-Weight Index made up of up to 12 specific symbols. It then plots the performance of the stock you are currently viewing against that custom index, starting from a specific "Anchor Date" of your choosing.

Why use this?
Standard relative strength tools force you to compare against a single symbol (like SPY). But if you want to know if Centerspace (CSR) is lagging its direct competitors, comparing it to SPY (which contains Tech and Healthcare) is useless. Comparing it to VNQ (which contains Cell Towers and Malls) is also imperfect.

With this tool, you can create a "Pure Residential REIT" index and see exactly how your stock is performing against the group.

Key Features:
Fully Configurable: Input up to 12 different symbols to build your custom index.

Smart Filtering: Automatically ignores blank slots. You can build a basket of 3 stocks or 12 stocks without breaking the math.

Custom Anchor Date: Set the specific start date for the comparison (e.g., YTD, Q3 start, or a specific market event).

Visual Performance Gap: Green shading indicates your stock is outperforming the basket; Red shading indicates underperformance.

Example Use Case: Residential REITs
I developed this to analyze the "Apartment REIT" sector. I wanted to see if Centerspace (CSR) was trading at a discount due to fundamentals or if the whole sector was down.

I configured the basket with 9 of its closest peers:

NYSE:VRE, NYSE:UDR, NYSE:MAA

NYSE:EQR, NYSE:INVH, NYSE:ESS

NYSE:CPT, NYSE:AVB, NYSE:AMH

The Result: The indicator draws a gray line representing the average return of those 9 "Big Boys." I can then load CSR on the chart and immediately see if it is lagging the pack (a potential value buy) or leading it.

How to Use:
Add the indicator to your chart.

Open Settings (Double-click the line).

Start Date: Set the date you want the "race" to begin (where all returns reset to 0%).

Symbols: Type in the tickers for your custom basket (e.g., NVDA, AMD, INTC). Leave unused slots blank.

Analyze:

Gray Line: The average performance of your basket.

Blue Line: The performance of the current symbol on your chart.

Pro Tip: You can save different "Presets" in the indicator settings for different sectors (e.g., save one preset as "Semis" and another as "Oil Majors") so you don't have to re-type symbols every time.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.