From e3b7d19fa350bd7e9e4d6973b6a3d0ecba5c6d93 Mon Sep 17 00:00:00 2001 From: VarunS2002 <30069380+VarunS2002@users.noreply.github.com> Date: Thu, 4 Feb 2021 12:36:06 +0530 Subject: [PATCH] Release Version 5.0 - Updated Documentation for 5.0 - Updated Changelog for 5.0 --- CHANGELOG.md | 16 +++ NSE_Option_Chain_Analyzer.py | 2 +- README.md | 189 +++++++++++++++++++++++++++++++---- 3 files changed, 187 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29bda07..5ac41c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@
+># [5.0](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/releases/tag/5.0) +## Major Feature Update +- Added Support for Stocks (Total 141 Stocks). Issue: [#8](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/issues/8) + - Set Index Mode or Stock Mode then select your preferred Index or Stock + - Values are in 10s in Stock mode and 1000s in Index mode (to compensate for low values of stocks) + - Symbol of the Stock is present in the names of the .csv files + - Appropriate Units are reflected in the headers of .csv files +- Added Saving New settings for subsequent runs + - New Saved settings: + * Index/Stock Mode + * Selected Stock +- Fixed possible issues while reading configuration +- Optimised retrieving data from the API + +
+ ># [4.1](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/releases/tag/4.1) ## Feature and Bug Fix Update - Added Dumping Entire Option Chain data to a .csv file. Issues: [#3](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/issues/3) and [#4](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/issues/4) diff --git a/NSE_Option_Chain_Analyzer.py b/NSE_Option_Chain_Analyzer.py index 6c34d35..f04e68b 100644 --- a/NSE_Option_Chain_Analyzer.py +++ b/NSE_Option_Chain_Analyzer.py @@ -20,7 +20,7 @@ # noinspection PyAttributeOutsideInit class Nse: - version: str = '4.1' + version: str = '5.0' def __init__(self, window: Tk) -> None: self.intervals: List[int] = [1, 2, 3, 5, 10, 15] diff --git a/README.md b/README.md index e6b2c3f..244ec1a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Python NSE-Option-Chain-Analyzer ## [Downloads](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/releases) -[![Latest: v4.1](https://img.shields.io/badge/release-v4.1-brightgreen)](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/releases/download/4.1/NSE_Option_Chain_Analyzer_4.1.exe) +[![Latest: v5.0](https://img.shields.io/badge/release-v5.0-brightgreen)](https://github.com/VarunS2002/Python-NSE-Option-Chain-Analyzer/releases/download/5.0/NSE_Option_Chain_Analyzer_5.0.exe) ![Download-Count](https://img.shields.io/github/downloads/VarunS2002/Python-NSE-Option-Chain-Analyzer/total?color=blue) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) For doing technical analysis for option traders, the Option Chain is the most important tool for deciding entry and exit strategies. -The National Stock Exchange (NSE) has a website which displays the option chain for traders in near real-time. This program scrapes this data from the NSE site and then generates useful analysis of the Option Chain for the specified Security or Index from the NSE website. +The National Stock Exchange (NSE) has a website which displays the option chain for traders in near real-time. This program retrieves this data from the NSE site and then generates useful analysis of the Option Chain for the specified Index or Stock from the NSE website. It also continuously refreshes the Option Chain and visually displays the trend in various indicators and useful for Technical Analysis. Calculations are based on [Mr. Sameer Dharaskar's Course](http://advancesharetrading.com/). @@ -38,13 +38,17 @@ Calculations are based on [Mr. Sameer Dharaskar's Course](http://advancesharetra ## Usage: -1. Select your Index or Security option and it's Expiry Date +1. Set Index Mode or Stock Mode -2. Enter your preferred Strike Price +2. Select your Index or Stock + +3. Select it's Expiry Date -3. Enter the interval you want the program to refresh (Optional : Defaults to 1 minute) +4. Enter your preferred Strike Price -4. Click Start +5. Set the interval you want the program to refresh (Optional : Defaults to 1 minute) + +6. Click Start ## Note: @@ -58,8 +62,6 @@ Calculations are based on [Mr. Sameer Dharaskar's Course](http://advancesharetra - If a ZeroDivisionError occurs or some data doesn't exist the value of the variable will be defaulted to 0 -- All data is retrieved from https://www.nseindia.com/api/option-chain-indices?symbol={index_name} - ## Dependencies: - [auto-py-to-exe](https://pypi.org/project/auto-py-to-exe/) is used for compiling the program to a .exe file @@ -87,7 +89,150 @@ Calculations are based on [Mr. Sameer Dharaskar's Course](http://advancesharetra * BANKNIFTY * FINNIFTY -- Supports multiple instances with different indices and strike prices selected +- Supported Stocks : + * AARTIIND + * ACC + * ADANIENT + * ADANIPORTS + * AMARAJABAT + * AMBUJACEM + * APOLLOHOSP + * APOLLOTYRE + * ASHOKLEY + * ASIANPAINT + * AUROPHARMA + * AXISBANK + * BAJAJ-AUTO + * BAJAJFINSV + * BAJFINANCE + * BALKRISIND + * BANDHANBNK + * BANKBARODA + * BATAINDIA + * BEL + * BERGEPAINT + * BHARATFORG + * BHARTIARTL + * BHEL + * BIOCON + * BOSCHLTD + * BPCL + * BRITANNIA + * CADILAHC + * CANBK + * CHOLAFIN + * CIPLA + * COALINDIA + * COFORGE + * COLPAL + * CONCOR + * CUMMINSIND + * DABUR + * DIVISLAB + * DLF + * DRREDDY + * EICHERMOT + * ESCORTS + * EXIDEIND + * FEDERALBNK + * GAIL + * GLENMARK + * GMRINFRA + * GODREJCP + * GODREJPROP + * GRASIM + * HAVELLS + * HCLTECH + * HDFC + * HDFCAMC + * HDFCBANK + * HDFCLIFE + * HEROMOTOCO + * HINDALCO + * HINDPETRO + * HINDUNILVR + * IBULHSGFIN + * ICICIBANK + * ICICIGI + * ICICIPRULI + * IDEA + * IDFCFIRSTB + * IGL + * INDIGO + * INDUSINDBK + * INDUSTOWER + * INFRATEL + * INFY + * IOC + * ITC + * JINDALSTEL + * JSWSTEEL + * JUBLFOOD + * KOTAKBANK + * L&TFH + * LALPATHLAB + * LICHSGFIN + * LT + * LUPIN + * M&M + * M&MFIN + * MANAPPURAM + * MARICO + * MARUTI + * MCDOWELL-N + * MFSL + * MGL + * MINDTREE + * MOTHERSUMI + * MRF + * MUTHOOTFIN + * NATIONALUM + * NAUKRI + * NESTLEIND + * NMDC + * NTPC + * ONGC + * PAGEIND + * PEL + * PETRONET + * PFC + * PIDILITIND + * PNB + * POWERGRID + * PVR + * RAMCOCEM + * RBLBANK + * RECLTD + * RELIANCE + * SAIL + * SBILIFE + * SBIN + * SHREECEM + * SIEMENS + * SRF + * SRTRANSFIN + * SUNPHARMA + * SUNTV + * TATACHEM + * TATACONSUM + * TATAMOTORS + * TATAPOWER + * TATASTEEL + * TCS + * TECHM + * TITAN + * TORNTPHARM + * TORNTPOWER + * TVSMOTOR + * UBL + * ULTRACEMCO + * UPL + * VEDL + * VOLTAS + * WIPRO + * ZEEL + +- Supports multiple instances with different indices/stocks and/or strike prices selected - Red and Green colour indication for data based on trends @@ -100,7 +245,7 @@ Calculations are based on [Mr. Sameer Dharaskar's Course](http://advancesharetra * Call ITM: Yes/No * Put ITM: Yes/No -- Program title format: `NSE-Option-Chain-Analyzer - {index} - {expiry_date} - {strike_price}` +- Program title format: `NSE-Option-Chain-Analyzer - {index/stock} - {expiry_date} - {strike_price}` - Stop and Start manually @@ -123,7 +268,9 @@ Calculations are based on [Mr. Sameer Dharaskar's Course](http://advancesharetra - Debug Logging - Saves certain settings in a configuration file for subsequent runs. Saved Settings: + * Index/Stock Mode * Selected Index + * Selected Stock * Refresh Interval * Live Export * Notifications @@ -142,11 +289,11 @@ Data | Description --- | --- Server Time | *Web Scraped*. Indicates last data update time by NSE server Value | *Web Scraped*. Underlying Instrument Value indicates the value of the underlying Security or Index -Call Sum | Calculated. Sum of the Changes in Call Open Interest contracts of the given Strike Price and the next immediate two Strike Prices (In Thousands) -Put Sum | Calculated. Sum of the Change in Put Open Interest contracts of the given Strike Price and the next two Strike Prices (In Thousands) +Call Sum | Calculated. Sum of the Changes in Call Open Interest contracts of the given Strike Price and the next immediate two Strike Prices (In Thousands for Index Mode and Tens for Stock Mode) +Put Sum | Calculated. Sum of the Change in Put Open Interest contracts of the given Strike Price and the next two Strike Prices (In Thousands for Index Mode and Tens for Stock Mode) Difference | Calculated. Difference between the Call Sum and Put Sum. If its very -ve its bullish, if its very +ve then its bearish else its a sideways session. -Call Boundary | Change in Call Open Interest contracts for 2 Strike Prices above the given Strike Price. This is used to determine if Call writers are taking new positions (Bearish) or exiting their positions (Bullish). (In Thousands) -Put Boundary | Change in Put Open Interest for the given Strike Price. This is used to determine if Put writers are taking new positions (Bullish) or exiting their positions(Bearish). (In Thousands) +Call Boundary | Change in Call Open Interest contracts for 2 Strike Prices above the given Strike Price. This is used to determine if Call writers are taking new positions (Bearish) or exiting their positions (Bullish). (In Thousands for Index Mode and Tens for Stock Mode) +Put Boundary | Change in Put Open Interest for the given Strike Price. This is used to determine if Put writers are taking new positions (Bullish) or exiting their positions(Bearish). (In Thousands for Index Mode and Tens for Stock Mode) Call In The Money(ITM) | This indicates that bullish trend could continue and Value could cross 4 Strike Prices above given Strike Price. It's calculated as the ratio of Put writing and Call writing at the 4th Strike Price above the given Strike price. If the absolute ratio > 1.5 then its bullish sign. Put In The Money(ITM) | This indicates that bearish trend could continue and Value could cross 2 Strike Prices below given Strike Price. It's calculated as the ratio of Call writing and Put writing at the 2nd Strike Price below the given Strike price. If the absolute ratio > 1.5 then its bearish sign. @@ -154,8 +301,8 @@ Put In The Money(ITM) | This indicates that bearish trend could continue and Val Data | Description --- | --- -Open Interest Upper Boundary | Highest and 2nd Highest(highest in OI boundary range) Call Open Interest contracts (in thousands) and their corresponding Strike Prices -Open Interest Lower Boundary | Highest and 2nd Highest(highest in OI boundary range) Put Open Interest contracts (in thousands) and their corresponding Strike Prices +Open Interest Upper Boundary | Highest and 2nd Highest(highest in OI boundary range) Call Open Interest contracts (In Thousands for Index Mode and Tens for Stock Mode) and their corresponding Strike Prices +Open Interest Lower Boundary | Highest and 2nd Highest(highest in OI boundary range) Put Open Interest contracts (In Thousands for Index Mode and Tens for Stock Mode) and their corresponding Strike Prices Open Interest | This indicates if the latest OI data record indicates Bearish or Bullish signs near Indicated Strike Price. If the Call Sum is more than the Put Sum then the OI is considered Bearish as there is more Call writing than Puts. If the Put Sum is more than the Call sum then the OI Is considered Bullish as the Put writing exceeds the Call writing. Put Call Ratio(PCR) | Sum Total of Put Open Interest contracts divided by Sum Total of Call Open Interest contracts Call Exits | This indicates if the Call writers are exiting near given Strike Price in the latest OI data record. If the Call sum is < 0 or if the change in Call OI at the Call boundary (2 Strike Prices above the given Strike Price) is < 0, then Call writers are exiting their positions and the Bulls have a clear path. @@ -168,11 +315,15 @@ Put In The Money(ITM) | This indicates if the Put writers are also exiting far O - Login Page: -
![Login_Window](https://i.imgur.com/vgoQzww.png)

+
![Login_Window](https://i.imgur.com/TfETQkz.png)

+ +- Main Window Index Mode: -- Main Window: +
![Main_Window_Index](https://i.imgur.com/JHn58gn.png)

-
![Main_Window](https://i.imgur.com/JHn58gn.png)

+- Main Window Stock Mode: + +
![Main_Window_Stock](https://i.imgur.com/jwL1zrU.png)

- Selecting Data: