Login Page - Create Account

Support Board


Date/Time: Thu, 18 Apr 2024 20:58:02 +0000



[User Discussion] - OT: Custom Stock Index Creator and the Coronavirus

View Count: 3094

[2020-03-07 22:28:33]
bjohnson777 (Brett Johnson) - Posts: 284
Watching the market whiplash the past couple weeks from coronavirus hysteria, I've been wondering 1) when will this be over, and 2) when's the best time to buy in? Keeping track of groups of stocks is exactly why I wrote my Custom Stock Index Creator (CSIC). It's free to download and use.

Custom Stock Index Creator:
Offering To The Community: Custom Stock Index Creator
Main DLL (has CSIC plus my other tools, chose this or the one above):
Offering To The Community: Brett Johnson's Standard Tool Kit
Quick Compile Instructions:
Offering To The Community: Brett Johnson's Standard Tool Kit | Post: 114621

Be sure to read the instructions at the top of the main CSIC page. This is one of my more complicated chart studies. To get the most out of it takes a little learning and understanding I outline in the documentation. If you've got money on the line, you'll want to do this anyways.

Since I'm in the US, my references will be north+west hemisphere based. Outside of this area, the stocks will be different but all the concepts will be the same. For local traders in foreign markets (relative to my location), the same concepts also apply.

(I have several sectors at the bottom of the page, but...)

Let's get started with a simple example. You have read the CSIC documentation page by now, right? I usually like to open SPY in a new chartbook with daily bars going 5-10 years back as my base chart.

Cruise Lines. These have gotten pounded the last few weeks. Since there are only 3 main ones, this will make an easy example template. I usually prefer several stocks for a better average for an index, but like I said, there are only 3. We have Carnival (CCL), Royal Caribbean (RCL), and Norwegian (NCLH).

We have a couple ways to proceed: with and without weighting. Without weighting averages all equally and is quick to set up (esp for testing). This makes more of a "psychological interest" based index as a buy in one stock is equally weighted in a buy against another stock in the list. The three main weighting ideas can be mixed. First is how well all the stocks "should" track with each other (mentioned in the main documentation). Second is lowering the weight of a stock where management is doing "bad things" and is inappropriately skewing the index. This could also be raised if they're taking the market. Third is weighting the stock by some calculated metric such as Market Cap. If you've read the documentation, you'll know that any stock without a weight defaults to 1.0.

Note: Since most of us are traders (with some secondary long term holdings), we tend to be vary paranoid about any and all squiggles on the chart. The more paranoid will want to use weightings based on the numbers that you are most familiar with based on your own personalized trading style. Since we all trade differently, there is no one single answer to make everyone happy...

...so here's an example you can modify to your own trading style: weighting by Market Cap. I jumped over to the finance.yahoo pages to get these numbers... but which to use? There's Market Cap for last quarter and there's also a daily calculated Market Cap. The Market Cap table could also be averaged. Since I'm guessing that these three cruise lines are big enough to not go under (pun?), I'm going to choose last reporting quarter. This represents how they were and how they're likely to proportionally be to each other after the coronavirus subsides. As I mentioned above, the #2 option in weighting has the idea of reducing the weight value if something bad happens like bankruptcy... or maybe bump the weight up a little higher if one company positions itself far better than another. On the Yahoo pages are also enterprise value, P/E ratios, revenue, and profits that could be swapped out for Market Cap in this example if your trading models use them. I'll stick with last quarter Market Cap since it's a common weighting and easy to understand.

CCL=$32.12b (2019-11-30, older but still usable)
RCL=$27.99b (2019-12-31)
NCLH=$12.45b (2019-12-31)

Take the largest Market Cap from CCL and we'll set that equal to a weighting of 1.0 (100%). The others will be a fractional percent of CCL in terms of size.
RCL is next, so divide it by CCL: $27.99b/$32.12b = 0.871
NCLH is the last to divide by CCL: $12.45b/$32.12b = 0.388
Note: Order in the Symbol List doesn't matter, but to keep things simple and understandable, stick with the largest Market Cap for the denominator (CCL in this case). Weightings greater than 1.0 are fine if Market Cap changes in the future. There is no artificial limitation.
Note 2: If your stock weighting divides out to less than 0.1 (10% or less the size of the largest by Market Cap), it may not worth being included in the Symbol List since it would be so small. If you still want it and there are other small ones like it, maybe don't use weightings.

