Saturday, October 3, 2015

thinkscript included: sdi_bnh_label - display buy 'n hold p&l in a chart label

hi folks, i know it's been a while but i've been working on a bunch of things and i have a backlog of stuff to get out to you. here's the first:

the sdi_bnh_label displays the percentage gain/loss that one would have achieved had one bought the charted equity on the open of the first bar of the chart. here's what i'm talking about:
spy with bnh label
i find that this is particularly helpful when combined with the sdi_yield_label on a 1 year chart:

spy with bnh and yield labels
you see, some data providers treat dividends as little splits of the underlying equity but tos charts do not, which is a positive in my book. here we can see that the gain in spy in the past 52 weeks has been entirely from dividends.

here's the code: (how to install)