Creating Stock & Market Short Interest Ratios using Historical Short Sale Data

Post on: 16 Март, 2015 No Comment

Creating Stock & Market Short Interest Ratios using Historical Short Sale Data

Creating Stock & Market Short Interest Ratios using Historical Short Sale Data

Updated on 2011-06-07

A long strategy consists of buying stocks to profit from a price increase. The opposite strategy is called short strategy and it consists of selling stocks that you do not own in order to profit from a price decline. Traders and investors initiate short sale transactions because they believe that the price of the underlying stock will drop; they also invest in short strategies when they think that the market is bearish and therefore they want to profit from the decline of the stocks they invested in.

The process of short selling is usually managed by brokers. To put it in simple terms, when you sell short a stock, this stock will be borrowed from the broker’s own inventory or from one of the broker’s clients. When you decide to exit your short sale position, your broker will buy the stock and then give it back to its initial owner. You win or lose the difference between the sell price and the purchase price. This means that if during this period the stock declines then you will make a profit.

Downloading Short Sale Data

Short Selling data is provided by many stock market exchanges and it can be downloaded using one of the following items:

The last item gets short selling historical data for different U.S. Exchanges including NYSE, NASDAQ, AMEX and BATS from the Financial Regulatory Authority website. It then adds up the numbers and stores the result in a custom database short_selling that contains four fields: Date (Trading date), Short (Total number of shares that are short sold), Total (Volume or the total number of shares traded), Ratio (Short interest ratio). The data is available for the last two years.

Creating & Displaying the Short Interest Ratio

Short interest refers to the sum of the number of open short sale positions. The short interest ratio is calculated by dividing the short interest volume by the total trading volume. It is an indicator used by both technical and fundamental traders to identify the general sentiment regarding a particular stock (Bullish/Bearish degree).

Here is how to display the short interest ratio of a stock:

- Right click on a chart then click on Create new pane

- In the new pane, click on Add Indicator icon (First icon on the top of the pane)

- Select Databases/Fields, select short_selling database, select ratio field, set Get a value option to Set missing values to Zero then click on OK.

Here is how to create the moving average of the short interest ratio indicator:

- On the chart pane, click on Add Indicator

- Select All Indicators tab then select SMA (2) indicator

- Next to the close parameter, click on Add then add the short interest ratio as explained in the previous paragraph

- Click on OK to display the new trading indicator.

It is also possible to update the pane formula directly. To do so, right click on the chart then click on Update Formula.

Here is the formula of the 14-Bar SMA of the short selling volume to total volume:

short1 = GetData(short_selling,short, Zero);

total1 = GetData(short_selling,total, Zero);

r = (sma(short1, 14) / sma(total1, 14)) * 100;

plot(r, Short Ratio, colorGreen);

Note that you should run and download short selling historical data using the previous downloader before displaying the short interest ratio chart.

Creating Stock & Market Short Interest Ratios using Historical Short Sale Data

Creating a Short Interest ratio for the U.S. Market

This market sentiment indicator will calculate the ratio of the total short volume to the total volume of U.S. Stocks.

- Select Tools then Composite then open the composite manager.

- Click on Add to open the Create Composite form then click on Next

- In order to calculate the market sentiment ratio, we will need to create two composites then use the Script tool to compute the ratio.

- Type the following formula:

AddComposite(short, GetData(short_selling, short, Zero), _CompSum);

AddComposite(total, GetData(short_selling, total, Zero), _CompSum);

composite = 1;

- Click on Script then type the following CSharp code:

double[] short1 = Functions.GetVariable(short);

double[] total1 = Functions.GetVariable(total);


Categories
Stocks  
Tags
Here your chance to leave a comment!