...So, the Market Cap weighted Symbol List line to plug into the CSIC study would be:
CCL 1.0, RCL 0.871, NCLH 0.388
...And if you want just a quick look without weightings:
CCL, RCL, NCLH

Note: When changing stocks in the CSIC, set "Close All Other Charts?" to "One Shot" to clean up the chartbook. Everything will reload.

Hit OK in the Study Settings window and Sierra Chart will flash windows about as it loads the data in the background. This can take a minute. See the main documentation for the gotchas. You did read that, right? You can also add volume, which I find to be handy, in a second chart region.

(See attached image file)
Once done, you'll see bars from SPY and a white line overlaid on top of it for the cruise line index. From the beginning of 2019 to Friday's last trade (March 6), you'll see a semi-smashed head and shoulders pattern. For Friday, there was a slight turn up to the free fall. In Elliott Wave Theory (EWT), this is somewhat expected as it is almost half the length of the first free fall. EWT states there could be another half length fall before bottom. Stepping back from technical analysis, given that giant ships are locked in petri dishes for illness, this is likely... but who knows? Cruise ships are likely to bounce back last, so this would be a trailing indicator index. When the other indexes are turning up, the potential play would be to buy into your favorite cruise line when its down trend line breaks. Remember that the index line uses relative numbers and won't match to any specific dollar values. What's important is the pattern. You did read the CSIC documentation, right?

Note: If you don't like SPY, you could use your favorite cruise line as the base chart and compare it to the others using the created index line. This would create a better/worse performance comparison based on the company's peers (I usually call this a peer index).

If you like the chart, I recommend saving it something like: Index_CruiseLines.cht. Using "Index_" as a prefix keeps them all together in the file list. A bunch of these index files can get really messy without some forethought.

Since setting up CSIC can be a little tedious, saving this simple example as "Index_Template.cht" can make things go faster in the future. Just load it into a new chartbook for the next one, do the "One Shot" close mentioned above, and enter the new Symbol List. Remember to hit "Save As" if you want to keep a new index instead of saving over the template.

End the example. Now you can use the following to create your own sector indexes. I define these as market sectors based on daily bars.

Airlines: UAL (United), LUV (Southwest), JBLU (Jet Blue), DAL (Delta), AAL (American), SAVE (Spirit), CPCAY (Cathay Pacific), ALK (Alaska), ALGT (Allegiant Travel), SKYW (Sky West), RYAAY (Ryanair Holdings), HA (Hawaiian Air), CPA (Copa), GOL (Gol Linhas)
Symbol List: UAL, LUV, JBLU, DAL, AAL, SAVE, CPCAY, ALK, ALGT, SKYW, RYAAY, HA, CPA, GOL
Thoughts: These are likely to bounce back before cruise lines since airlines are used a lot in business. Family travel will be secondary.

Hotels: HLT (Hilton), MAR (Marriott), WYND (Wyndham), VAC (Marriott Vactations Worldwide), STAY (Extended Stay America), H (Hyatt), IHG (International Hotel Group)
Symbol List: HLT, MAR, WYND, VAC, STAY, H, IHG
Thoughts: These will probably follow airlines as business travel picks up. Secondary move will be family vacations.

Big Tech: We should all know these ticker symbols by heart.
Symbol List: AAPL, GOOGL, MSFT, AMZN, FB

Semiconductors: AMD, NVDA, AMAT (Applied Materials), MU (micron), QCOM, TXN (Texas Instruments), INTC (Intel), AVGO (Broadcom), NXPI (NXP Semi), XLNX (Xilinx), MCHP (Microchip), MXIM (Maxim), ADI (Analog Devices), KLAC (KLA Corp), LRCX (Lam Research)
Symbol List: AMD, NVDA, AMAT, MU, QCOM, TXN, INTC, AVGO, NXPI, XLNX, MCHP, MXIM, ADI, KLAC, LRCX
Thoughts: Since we're all addicted to tech, these will likely bounce back first. When the coronavirus starts subsiding, factories will start to re-open and become productive again. Most factories are in China or southeast Asia.

Medical Companies: GILD (Gilead Sciences), MRNA (Moderna), BMRN (Biomarin Pharma), REGN (Regneron Pharma), TDOC (Teledoc), PFI (Pfizer), JNJ (Johnson & Johnson), AMGN (Amgen), MRK (Merck), LLY (Eli Lilly)
Symbol List: GILD, MRNA, BMRN, REGN, TDOC, PFI, JNJ, AMGN, MRK, LLY
Thoughts: These generally go down with the market but then bounce back up once people realize they can help... at least somewhat with a virus. They'll probably go back down as hype dissipates.

Medical Insurance: UNH (United Health), MET (Met Life), PRU (Prudential), AFL (Aflac), LNC (Lincoln National), ANTM (Anthem), MOL (Molina), CNC (Centene), HUM (Humana)
Symbol List: UNH, MET, PRU, AFL, LNC, ANTM, MOL, CNC, HUM
Thoughts: Who knows how these will perform? For most people the coronavirus will be no worse than a bad cold. A major outbreak will cause these to fall. If nothing really happens (most likely), then these will bounce back up then become boring again.

Hydrocarbon Refinery and Transportation (>$2b market cap): COP (Conococo Phillips), BP, CVX (Chevron), XOM (Exxon Mobil), PSX (Phillips 66), MPC (Marathon Petroleum), HFC (HollyFrontier), VLO (Valero), KMI (Kinder Morgan), EPD (Enterprise Products), WMB (Williams), MMP (Magellan), PAA (Plains), ENB (Enbridge), ET (Energy Transfer), TRP (TC Energy), OKE (ONEOK), MPLX
Symbol List: COP, BP, CVX, XOM, PSX, MPC, HFC, VLO, KMI, EPD, WMB, MMP, PAA, ENB, ET, TRP, OKE, MPLX

Hydrocarbon Drilling & Related (>$2b market cap): PXD (Pioneer), FANG (Diamondback), HAL (Halliburton), MRO (Marathon Oil), APA (Apache), OXY (Occadental), CLR (Continental Resources), DVN (Devon), EOG (EOG Resources), SLB (Schlumberger), CXO (Concho), NOV (National Oilwell Varco), NBL (Noble), COG (Cabot), EQT, CNQ, SU (Suncor)
Symbol List: PXD, FANG, HAL, MRO, APA, OXY, CLR, DVN, EOG, SLB, CXO, NOV, NBL, COG, EQT, CNQ, SU

Hydrocarbon Thoughts: As factories and industries shut down, these will fall as oil demand falls. When summer comes around and the virus season ends, these will probably bounce back up. Also keep an eye on oil prices (like UCO, also tradeable).

Big Financials: MS (Morgan Stanley), C (Citigroup), GS (Goldman Sachs), BAC (Bank Of America), JPM (JP Morgan Chase), SCHW (Schwab), WFC (Wells Fargo)
Symbol List: MS, C, GS, BAC, JPM, SCHW, WFC
Thoughts: I'm not sure if these would be a leading or trailing indicator, but businesses need loans and capital to operate, and these will turn up when this happens.

Utilities: NRG, EXC (Exelon), NEE (Nextera), ETR (Entergy), PCG (PG&E), DTE, PPL, SO (Southern), D (Dominion)
Symbol List: NRG, EXC, NEE, ETR, PCG, DTE, PPL, SO, D
Thoughts: These tend to be the "safe havens" even though they're really not and will go down with the rest of the market. These do exhibit "some" counter market behavior, though. A loss of interest in these will tend to show a strengthening market.

Other thoughts: Keep an eye on the calculated index volume. It will be have similar to a single stock with the added benefit of being from a basket of stocks instead of one stock that may fade in and out of popularity.

If anyone else has their own favorite index basket, please post. I've got a few others I may clean up and add.
Date Time Of Last Edit: 2020-03-16 22:42:49
imageSC_Index_CruiseLines.png / V - Attached On 2020-03-07 22:27:12 UTC - Size: 37.87 KB - 358 views
[2020-03-16 22:51:49]
bjohnson777 (Brett Johnson) - Posts: 284
Updated airlines, semiconductors, and split the old petrol list into the hydrocarbon lists.

