Skip to main content

Dark Pools and Short Data

The DPS sub-module contains the commands from the Dark Pools and Short Data menu within the OpenBB Terminal. These functions are meant to supplement other research on technical trading factors, settlement schedules, market flow, and volume dynamics. Commands are specifically for US-listed equities, and the data is reported to FINRA on a lagging schedule. Some will also have a _chart companion.

How to Use

Each function contained within the openbb.stocks.dps module is listed below with a short description.

PathDescription
openbb.stocks.dps.ctbCurrent Borrow Rates from Interactive Brokers
openbb.stocks.dps.dpotcWeekly Volume Totals for a Ticker on ATS and OTC Venues
openbb.stocks.dps.ftdHistorical Fails-to-Deliver Numbers
openbb.stocks.dps.hsiStocks With High Reported Short Interest
openbb.stocks.dps.posTop Short Volumes From Last Trading Day
openbb.stocks.dps.promTickers With Growing Trade Activity on ATS Tapes
openbb.stocks.dps.psiPrice vs. Short Volume
openbb.stocks.dps.shortedMost Shorted Stocks According to Yahoo Finance
openbb.stocks.dps.sidtcShort Interest and Days-to-Cover
openbb.stocks.dps.sposRolling 20-Day Net Short Volume of a Single Stock

Examples

Import Statements

Start out the Python script or Notebook file with the familiar statements:

from openbb_terminal.sdk import openbb
import pandas as pd

CTB

openbb.stocks.dps.ctb gets the current borrow rate and availability, on Interactive Brokers, for all tickers.

ctb_df = openbb.stocks.dps.ctb()

ctb_df
SymbolFeesAvailable
0PCF864.8795%100000
1EPR PRE625.0102%80000
2KITT574.4353%100
3EFSH439.7636%2000
4EVTL434.336%9000
17655DSAIF0.0%1000
17656DRREF0.0%25000
17657DOSEF0.0%100
17658DMYY0.0%100000
17659DLICY0.0%100

POS

openbb.stocks.dps.pos represents the cumulative net short dollar volume (Dark Pool Position $) by security. Is it calculated by taking the net short volume (short volume minus buy volume - a positive number means that the short volume was higher than the buy volume) times the closing price and taking the 20-day cumulative sum of this series. Source: Stockgrid.io

  • Net Short Volume: Short volume minus buy volume.
  • Net Short Volume $: Net short volume multiplied by the last close.
  • Position: The sum of the net short volume over the last 20 trading days.
  • Position $: Position multiplied by the last close.

Data is updated at 6pm EST.

The function returns up to 400 results, applying ascend = True unlocks the most negative values.

pos_high = openbb.stocks.dps.pos()
pos_high = pos_high.convert_dtypes()
pos_high.set_index('Date', inplace = True)
pos_low = openbb.stocks.dps.pos(ascend = True)
pos_low = pos_low.convert_dtypes()
pos_low.set_index('Date', inplace = True)
pos_df = pd.concat([pos_low,pos_high])
pos_df.sort_values(by=['Dark Pools Position $'], ascending = False, inplace = True)

pos_df
DateTickerShort VolumeShort Volume %Net Short VolumeNet Short Volume $Dark Pools PositionDark Pools Position $
2022-11-25SPY105117740.63808245495361.83041e+091094902694.27107e+10
2022-11-25QQQ29526420.490496-114422-3.283e+071306229093.6231e+10
2022-11-25NVDA62642110.6214724487533.98412e+08618507991.00604e+10
2022-11-25IWM39327030.5417176057061.12407e+08344312606.31318e+09
2022-11-25HYG11705110.5234971050767.88175e+06751848135.53232e+09
2022-11-25META16525870.359614-1290276-1.4375e+08-88892626-8.17035e+09
2022-11-25SQQQ61981040.358094-4912392-2.20223e+08-160324410-8.81487e+09
2022-11-25MSFT12466440.356497-1003640-2.48391e+08-60211625-1.41156e+10
2022-11-25TSLA141455580.480631-1140119-2.08482e+08-106217407-2.06849e+10
2022-11-25AMZN99072460.467855-1361394-1.27168e+08-238062247-2.26635e+10

SPOS

openbb.stocks.dps.spos is a section of the same data above, but as a time-series for individual tickers. There is one-year of daily historical data available.

spy_spos = openbb.stocks.dps.spos('SPY')

spy_spos.tail(5)
datesNet Short Vol. (1k $)Position (1M $)
42021-12-03 00:00:001218.4810786
32021-12-02 00:00:003224.179567.52
22021-12-01 00:00:002558.796343.35
12021-11-30 00:00:002737.273784.56
02021-11-29 00:00:001047.291047.29

PSI

Price vs.Short Interest. This function has two data sources, with their own syntax. openbb.stocks.dps.psi_sg will return the other columns openbb.stocks.dps.spos is missing. The example below puts them all together.

