Zerodha Kite python based Multi user option selling Algo (Beta):

  1. kite_options_sell.py - Option Selling program based on short strangle (premium<=50, can be configured) and Mean Reversion approach.
  2. kite_options_sell.ini - This .ini file is used by the above kite_options_sell.py for picking up its parameters.

Highlights of the algo:

  1. virtual_trade parameter if set to 1 in the kite_options_sell.ini file will not trigger orders to the exchange. It will just log the generated order details. Set this to 0 for realtime exchange execution of order.
  2. The algo uses pivot points to punch Nifty call orders at resistance/support levels. Parameterisation to use fixed points or multipliers instead of Pivot points is in progress.
  3. The nifty call/put is selected based on the following .ini parameters:
    => nifty_ce_max_price_limit is the limit price for the call option similarly nifty_pe_max_price_limit for put option.
    => next_week_expiry_days is the list of days for which next week expiry needs to be selected insted of current week. E.g if this parameter is set to 3,4 it will select next week expiry date on wed and thu and for rest of the days it will use current week expiry.
  4. Parameter profit_target_perc can be specified to book the profit after certain percentage of margin is achieved in the MTM. Margin considered per lot is 1 lakh which can be also specified at the nifty_avg_margin_req_per_lot parameter. Using margin parameter as zerodha margin api doesn't give the correct margin of executed orders, it shows even for the open orders where margins are blocked. Note: Set profit_target_perc to higher percentage (e.g 10) if profit needs to be manually booked and instead of getting booked by the algo.
  5. The algo runs in a loop and processes the orders/books profits/loss after every x seconds as specified in the interval_seconds parameter. Default value set to 30 seconds.
  6. The option_sell_type parameter can be set to CE or PE or BOTH based on your understanding on the Market direction. If set to CE only calls will be sold, and if set to PE only puts will be sold and if set to BOTH , both calls and puts will be sold as strangle. Default setting is BOTH to make it a neutral strategy.
  7. For getting the updates in Telegram chat, create a telegram bot using the botfather and ensure to start the bot. Specify the bot token in the .ini file with bot prefix and also specify your telegram chat id.