Added pics of semiconductors and hydrocarbon/drilling.
imageSC_Index_Semiconductors-20200316.png / V - Attached On 2020-03-16 22:51:08 UTC - Size: 40.98 KB - 343 views
Attachment Deleted.
imageSC_Index_Hydrocarbon-DrillingRelated-20200316.png / V - Attached On 2020-03-16 22:51:23 UTC - Size: 40.59 KB - 339 views
[2020-03-18 00:41:20]
bjohnson777 (Brett Johnson) - Posts: 284
Adding... (pics of Restaurants and Retail attached)

Home Builders: NVR (NVR), TOL (Toll Brothers), PHM (Pultegroup), LEN (Lennar), DHI (DR Horton), KBH (KB Homes), MTH (Meritage), MDC
Symbol List: NVR, TOL, PHM, LEN, DHI, KBH, MTH, MDC
Thoughts: People can't pay for homes if they can't work and are bunkered down.

Retail: WMT (Wal-Mart), TGT (Target), DLTR (Dollar Tree), COST (Costco), DG (Dollar General), M (Macy's), KSS (Kohls), BBY (Best Buy), BBBY (Bed Bath & Beyond), ROST (Ross), URBN (Urban Outfitters), JWN (Nordstrom), TJX, VFC, ANF (Abercrombie & Fitch), RL (Ralph Lauren), AEO (American Eagle Outfitters), GPS (The Gap), TIF (Tiffany), LB (L Brands), GES (Guess), FL (Foot Locker), HBI (Hanesbrands), TPR (Tapestry), CPRI (Capri), UA (Under Armour), LULU
Symbol List: WMT, TGT, DLTR, COST, DG, M, KSS, BBY, BBBY, ROST, URBN, JWN, TJX, VFC, ANF, RL, AEO, GPS, TIF, LB, GES, FL, HBI, TPR, CPRI, UA, LULU
Thoughts: Some are stronger than others. Some are in more critical areas than others. Retail will be volatile.

Big Auto: F (Ford), TM (Toyota Motor), GM (General Motors), HMC (Honda), TSLA (Tesla), FCAU (Fiat), NSANY (Nissan)
Symbol List: F, TM, GM, HMC, TSLA, FCAU, NSANY
Thoughts: The index line the past year has been mostly range limited. When the crash ends, there should be a good reversal indicator at the bottom.

Restaurants: YUM, MCD (McDonalds), SBUX (Starbucks), CMG (Chipotle), DRI (Darden), WEN (Wendy's), CBRL (Cracker Barrel), TXRH (Texas Roadhouse), DIN (Dine), DENN (Denny's), JACK (Jack in the Box), CAKE (Cheesecake Factory), EAT (Brinker), DPZ (Domino's Pizza), PZZA (Papa John's), DNKN (Dunkin' Brands), QSR (Restaurant Brands), SHAK (Shake Shack)
Symbol List: YUM, MCD, SBUX, CMG, DRI, WEN, CBRL, TXRH, DIN, DENN, JACK, CAKE, EAT, DPZ, PZZA, DNKN, QSR, SHAK
Thoughts: These will be hit the hardest with isolation orders. Food venues with drive-thru will do better than sit-down only. Once the orders are lifted, these will bounce back.

Casino: MGM, WYNN, WYNMY (Wynn Macau), MLCO (Melco), LVS (Las Vegas Sands), IGT (International Game Tech), BYD (Boyd Gaming), SCHYY (Sands China), CZR (Caesars Entertainment), PENN (Penn National Gaming), ERI (Eldorado Resorts), SGMS (Scientific Games), MCRI (Monarch Casino), RRR (Red Rock), GDEN (Golden Entertainment), CHDN (Churchill Downs), MLCO (Melco Resorts), MGP (MGM Growth Properties), GLPI (Gaming and Leisure Properties)
Symbol List: MGM, WYNN, WYNMY, MLCO, LVS, IGT, BYD, SCHYY, CZR, PENN, ERI, SGMS, MCRI, RRR, GDEN, CHDN, MLCO, MGP, GLPI
Thoughts: These will behave similar to restaurants. Once fear drops, people will start traveling again.
imageSC_Index_Restaurants-20200317.png / V - Attached On 2020-03-18 00:41:07 UTC - Size: 39.91 KB - 341 views
imageSC_Index_Retail-20200317.png / V - Attached On 2020-03-18 00:41:12 UTC - Size: 40.65 KB - 322 views

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account