Prebuilt Strategies
Live Strategies
- Market Maker
Makes a market on a single player, with options regarding the spread and order sizes at the bid and ask
- class strategies.live.market_maker.MarketMakerConfig
Config requirements for the MarketMaker strategy
- Variables
spread_type – whether the spread should be based on $ price or percent on either side of the mid price. either ‘percent’ or ‘price’
left_tail – $ or percent away from the mid-price you would like the bot to place its bid
right_tail – $ or percent away from the mid-price you would like the bot to place its ask
player_name – name of the player you want to make a market for. must match player’s name in jock api
tradeable_id – the player’s tradeable id. can be accessed via the webpage or api. preferred over ‘player_name’ var. e.g. ‘tdbl_64017ed1ce12bb263121f5a207c04f13’
left_tail – number of shares to place orders on at the bid
right_tail – number of shares to place orders on at the ask
- Dump Late
How it works:
If a player’s game is completed, we know that they will not score any more fantasy points. Their price cannot go up unless other players score below their projection. If we have an opportunity to buy a player or sell a player at a profit compared to their projected payout, we do so.
- class strategies.live.dump_late.DumpLateConfig
Config additions required for the DumpLate strategy.
- Variables
required_profit_margin – Require an estimated profit margin as a percentage before making a trade. Does not guarantee profit. Higher number will place less orders and take less risk.
order_size – Number of shares to buy in each order (min 1). I recommend playing around with this based on market liquidity.
dollar_size – required if no order_size, the dollar amount you would like to spend on an order (rather than share amount) e.g.: if price = 5 and dollar_size = 50, the bot will place an order for 10 shares. Default None
cancel_orders – Fill or kill orders. Defaults to False.
- Short Early
How it works:
Once an event has started, we are looking for players who far outperform their projections early on. These players are likely to fall back down to earth at some point before the event ends.
For example, in an NFL Sunday slate, if Saquon Barkley gets a 50 yard touchdown in the first 2 minutes of his 1pm game, he will be projected for many more points than anyone else. Because of this, his price will be very inflated. We should short him! This strategy is also applicable to NBA, and other sports, where a player scores a large chunk of points early on in the event.
- class strategies.live.short_early.ShortEarlyConfig
Required config settings for
ShortEarly- Variables
order_size – the number of shares per order
dollar_size – if not None, the $ amount worth of shares the user wishes to buy. e.g.: if price = 5 and dollar_size = 50, the bot will place an order for 10 shares.
price_risk – A risk parameter. Lower number = lower risk. e.g.: If you choose -1 price risk, the bot will short at 1.1x the current estimated price. (lower risk). If you choose 0.5, the bot will short the player at 0.95% of its estimated price (higher risk)
double_down – If you want the bot to short the player more than once. It will only short again if the player scores more fantasy points.
max_amount_completed – How much (%) of an event must be completed before the bot stops shorting players. This strategy is designed to short players who have scored a lot of fantasy points early in an event, and so it is only going to be profitable if this number is lower.
min_pct_gain – The strategy bids for players whose current estimated price is a certain percentage above their IPO. This parameter is the % the estimated price is above IPO that the player must be before the bot will consider placing an order.
min_ipo_price – Ignore players who have IPO’d for below a certain price. The higher this number, the fewer players the strategy will buy. This weeds out players who were cheap and way outperform their projections.
IPO Strategies
- Heat Check
How it works:
There are numerous options for the heat check strategy. See
strategies.ipo.heat_check.HeatCheckStrategiesfor details. The strategy pulls historical data, calculates a moving average of the player’s fantasy points, and compares it to their projection for this game, and generates a signal accordingly.
- class strategies.ipo.heat_check.HeatCheckStrategies(value)
Enum with each possible strategy for heat_check
- Variables
short_hot – strategy that shorts the players who have regularly been outperforming their projections, looking for mean reversion
short_cold – strategy that shorts the players who have regularly been underperforming projections
long_hot – long players who are outplaying their projection
long_cold – long players who have been underperforming, looking for a mean reversion
short_hot_long_cold – short players who have outperformed projection, and long players who are underperforming
long_hot_short_cold – long players who have outperformed projection, and short players who are underperforming
long_breakout – long players who have been performing closely to their projection
short_breakout – short players who have been performing closely to their projection
- class strategies.ipo.heat_check.HeatCheckConfig
- Variables
order_size – the amount of shares to buy for each order. Default: 10
dollar_size – dollar amount to spend on each player (i.e. buy 10 shares at $5 for a total of $50, and 20 shares @ 2.5)
strategy – which HeatCheck strategy to use, see
HeatCheckStrategiespct_field – how many of the players in the field we should buy, as a float 0 < x < 1. If 100 players available and pct_field = 0.25, it will choose the optimal 25 players based on your strategy
window – the lookback window for the rolling average calc, default: 10
risk – buy at est price * (1 + risk), higher risk = higher price willing to pay
- Random Strategy
How it works:
Buy a percentage of the field at random during the IPO phase
- class strategies.ipo.random_strategy.RandomConfig
Config for the random strategy
- Variables
pct_field_to_buy – percent of the available field to buy
order_size – number of shares to place each order
dollar_size – dollar amount to spend on each order
risk – how high above or below the price you want to bid. (-1, 1). Default: 0
sides – one of: ‘buy’, ‘sell’, or [‘buy’, ‘sell’]
- Short Top, Long Bottom
How it works:
Short all players whose estimated price is over a certain number, and buy everyone under a certain est price.
- class strategies.ipo.short_top_long_bottom.ShortTopLongBottomConfig
Config with extra required variables to run
ShortTopLongBottomstrategy- Variables
max_buy_price – buy all players below this price. Default 1.5
min_sell_price – sell all players above this price
order_size – number of shares to buy (alternatively, the user can set dollar_size)
dollar_size – dollar amount to spend on each order (i.e. if $20, buy 18 shares of a player at $1.50)