Coder Social home page Coder Social logo

zerodha-option-selling's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.