spy_spos = openbb.stocks.dps.spos('SPY')
spy_spos.rename(columns = {'dates':'date'}, inplace= True)
spy_spos.set_index(keys = 'date', inplace =True)
spy_psi,spy_price = openbb.stocks.dps.psi_sg('SPY')
spy_psi.set_index('date', inplace = True)
spy_pos = spy_psi.join(spy_spos)

spy_pos
dateShort Vol. [1M]Short Vol. %Short Exempt Vol. [1k]Total Vol. [1M]Net Short Vol. (1k $)Position (1M $)
2022-11-25 00:00:0010.511863.8137.12916.4741830.4142710.7
2022-11-23 00:00:0013.648460.5591.55222.53991914.2842099.3
2022-11-22 00:00:0010.027953.8552.33518.6233572.87442444.8
2022-11-21 00:00:009.4255757.661.24216.3632981.73442187.3
2022-11-18 00:00:0018.44560.68112.60330.39732571.3142352.3
2022-02-16 00:00:0011.033352.777.95820.909516.96619836.2
2022-02-15 00:00:0011.813857.0136.25920.72361295.5221808.3
2022-02-14 00:00:0012.74453.0850.47324.0105648.70519105.9
2022-02-11 00:00:0014.118346.6355.51130.2776-898.96217553.7
2022-02-10 00:00:0022.569662.9846.45435.8344181.0721316.8

The other version of this command is, openbb.stocks.dps.psi_q. It returns daily short volume from Nasdaq and NYSE separately, with daily historic data going back to 2013, and is sourced by Quandl. The first table below is the short volume and from Nasdaq.

nasdaq_psi = openbb.stocks.dps.psi_q(nyse=False, symbol = 'SPY')

nasdaq_psi.head(5)
DateShortVolumeShortExemptVolumeTotalVolume
2013-04-01 00:00:008.99908e+0635001.92365e+07
2013-04-02 00:00:001.15943e+0766002.09414e+07
2013-04-03 00:00:001.89638e+07134182.83739e+07
2013-04-04 00:00:001.29551e+0775861.99661e+07
2013-04-05 00:00:001.43612e+0702.81504e+07

The second table is from NYSE

nyse_psi = openbb.stocks.dps.psi_q(nyse=True, symbol = 'SPY')

nyse_psi.head(5)
DateShortVolumeShortExemptVolumeTotalVolume
2013-04-01 00:00:001.04127e+0638001.61224e+06
2013-04-02 00:00:001.47136e+0645001.9255e+06
2013-04-03 00:00:002.43128e+0603.23342e+06
2013-04-04 00:00:001.55106e+068002.28563e+06
2013-04-05 00:00:001.94417e+063002.93733e+06

Let's join them together:

nyse_psi.join(nasdaq_psi, lsuffix = ' (NYSE)', rsuffix = ' (NQ)')
DateShortVolume (NYSE)ShortExemptVolume (NYSE)TotalVolume (NYSE)ShortVolume (NQ)ShortExemptVolume (NQ)TotalVolume (NQ)
2013-04-01 00:00:001.04127e+0638001.61224e+068.99908e+0635001.92365e+07
2013-04-02 00:00:001.47136e+0645001.9255e+061.15943e+0766002.09414e+07
2013-04-03 00:00:002.43128e+0603.23342e+061.89638e+07134182.83739e+07
2013-04-04 00:00:001.55106e+068002.28563e+061.29551e+0775861.99661e+07
2013-04-05 00:00:001.94417e+063002.93733e+061.43612e+0702.81504e+07
2022-11-21 00:00:008380811712.05784e+068.47984e+06610711.41414e+07
2022-11-22 00:00:001.24058e+062732.45227e+068.70804e+06520621.60467e+07
2022-11-23 00:00:001.82258e+065243.35511e+061.17129e+07910281.90024e+07
2022-11-25 00:00:004103183538049841.00677e+07367761.56151e+07

HSI

openbb.stocks.dps.hsi lists the stocks with the highest reported short interest from NYSE or Nasdaq.

openbb.stocks.dps.hsi()
TickerCompanyExchangeShortIntFloatOutstdIndustry
0
1BBBYBed Bath & Beyond Inc.Nasdaq45.11%76.45M80.36MRetail (Specialty Non-Apparel)
2CVNACarvana CoNYSE44.24%93.40M105.95MRetail (Specialty Non-Apparel)
3BYNDBeyond Meat IncNasdaq42.75%57.25M63.74MFood Processing
4MSTRMicroStrategy IncNasdaq40.51%9.34M9.35MSoftware & Programming
31SPCEVirgin Galactic Holdings IncNYSE20.98%208.85M274.56MAerospace & Defense
32PETSPetmed Express IncNasdaq20.83%19.74M21.08MRetail (Drugs)
33RIDELordstown Motors CorpNasdaq20.69%162.40M216.98MAuto & Truck Manufacturers
34FFIEFaraday Future Intelligent EleNasdaq20.67%242.00M386.26MAuto & Truck Manufacturers
35IGMSIGM Biosciences IncNasdaq20.57%17.31M29.14MBiotechnology & Medical Research