Git Product home page Git Product logo

quantworks's Introduction

QuantWorks

Python wrapper for kite API to test trading strategies in live market and also deploy them live. This framework makes it easier to communicate with Kite Connect API.
Kite Connect gives their users direct access to the Indian stock market and makes executing orders using python script in real time accessible. One of the main concern with the API is complex the login flow which we automate.

Login

kite-connect-flow

We make use of Selenium to fetch access token from kite.

  • First you need to download webdriver for your browser for Selenium. Here is the link for chrome webdriver.
  • Login process makes use of config.properties file to fetch the user details such as api_key and api_secret to access the API. You can generate your own config.properties file using the config.py. Make sure you dont share the config.properties file publicly as it contains accounts sensitive information. Give the path to the webdriver in cofig.py.
  • Now you can run setup.py which will fetch the access token and setup a kiteInstance which connects you to the API.

Backtesting

  • To start backtesting you need to fetch historical data for your intrument. For this use DataFetch.py.
  • You need to provide your config.properties path, path where you will store data and the start date and end date for historical data.
  • Run DataFetch.py along with the instrument number and you will get the csv's created with your data.
  • To start backtesting with this data you can put your strategy in backTest.py and start teting.
  • You can use methods in positionManaget.py to backtest.

Live Ticks

  • To connect with market and get live ticks for your intrument use LiveTicks.py.

Kite important links



There is a lot if work needed to be done on this framework, feel free to contribute or use as you wish

quantworks's People

Contributors

cranial490 avatar akshay1997 avatar

Watchers

 avatar

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.