Organizing Expiry Dates of Financial Instruments with Python

Variation 1: Stock-wise Organization

In this article, we are diving into a Python function that helps organize expiry dates of futures and options from a dataset. This function, named create_expiry_list, processes a DataFrame containing information about financial instruments, and returns a structured JSON string categorizing expiry dates under each instrument type and name.

  • The create_expiry_list function is designed to organize expiry data based on the name of the financial instruments. 
  • In this variation, the function iterates through the DataFrame, categorizing the futures and options under each instrument’s name. 
  • It then converts the expiry dates from a datetime format to a string format (‘YYYY-MM-DD’), making the data more readable. 

				
					def create_expiry_list(df):
    expiry_list = {"fut": {}, "options": {}}
    
    # Filtering for Futures
    df_fut = df[df['instrument_type'] == 'FUT']
    unique_names_fut = df_fut['name'].unique()
    for name in unique_names_fut:
        expiry_dates = df_fut[df_fut['name'] == name]['expiry'].dropna().unique()
        expiry_dates = pd.to_datetime(expiry_dates)
        expiry_list["fut"][name] = sorted(expiry_dates)
    
    # Filtering for Options (CE and PE)
    df_options = df[df['instrument_type'].isin(['CE', 'PE'])]
    unique_names_options = df_options['name'].unique()
    for name in unique_names_options:
        expiry_dates = df_options[df_options['name'] == name]['expiry'].dropna().unique()
        expiry_dates = pd.to_datetime(expiry_dates)
        expiry_list["options"][name] = sorted(expiry_dates)
    
    # Converting numpy datetime64 to string in 'YYYY-MM-DD' format
    for instrument_type in expiry_list:
        for name in expiry_list[instrument_type]:
            expiry_list[instrument_type][name] = [date.strftime('%Y-%m-%d') for date in expiry_list[instrument_type][name]]
    
    return json.dumps(expiry_list, indent=4)

stockwise_json = json.loads(create_expiry_list(instrumentList))
stockwise_json
				
			

The create_expiry_list function organizes financial instrument expiry data based on the name of the instrument. 

  • It operates on a DataFrame and categorizes futures and options under each instrument name, converting expiry dates to a string format and structuring the data into a JSON object. 
  • This format is helpful for identifying all expiry dates associated with a particular instrument, making it easier to track each instrument’s expiry timeline.
Output – 
				
					{'fut': {'EURINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-02-27',
   '2024-03-27',
   '2024-04-26',
   '2024-05-29',
   '2024-06-26',
   '2024-07-29',
   '2024-08-28',
   '2024-09-26',
   '2024-10-29'],
  'GBPINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-02-27',
   '2024-03-27',
   '2024-04-26',
   '2024-05-29',
   '2024-06-26',
   '2024-07-29',
   '2024-08-28',
   '2024-09-26',
   '2024-10-29'],
  'JPYINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-02-27',
   '2024-03-27',
   '2024-04-26',
   '2024-05-29',
   '2024-06-26',
   '2024-07-29',
   '2024-08-28',
   '2024-09-26',
   '2024-10-29'],
  'USDINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-02-27',
   '2024-03-27',
   '2024-04-26',
   '2024-05-29',
   '2024-06-26',
   '2024-07-29',
   '2024-08-28',
   '2024-09-26',
   '2024-10-29'],
  'BANKEX': ['2023-10-30',
   '2023-11-06',
   '2023-11-13',
   '2023-11-20',
   '2023-11-24',
   '2023-12-04',
   '2023-12-11',
   '2023-12-22'],
  'SENSEX': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-29',
   '2024-01-25'],
  'SENSEX50': ['2023-11-02',
   '2023-11-09',
   '2023-11-16',
   '2023-11-23',
   '2023-11-30',
   '2023-12-07',
   '2023-12-14',
   '2023-12-28',
   '2024-01-25'],
  '654GS2032': ['2023-11-30', '2023-12-28'],
  '664GS2035': ['2023-11-30', '2023-12-28', '2024-01-25', '2024-03-28'],
  '667GS2035': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '718GS2033': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '726GS2032': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27'],
  '726GS2033': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '741GS2036': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '754GS2036': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '91DTB': ['2023-11-29', '2023-12-27', '2024-01-31', '2024-03-27'],
  'ONMIBOR': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-03-29',
   '2024-06-28',
   '2024-09-30'],
  'ALUMINI': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'ALUMINIUM': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'COPPER': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'COTTONCNDY': ['2023-11-30', '2024-01-31'],
  'CRUDEOIL': ['2023-11-17', '2023-12-18', '2024-01-19', '2024-02-16'],
  'CRUDEOILM': ['2023-11-17', '2023-12-18', '2024-01-19', '2024-02-16'],
  'GOLD': ['2023-12-05', '2024-02-05', '2024-04-05', '2024-06-05'],
  'GOLDGUINEA': ['2023-10-31', '2023-11-30', '2023-12-29', '2024-01-31'],
  'GOLDM': ['2023-11-03', '2023-12-05', '2024-01-05'],
  'GOLDPETAL': ['2023-10-31', '2023-11-30', '2023-12-29', '2024-01-31'],
  'KAPAS': ['2023-11-30', '2024-02-29', '2024-04-30'],
  'LEAD': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'LEADMINI': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'MCXBULLDEX': ['2023-11-24', '2023-12-22', '2024-01-24'],
  'MCXMETLDEX': ['2023-11-21', '2023-12-19', '2024-01-19'],
  'MENTHAOIL': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'NATGASMINI': ['2023-11-27', '2023-12-26', '2024-01-25'],
  'NATURALGAS': ['2023-11-27', '2023-12-26', '2024-01-25'],
  'NICKEL': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'SILVER': ['2023-12-05', '2024-03-05', '2024-05-03', '2024-07-05'],
  'SILVERM': ['2023-11-30', '2024-02-29', '2024-04-30', '2024-06-28'],
  'SILVERMIC': ['2023-11-30', '2024-02-29'],
  'ZINC': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'ZINCMINI': ['2023-10-31',
   '2023-11-30',
   '2023-12-29',
   '2024-01-31',
   '2024-02-29'],
  'NIFTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BANKNIFTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AARTIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABBOTINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABCAPITAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABFRL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ACC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ADANIENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ADANIPORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ALKEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AMBUJACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'APOLLOHOSP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'APOLLOTYRE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ASHOKLEY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ASIANPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ASTRAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ATUL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AUBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AUROPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AXISBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BAJAJ-AUTO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BAJAJFINSV': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BAJFINANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BALKRISIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BALRAMCHIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BANDHANBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BANKBARODA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BATAINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BERGEPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BHARATFORG': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BHARTIARTL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BHEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BIOCON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BOSCHLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BPCL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BRITANNIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BSOFT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CANBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CANFINHOME': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CHAMBLFERT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CHOLAFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CIPLA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COALINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COFORGE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COLPAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CONCOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COROMANDEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CROMPTON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CUB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CUMMINSIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DABUR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DALBHARAT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DEEPAKNTR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DELTACORP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DIVISLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DIXON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DLF': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DRREDDY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'EICHERMOT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ESCORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'EXIDEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'FEDERALBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'FINNIFTY': ['2023-10-31', '2023-11-28', '2023-12-26'],
  'GAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GLENMARK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GMRINFRA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GNFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GODREJCP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GODREJPROP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GRANULES': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GRASIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GUJGASLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HAVELLS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HCLTECH': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HDFCAMC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HDFCBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HDFCLIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HEROMOTOCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDALCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDCOPPER': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDPETRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDUNILVR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IBULHSGFIN': ['2023-11-30', '2023-12-28'],
  'ICICIBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ICICIGI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ICICIPRULI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IDEA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IDFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IDFCFIRSTB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IEX': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDHOTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDIACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDIAMART': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDIGO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDUSINDBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDUSTOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INFY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IOC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IPCALAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IRCTC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ITC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JINDALSTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JKCEMENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JSWSTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JUBLFOOD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'KOTAKBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'L&TFH': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LALPATHLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LAURUSLABS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LICHSGFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LTIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LTTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LUPIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'M&M': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'M&MFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MANAPPURAM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MARICO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MARUTI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MCDOWELL-N': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MCX': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'METROPOLIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MFSL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MIDCPNIFTY': ['2023-10-30', '2023-11-24', '2023-12-22'],
  'MOTHERSON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MPHASIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MUTHOOTFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NATIONALUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NAUKRI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NAVINFLUOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NESTLEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NMDC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NTPC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'OBEROIRLTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'OFSS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ONGC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PAGEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PERSISTENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PETRONET': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PIDILITIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PNB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'POLYCAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'POWERGRID': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PVRINOX': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RAMCOCEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RBLBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RECLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RELIANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SBICARD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SBILIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SBIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SHREECEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SHRIRAMFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SIEMENS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SUNPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SUNTV': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SYNGENE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATACHEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATACOMM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATACONSUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATAMOTORS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATAPOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATASTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TCS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TECHM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TITAN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TORNTPHARM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TRENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TVSMOTOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'UBL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ULTRACEMCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'UPL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'VEDL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'VOLTAS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'WIPRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ZEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ZYDUSLIFE': ['2023-11-30', '2023-12-28', '2024-01-25']},
 'options': {'EURINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-03-27',
   '2024-06-26',
   '2024-09-26'],
  'GBPINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-03-27',
   '2024-06-26',
   '2024-09-26'],
  'JPYINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-03-27',
   '2024-06-26',
   '2024-09-26'],
  'USDINR': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-11-28',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-22',
   '2023-12-27',
   '2023-12-29',
   '2024-01-05',
   '2024-01-12',
   '2024-01-29',
   '2024-03-27',
   '2024-06-26',
   '2024-09-26'],
  'BANKEX': ['2023-10-30',
   '2023-11-06',
   '2023-11-13',
   '2023-11-20',
   '2023-11-24',
   '2023-12-04',
   '2023-12-11',
   '2023-12-22'],
  'SENSEX': ['2023-11-03',
   '2023-11-10',
   '2023-11-17',
   '2023-11-24',
   '2023-12-01',
   '2023-12-08',
   '2023-12-15',
   '2023-12-29',
   '2024-01-25',
   '2024-03-29',
   '2024-06-28',
   '2024-09-27',
   '2024-12-27',
   '2025-06-27',
   '2025-12-26',
   '2026-06-26',
   '2026-12-25',
   '2027-06-25',
   '2027-12-31',
   '2028-06-30'],
  'SENSEX50': ['2023-11-02',
   '2023-11-09',
   '2023-11-16',
   '2023-11-23',
   '2023-11-30',
   '2023-12-07',
   '2023-12-14',
   '2023-12-28',
   '2024-01-25'],
  '654GS2032': ['2023-11-30', '2023-12-28'],
  '667GS2035': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '718GS2033': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '726GS2032': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27'],
  '726GS2033': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '741GS2036': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  '754GS2036': ['2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  'COPPER': ['2023-11-21', '2023-12-19', '2024-01-19'],
  'CRUDEOIL': ['2023-11-15', '2023-12-14', '2024-01-17'],
  'GOLD': ['2023-11-24', '2024-01-24', '2024-03-26', '2024-05-27'],
  'GOLDM': ['2023-11-24', '2023-12-27'],
  'NATURALGAS': ['2023-11-23', '2023-12-21', '2024-01-23'],
  'SILVER': ['2023-11-24', '2024-02-23', '2024-04-24', '2024-06-26'],
  'SILVERM': ['2023-11-21', '2024-02-20', '2024-04-19', '2024-06-19'],
  'ZINC': ['2023-11-21', '2023-12-19', '2024-01-19'],
  'NIFTY': ['2023-11-02',
   '2023-11-09',
   '2023-11-16',
   '2023-11-23',
   '2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26',
   '2024-12-26',
   '2025-06-26',
   '2025-12-24',
   '2026-06-25',
   '2026-12-31',
   '2027-06-24',
   '2027-12-30',
   '2028-06-29'],
  'BANKNIFTY': ['2023-11-01',
   '2023-11-08',
   '2023-11-15',
   '2023-11-22',
   '2023-11-30',
   '2023-12-28',
   '2024-01-25',
   '2024-03-28',
   '2024-06-27',
   '2024-09-26'],
  'AARTIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABBOTINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABCAPITAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ABFRL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ACC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ADANIENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ADANIPORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ALKEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AMBUJACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'APOLLOHOSP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'APOLLOTYRE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ASHOKLEY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ASIANPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ASTRAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ATUL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AUBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AUROPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'AXISBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BAJAJ-AUTO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BAJAJFINSV': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BAJFINANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BALKRISIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BALRAMCHIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BANDHANBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BANKBARODA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BATAINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BERGEPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BHARATFORG': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BHARTIARTL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BHEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BIOCON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BOSCHLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BPCL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BRITANNIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'BSOFT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CANBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CANFINHOME': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CHAMBLFERT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CHOLAFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CIPLA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COALINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COFORGE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COLPAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CONCOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'COROMANDEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CROMPTON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CUB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'CUMMINSIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DABUR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DALBHARAT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DEEPAKNTR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DELTACORP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DIVISLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DIXON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DLF': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'DRREDDY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'EICHERMOT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ESCORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'EXIDEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'FEDERALBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'FINNIFTY': ['2023-10-31',
   '2023-11-07',
   '2023-11-13',
   '2023-11-21',
   '2023-11-28',
   '2023-12-05',
   '2023-12-26'],
  'GAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GLENMARK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GMRINFRA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GNFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GODREJCP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GODREJPROP': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GRANULES': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GRASIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'GUJGASLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HAVELLS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HCLTECH': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HDFCAMC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HDFCBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HDFCLIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HEROMOTOCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDALCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDCOPPER': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDPETRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'HINDUNILVR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IBULHSGFIN': ['2023-11-30', '2023-12-28'],
  'ICICIBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ICICIGI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ICICIPRULI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IDEA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IDFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IDFCFIRSTB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IEX': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDHOTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDIACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDIAMART': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDIGO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDUSINDBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INDUSTOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'INFY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IOC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IPCALAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'IRCTC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ITC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JINDALSTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JKCEMENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JSWSTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'JUBLFOOD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'KOTAKBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'L&TFH': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LALPATHLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LAURUSLABS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LICHSGFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LTIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LTTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'LUPIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'M&M': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'M&MFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MANAPPURAM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MARICO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MARUTI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MCDOWELL-N': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MCX': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'METROPOLIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MFSL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MIDCPNIFTY': ['2023-10-30',
   '2023-11-06',
   '2023-11-13',
   '2023-11-20',
   '2023-11-24',
   '2023-12-04',
   '2023-12-22'],
  'MOTHERSON': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MPHASIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'MUTHOOTFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NATIONALUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NAUKRI': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NAVINFLUOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NESTLEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NMDC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'NTPC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'OBEROIRLTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'OFSS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ONGC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PAGEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PERSISTENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PETRONET': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PIDILITIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PNB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'POLYCAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'POWERGRID': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'PVRINOX': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RAMCOCEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RBLBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RECLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'RELIANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SBICARD': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SBILIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SBIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SHREECEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SHRIRAMFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SIEMENS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SUNPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SUNTV': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'SYNGENE': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATACHEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATACOMM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATACONSUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATAMOTORS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATAPOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TATASTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TCS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TECHM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TITAN': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TORNTPHARM': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TRENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'TVSMOTOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'UBL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ULTRACEMCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'UPL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'VEDL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'VOLTAS': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'WIPRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ZEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
  'ZYDUSLIFE': ['2023-11-30', '2023-12-28', '2024-01-25']}}

def create_expiry_list2(df):
    expiry_list = {}
    
    # Converting expiry column to datetime and dropping NaT
    df = df.dropna(subset=['expiry'])
    df['expiry'] = pd.to_datetime(df['expiry'])
    
    # Getting unique expiry dates and sorting them
    unique_expiry_dates = sorted(df['expiry'].unique())
    
    for date in unique_expiry_dates:
        # Converting numpy datetime64 to pandas Timestamp
        date = pd.Timestamp(date)
        date_str = date.strftime('%Y-%m-%d')
        expiry_list[date_str] = {"fut": [], "options": []}
        
        # Filtering DataFrame for each unique expiry date
        df_date = df[df['expiry'] == date]
        
        # Adding futures symbols
        fut_symbols = df_date[df_date['instrument_type'] == 'FUT']['name'].unique()
        expiry_list[date_str]['fut'] = sorted(fut_symbols)
        
        # Adding options symbols
        option_symbols = df_date[df_date['instrument_type'].isin(['CE', 'PE'])]['name'].unique()
        expiry_list[date_str]['options'] = sorted(option_symbols)
    
    return json.dumps(expiry_list, indent=4)

datewise_json = json.loads(create_expiry_list2(df))
datewise_json
​
def create_expiry_list2(df):
				
			

Variation 2: Date-wise Organization

On the other hand, the create_expiry_list2 function structures the expiry data based on the expiry dates, providing a view of all instruments expiring on a particular date. It also operates on a DataFrame, iterates through each unique expiry date, and categorizes the futures and options under these dates.

				
					
def create_expiry_list2(df):
    expiry_list = {}
    
    # Converting expiry column to datetime and dropping NaT
    df = df.dropna(subset=['expiry'])
    df['expiry'] = pd.to_datetime(df['expiry'])
    
    # Getting unique expiry dates and sorting them
    unique_expiry_dates = sorted(df['expiry'].unique())
    
    for date in unique_expiry_dates:
        # Converting numpy datetime64 to pandas Timestamp
        date = pd.Timestamp(date)
        date_str = date.strftime('%Y-%m-%d')
        expiry_list[date_str] = {"fut": [], "options": []}
        
        # Filtering DataFrame for each unique expiry date
        df_date = df[df['expiry'] == date]
        
        # Adding futures symbols
        fut_symbols = df_date[df_date['instrument_type'] == 'FUT']['name'].unique()
        expiry_list[date_str]['fut'] = sorted(fut_symbols)
        
        # Adding options symbols
        option_symbols = df_date[df_date['instrument_type'].isin(['CE', 'PE'])]['name'].unique()
        expiry_list[date_str]['options'] = sorted(option_symbols)
    
    return json.dumps(expiry_list, indent=4)

datewise_json = json.loads(create_expiry_list2(instrumentList))
datewise_json
				
			

Output – 

				
					{'2023-10-30': {'fut': ['BANKEX', 'MIDCPNIFTY'],
  'options': ['BANKEX', 'MIDCPNIFTY']},
 '2023-10-31': {'fut': ['ALUMINI',
   'ALUMINIUM',
   'COPPER',
   'FINNIFTY',
   'GOLDGUINEA',
   'GOLDPETAL',
   'LEAD',
   'LEADMINI',
   'MENTHAOIL',
   'NICKEL',
   'ONMIBOR',
   'ZINC',
   'ZINCMINI'],
  'options': ['FINNIFTY']},
 '2023-11-01': {'fut': [], 'options': ['BANKNIFTY']},
 '2023-11-02': {'fut': ['SENSEX50'], 'options': ['NIFTY', 'SENSEX50']},
 '2023-11-03': {'fut': ['EURINR',
   'GBPINR',
   'GOLDM',
   'JPYINR',
   'SENSEX',
   'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2023-11-06': {'fut': ['BANKEX'], 'options': ['BANKEX', 'MIDCPNIFTY']},
 '2023-11-07': {'fut': [], 'options': ['FINNIFTY']},
 '2023-11-08': {'fut': [], 'options': ['BANKNIFTY']},
 '2023-11-09': {'fut': ['SENSEX50'], 'options': ['NIFTY', 'SENSEX50']},
 '2023-11-10': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2023-11-13': {'fut': ['BANKEX'],
  'options': ['BANKEX', 'FINNIFTY', 'MIDCPNIFTY']},
 '2023-11-15': {'fut': [], 'options': ['BANKNIFTY', 'CRUDEOIL']},
 '2023-11-16': {'fut': ['SENSEX50'], 'options': ['NIFTY', 'SENSEX50']},
 '2023-11-17': {'fut': ['CRUDEOIL',
   'CRUDEOILM',
   'EURINR',
   'GBPINR',
   'JPYINR',
   'SENSEX',
   'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2023-11-20': {'fut': ['BANKEX'], 'options': ['BANKEX', 'MIDCPNIFTY']},
 '2023-11-21': {'fut': ['MCXMETLDEX'],
  'options': ['COPPER', 'FINNIFTY', 'SILVERM', 'ZINC']},
 '2023-11-22': {'fut': [], 'options': ['BANKNIFTY']},
 '2023-11-23': {'fut': ['SENSEX50'],
  'options': ['NATURALGAS', 'NIFTY', 'SENSEX50']},
 '2023-11-24': {'fut': ['BANKEX',
   'EURINR',
   'GBPINR',
   'JPYINR',
   'MCXBULLDEX',
   'MIDCPNIFTY',
   'SENSEX',
   'USDINR'],
  'options': ['BANKEX',
   'EURINR',
   'GBPINR',
   'GOLD',
   'GOLDM',
   'JPYINR',
   'MIDCPNIFTY',
   'SENSEX',
   'SILVER',
   'USDINR']},
 '2023-11-27': {'fut': ['NATGASMINI', 'NATURALGAS'], 'options': []},
 '2023-11-28': {'fut': ['EURINR', 'FINNIFTY', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'FINNIFTY', 'GBPINR', 'JPYINR', 'USDINR']},
 '2023-11-29': {'fut': ['91DTB'], 'options': []},
 '2023-11-30': {'fut': ['654GS2032',
   '664GS2035',
   '667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'AARTIIND',
   'ABB',
   'ABBOTINDIA',
   'ABCAPITAL',
   'ABFRL',
   'ACC',
   'ADANIENT',
   'ADANIPORTS',
   'ALKEM',
   'ALUMINI',
   'ALUMINIUM',
   'AMBUJACEM',
   'APOLLOHOSP',
   'APOLLOTYRE',
   'ASHOKLEY',
   'ASIANPAINT',
   'ASTRAL',
   'ATUL',
   'AUBANK',
   'AUROPHARMA',
   'AXISBANK',
   'BAJAJ-AUTO',
   'BAJAJFINSV',
   'BAJFINANCE',
   'BALKRISIND',
   'BALRAMCHIN',
   'BANDHANBNK',
   'BANKBARODA',
   'BANKNIFTY',
   'BATAINDIA',
   'BEL',
   'BERGEPAINT',
   'BHARATFORG',
   'BHARTIARTL',
   'BHEL',
   'BIOCON',
   'BOSCHLTD',
   'BPCL',
   'BRITANNIA',
   'BSOFT',
   'CANBK',
   'CANFINHOME',
   'CHAMBLFERT',
   'CHOLAFIN',
   'CIPLA',
   'COALINDIA',
   'COFORGE',
   'COLPAL',
   'CONCOR',
   'COPPER',
   'COROMANDEL',
   'COTTONCNDY',
   'CROMPTON',
   'CUB',
   'CUMMINSIND',
   'DABUR',
   'DALBHARAT',
   'DEEPAKNTR',
   'DELTACORP',
   'DIVISLAB',
   'DIXON',
   'DLF',
   'DRREDDY',
   'EICHERMOT',
   'ESCORTS',
   'EXIDEIND',
   'FEDERALBNK',
   'GAIL',
   'GLENMARK',
   'GMRINFRA',
   'GNFC',
   'GODREJCP',
   'GODREJPROP',
   'GOLDGUINEA',
   'GOLDPETAL',
   'GRANULES',
   'GRASIM',
   'GUJGASLTD',
   'HAL',
   'HAVELLS',
   'HCLTECH',
   'HDFCAMC',
   'HDFCBANK',
   'HDFCLIFE',
   'HEROMOTOCO',
   'HINDALCO',
   'HINDCOPPER',
   'HINDPETRO',
   'HINDUNILVR',
   'IBULHSGFIN',
   'ICICIBANK',
   'ICICIGI',
   'ICICIPRULI',
   'IDEA',
   'IDFC',
   'IDFCFIRSTB',
   'IEX',
   'IGL',
   'INDHOTEL',
   'INDIACEM',
   'INDIAMART',
   'INDIGO',
   'INDUSINDBK',
   'INDUSTOWER',
   'INFY',
   'IOC',
   'IPCALAB',
   'IRCTC',
   'ITC',
   'JINDALSTEL',
   'JKCEMENT',
   'JSWSTEEL',
   'JUBLFOOD',
   'KAPAS',
   'KOTAKBANK',
   'L&TFH',
   'LALPATHLAB',
   'LAURUSLABS',
   'LEAD',
   'LEADMINI',
   'LICHSGFIN',
   'LT',
   'LTIM',
   'LTTS',
   'LUPIN',
   'M&M',
   'M&MFIN',
   'MANAPPURAM',
   'MARICO',
   'MARUTI',
   'MCDOWELL-N',
   'MCX',
   'MENTHAOIL',
   'METROPOLIS',
   'MFSL',
   'MGL',
   'MOTHERSON',
   'MPHASIS',
   'MRF',
   'MUTHOOTFIN',
   'NATIONALUM',
   'NAUKRI',
   'NAVINFLUOR',
   'NESTLEIND',
   'NICKEL',
   'NIFTY',
   'NMDC',
   'NTPC',
   'OBEROIRLTY',
   'OFSS',
   'ONGC',
   'ONMIBOR',
   'PAGEIND',
   'PEL',
   'PERSISTENT',
   'PETRONET',
   'PFC',
   'PIDILITIND',
   'PIIND',
   'PNB',
   'POLYCAB',
   'POWERGRID',
   'PVRINOX',
   'RAMCOCEM',
   'RBLBANK',
   'RECLTD',
   'RELIANCE',
   'SAIL',
   'SBICARD',
   'SBILIFE',
   'SBIN',
   'SENSEX50',
   'SHREECEM',
   'SHRIRAMFIN',
   'SIEMENS',
   'SILVERM',
   'SILVERMIC',
   'SRF',
   'SUNPHARMA',
   'SUNTV',
   'SYNGENE',
   'TATACHEM',
   'TATACOMM',
   'TATACONSUM',
   'TATAMOTORS',
   'TATAPOWER',
   'TATASTEEL',
   'TCS',
   'TECHM',
   'TITAN',
   'TORNTPHARM',
   'TRENT',
   'TVSMOTOR',
   'UBL',
   'ULTRACEMCO',
   'UPL',
   'VEDL',
   'VOLTAS',
   'WIPRO',
   'ZEEL',
   'ZINC',
   'ZINCMINI',
   'ZYDUSLIFE'],
  'options': ['654GS2032',
   '667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'AARTIIND',
   'ABB',
   'ABBOTINDIA',
   'ABCAPITAL',
   'ABFRL',
   'ACC',
   'ADANIENT',
   'ADANIPORTS',
   'ALKEM',
   'AMBUJACEM',
   'APOLLOHOSP',
   'APOLLOTYRE',
   'ASHOKLEY',
   'ASIANPAINT',
   'ASTRAL',
   'ATUL',
   'AUBANK',
   'AUROPHARMA',
   'AXISBANK',
   'BAJAJ-AUTO',
   'BAJAJFINSV',
   'BAJFINANCE',
   'BALKRISIND',
   'BALRAMCHIN',
   'BANDHANBNK',
   'BANKBARODA',
   'BANKNIFTY',
   'BATAINDIA',
   'BEL',
   'BERGEPAINT',
   'BHARATFORG',
   'BHARTIARTL',
   'BHEL',
   'BIOCON',
   'BOSCHLTD',
   'BPCL',
   'BRITANNIA',
   'BSOFT',
   'CANBK',
   'CANFINHOME',
   'CHAMBLFERT',
   'CHOLAFIN',
   'CIPLA',
   'COALINDIA',
   'COFORGE',
   'COLPAL',
   'CONCOR',
   'COROMANDEL',
   'CROMPTON',
   'CUB',
   'CUMMINSIND',
   'DABUR',
   'DALBHARAT',
   'DEEPAKNTR',
   'DELTACORP',
   'DIVISLAB',
   'DIXON',
   'DLF',
   'DRREDDY',
   'EICHERMOT',
   'ESCORTS',
   'EXIDEIND',
   'FEDERALBNK',
   'GAIL',
   'GLENMARK',
   'GMRINFRA',
   'GNFC',
   'GODREJCP',
   'GODREJPROP',
   'GRANULES',
   'GRASIM',
   'GUJGASLTD',
   'HAL',
   'HAVELLS',
   'HCLTECH',
   'HDFCAMC',
   'HDFCBANK',
   'HDFCLIFE',
   'HEROMOTOCO',
   'HINDALCO',
   'HINDCOPPER',
   'HINDPETRO',
   'HINDUNILVR',
   'IBULHSGFIN',
   'ICICIBANK',
   'ICICIGI',
   'ICICIPRULI',
   'IDEA',
   'IDFC',
   'IDFCFIRSTB',
   'IEX',
   'IGL',
   'INDHOTEL',
   'INDIACEM',
   'INDIAMART',
   'INDIGO',
   'INDUSINDBK',
   'INDUSTOWER',
   'INFY',
   'IOC',
   'IPCALAB',
   'IRCTC',
   'ITC',
   'JINDALSTEL',
   'JKCEMENT',
   'JSWSTEEL',
   'JUBLFOOD',
   'KOTAKBANK',
   'L&TFH',
   'LALPATHLAB',
   'LAURUSLABS',
   'LICHSGFIN',
   'LT',
   'LTIM',
   'LTTS',
   'LUPIN',
   'M&M',
   'M&MFIN',
   'MANAPPURAM',
   'MARICO',
   'MARUTI',
   'MCDOWELL-N',
   'MCX',
   'METROPOLIS',
   'MFSL',
   'MGL',
   'MOTHERSON',
   'MPHASIS',
   'MRF',
   'MUTHOOTFIN',
   'NATIONALUM',
   'NAUKRI',
   'NAVINFLUOR',
   'NESTLEIND',
   'NIFTY',
   'NMDC',
   'NTPC',
   'OBEROIRLTY',
   'OFSS',
   'ONGC',
   'PAGEIND',
   'PEL',
   'PERSISTENT',
   'PETRONET',
   'PFC',
   'PIDILITIND',
   'PIIND',
   'PNB',
   'POLYCAB',
   'POWERGRID',
   'PVRINOX',
   'RAMCOCEM',
   'RBLBANK',
   'RECLTD',
   'RELIANCE',
   'SAIL',
   'SBICARD',
   'SBILIFE',
   'SBIN',
   'SENSEX50',
   'SHREECEM',
   'SHRIRAMFIN',
   'SIEMENS',
   'SRF',
   'SUNPHARMA',
   'SUNTV',
   'SYNGENE',
   'TATACHEM',
   'TATACOMM',
   'TATACONSUM',
   'TATAMOTORS',
   'TATAPOWER',
   'TATASTEEL',
   'TCS',
   'TECHM',
   'TITAN',
   'TORNTPHARM',
   'TRENT',
   'TVSMOTOR',
   'UBL',
   'ULTRACEMCO',
   'UPL',
   'VEDL',
   'VOLTAS',
   'WIPRO',
   'ZEEL',
   'ZYDUSLIFE']},
 '2023-12-01': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2023-12-04': {'fut': ['BANKEX'], 'options': ['BANKEX', 'MIDCPNIFTY']},
 '2023-12-05': {'fut': ['GOLD', 'GOLDM', 'SILVER'], 'options': ['FINNIFTY']},
 '2023-12-07': {'fut': ['SENSEX50'], 'options': ['SENSEX50']},
 '2023-12-08': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2023-12-11': {'fut': ['BANKEX'], 'options': ['BANKEX']},
 '2023-12-14': {'fut': ['SENSEX50'], 'options': ['CRUDEOIL', 'SENSEX50']},
 '2023-12-15': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2023-12-18': {'fut': ['CRUDEOIL', 'CRUDEOILM'], 'options': []},
 '2023-12-19': {'fut': ['MCXMETLDEX'], 'options': ['COPPER', 'ZINC']},
 '2023-12-21': {'fut': [], 'options': ['NATURALGAS']},
 '2023-12-22': {'fut': ['BANKEX',
   'EURINR',
   'GBPINR',
   'JPYINR',
   'MCXBULLDEX',
   'MIDCPNIFTY',
   'USDINR'],
  'options': ['BANKEX', 'EURINR', 'GBPINR', 'JPYINR', 'MIDCPNIFTY', 'USDINR']},
 '2023-12-26': {'fut': ['FINNIFTY', 'NATGASMINI', 'NATURALGAS'],
  'options': ['FINNIFTY']},
 '2023-12-27': {'fut': ['91DTB', 'EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'GOLDM', 'JPYINR', 'USDINR']},
 '2023-12-28': {'fut': ['654GS2032',
   '664GS2035',
   '667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'AARTIIND',
   'ABB',
   'ABBOTINDIA',
   'ABCAPITAL',
   'ABFRL',
   'ACC',
   'ADANIENT',
   'ADANIPORTS',
   'ALKEM',
   'AMBUJACEM',
   'APOLLOHOSP',
   'APOLLOTYRE',
   'ASHOKLEY',
   'ASIANPAINT',
   'ASTRAL',
   'ATUL',
   'AUBANK',
   'AUROPHARMA',
   'AXISBANK',
   'BAJAJ-AUTO',
   'BAJAJFINSV',
   'BAJFINANCE',
   'BALKRISIND',
   'BALRAMCHIN',
   'BANDHANBNK',
   'BANKBARODA',
   'BANKNIFTY',
   'BATAINDIA',
   'BEL',
   'BERGEPAINT',
   'BHARATFORG',
   'BHARTIARTL',
   'BHEL',
   'BIOCON',
   'BOSCHLTD',
   'BPCL',
   'BRITANNIA',
   'BSOFT',
   'CANBK',
   'CANFINHOME',
   'CHAMBLFERT',
   'CHOLAFIN',
   'CIPLA',
   'COALINDIA',
   'COFORGE',
   'COLPAL',
   'CONCOR',
   'COROMANDEL',
   'CROMPTON',
   'CUB',
   'CUMMINSIND',
   'DABUR',
   'DALBHARAT',
   'DEEPAKNTR',
   'DELTACORP',
   'DIVISLAB',
   'DIXON',
   'DLF',
   'DRREDDY',
   'EICHERMOT',
   'ESCORTS',
   'EXIDEIND',
   'FEDERALBNK',
   'GAIL',
   'GLENMARK',
   'GMRINFRA',
   'GNFC',
   'GODREJCP',
   'GODREJPROP',
   'GRANULES',
   'GRASIM',
   'GUJGASLTD',
   'HAL',
   'HAVELLS',
   'HCLTECH',
   'HDFCAMC',
   'HDFCBANK',
   'HDFCLIFE',
   'HEROMOTOCO',
   'HINDALCO',
   'HINDCOPPER',
   'HINDPETRO',
   'HINDUNILVR',
   'IBULHSGFIN',
   'ICICIBANK',
   'ICICIGI',
   'ICICIPRULI',
   'IDEA',
   'IDFC',
   'IDFCFIRSTB',
   'IEX',
   'IGL',
   'INDHOTEL',
   'INDIACEM',
   'INDIAMART',
   'INDIGO',
   'INDUSINDBK',
   'INDUSTOWER',
   'INFY',
   'IOC',
   'IPCALAB',
   'IRCTC',
   'ITC',
   'JINDALSTEL',
   'JKCEMENT',
   'JSWSTEEL',
   'JUBLFOOD',
   'KOTAKBANK',
   'L&TFH',
   'LALPATHLAB',
   'LAURUSLABS',
   'LICHSGFIN',
   'LT',
   'LTIM',
   'LTTS',
   'LUPIN',
   'M&M',
   'M&MFIN',
   'MANAPPURAM',
   'MARICO',
   'MARUTI',
   'MCDOWELL-N',
   'MCX',
   'METROPOLIS',
   'MFSL',
   'MGL',
   'MOTHERSON',
   'MPHASIS',
   'MRF',
   'MUTHOOTFIN',
   'NATIONALUM',
   'NAUKRI',
   'NAVINFLUOR',
   'NESTLEIND',
   'NIFTY',
   'NMDC',
   'NTPC',
   'OBEROIRLTY',
   'OFSS',
   'ONGC',
   'PAGEIND',
   'PEL',
   'PERSISTENT',
   'PETRONET',
   'PFC',
   'PIDILITIND',
   'PIIND',
   'PNB',
   'POLYCAB',
   'POWERGRID',
   'PVRINOX',
   'RAMCOCEM',
   'RBLBANK',
   'RECLTD',
   'RELIANCE',
   'SAIL',
   'SBICARD',
   'SBILIFE',
   'SBIN',
   'SENSEX50',
   'SHREECEM',
   'SHRIRAMFIN',
   'SIEMENS',
   'SRF',
   'SUNPHARMA',
   'SUNTV',
   'SYNGENE',
   'TATACHEM',
   'TATACOMM',
   'TATACONSUM',
   'TATAMOTORS',
   'TATAPOWER',
   'TATASTEEL',
   'TCS',
   'TECHM',
   'TITAN',
   'TORNTPHARM',
   'TRENT',
   'TVSMOTOR',
   'UBL',
   'ULTRACEMCO',
   'UPL',
   'VEDL',
   'VOLTAS',
   'WIPRO',
   'ZEEL',
   'ZYDUSLIFE'],
  'options': ['654GS2032',
   '667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'AARTIIND',
   'ABB',
   'ABBOTINDIA',
   'ABCAPITAL',
   'ABFRL',
   'ACC',
   'ADANIENT',
   'ADANIPORTS',
   'ALKEM',
   'AMBUJACEM',
   'APOLLOHOSP',
   'APOLLOTYRE',
   'ASHOKLEY',
   'ASIANPAINT',
   'ASTRAL',
   'ATUL',
   'AUBANK',
   'AUROPHARMA',
   'AXISBANK',
   'BAJAJ-AUTO',
   'BAJAJFINSV',
   'BAJFINANCE',
   'BALKRISIND',
   'BALRAMCHIN',
   'BANDHANBNK',
   'BANKBARODA',
   'BANKNIFTY',
   'BATAINDIA',
   'BEL',
   'BERGEPAINT',
   'BHARATFORG',
   'BHARTIARTL',
   'BHEL',
   'BIOCON',
   'BOSCHLTD',
   'BPCL',
   'BRITANNIA',
   'BSOFT',
   'CANBK',
   'CANFINHOME',
   'CHAMBLFERT',
   'CHOLAFIN',
   'CIPLA',
   'COALINDIA',
   'COFORGE',
   'COLPAL',
   'CONCOR',
   'COROMANDEL',
   'CROMPTON',
   'CUB',
   'CUMMINSIND',
   'DABUR',
   'DALBHARAT',
   'DEEPAKNTR',
   'DELTACORP',
   'DIVISLAB',
   'DIXON',
   'DLF',
   'DRREDDY',
   'EICHERMOT',
   'ESCORTS',
   'EXIDEIND',
   'FEDERALBNK',
   'GAIL',
   'GLENMARK',
   'GMRINFRA',
   'GNFC',
   'GODREJCP',
   'GODREJPROP',
   'GRANULES',
   'GRASIM',
   'GUJGASLTD',
   'HAL',
   'HAVELLS',
   'HCLTECH',
   'HDFCAMC',
   'HDFCBANK',
   'HDFCLIFE',
   'HEROMOTOCO',
   'HINDALCO',
   'HINDCOPPER',
   'HINDPETRO',
   'HINDUNILVR',
   'IBULHSGFIN',
   'ICICIBANK',
   'ICICIGI',
   'ICICIPRULI',
   'IDEA',
   'IDFC',
   'IDFCFIRSTB',
   'IEX',
   'IGL',
   'INDHOTEL',
   'INDIACEM',
   'INDIAMART',
   'INDIGO',
   'INDUSINDBK',
   'INDUSTOWER',
   'INFY',
   'IOC',
   'IPCALAB',
   'IRCTC',
   'ITC',
   'JINDALSTEL',
   'JKCEMENT',
   'JSWSTEEL',
   'JUBLFOOD',
   'KOTAKBANK',
   'L&TFH',
   'LALPATHLAB',
   'LAURUSLABS',
   'LICHSGFIN',
   'LT',
   'LTIM',
   'LTTS',
   'LUPIN',
   'M&M',
   'M&MFIN',
   'MANAPPURAM',
   'MARICO',
   'MARUTI',
   'MCDOWELL-N',
   'MCX',
   'METROPOLIS',
   'MFSL',
   'MGL',
   'MOTHERSON',
   'MPHASIS',
   'MRF',
   'MUTHOOTFIN',
   'NATIONALUM',
   'NAUKRI',
   'NAVINFLUOR',
   'NESTLEIND',
   'NIFTY',
   'NMDC',
   'NTPC',
   'OBEROIRLTY',
   'OFSS',
   'ONGC',
   'PAGEIND',
   'PEL',
   'PERSISTENT',
   'PETRONET',
   'PFC',
   'PIDILITIND',
   'PIIND',
   'PNB',
   'POLYCAB',
   'POWERGRID',
   'PVRINOX',
   'RAMCOCEM',
   'RBLBANK',
   'RECLTD',
   'RELIANCE',
   'SAIL',
   'SBICARD',
   'SBILIFE',
   'SBIN',
   'SENSEX50',
   'SHREECEM',
   'SHRIRAMFIN',
   'SIEMENS',
   'SRF',
   'SUNPHARMA',
   'SUNTV',
   'SYNGENE',
   'TATACHEM',
   'TATACOMM',
   'TATACONSUM',
   'TATAMOTORS',
   'TATAPOWER',
   'TATASTEEL',
   'TCS',
   'TECHM',
   'TITAN',
   'TORNTPHARM',
   'TRENT',
   'TVSMOTOR',
   'UBL',
   'ULTRACEMCO',
   'UPL',
   'VEDL',
   'VOLTAS',
   'WIPRO',
   'ZEEL',
   'ZYDUSLIFE']},
 '2023-12-29': {'fut': ['ALUMINI',
   'ALUMINIUM',
   'COPPER',
   'EURINR',
   'GBPINR',
   'GOLDGUINEA',
   'GOLDPETAL',
   'JPYINR',
   'LEAD',
   'LEADMINI',
   'MENTHAOIL',
   'NICKEL',
   'ONMIBOR',
   'SENSEX',
   'USDINR',
   'ZINC',
   'ZINCMINI'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
 '2024-01-05': {'fut': ['EURINR', 'GBPINR', 'GOLDM', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
 '2024-01-12': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
 '2024-01-17': {'fut': [], 'options': ['CRUDEOIL']},
 '2024-01-19': {'fut': ['CRUDEOIL', 'CRUDEOILM', 'MCXMETLDEX'],
  'options': ['COPPER', 'ZINC']},
 '2024-01-23': {'fut': [], 'options': ['NATURALGAS']},
 '2024-01-24': {'fut': ['MCXBULLDEX'], 'options': ['GOLD']},
 '2024-01-25': {'fut': ['664GS2035',
   '667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'AARTIIND',
   'ABB',
   'ABBOTINDIA',
   'ABCAPITAL',
   'ABFRL',
   'ACC',
   'ADANIENT',
   'ADANIPORTS',
   'ALKEM',
   'AMBUJACEM',
   'APOLLOHOSP',
   'APOLLOTYRE',
   'ASHOKLEY',
   'ASIANPAINT',
   'ASTRAL',
   'ATUL',
   'AUBANK',
   'AUROPHARMA',
   'AXISBANK',
   'BAJAJ-AUTO',
   'BAJAJFINSV',
   'BAJFINANCE',
   'BALKRISIND',
   'BALRAMCHIN',
   'BANDHANBNK',
   'BANKBARODA',
   'BANKNIFTY',
   'BATAINDIA',
   'BEL',
   'BERGEPAINT',
   'BHARATFORG',
   'BHARTIARTL',
   'BHEL',
   'BIOCON',
   'BOSCHLTD',
   'BPCL',
   'BRITANNIA',
   'BSOFT',
   'CANBK',
   'CANFINHOME',
   'CHAMBLFERT',
   'CHOLAFIN',
   'CIPLA',
   'COALINDIA',
   'COFORGE',
   'COLPAL',
   'CONCOR',
   'COROMANDEL',
   'CROMPTON',
   'CUB',
   'CUMMINSIND',
   'DABUR',
   'DALBHARAT',
   'DEEPAKNTR',
   'DELTACORP',
   'DIVISLAB',
   'DIXON',
   'DLF',
   'DRREDDY',
   'EICHERMOT',
   'ESCORTS',
   'EXIDEIND',
   'FEDERALBNK',
   'GAIL',
   'GLENMARK',
   'GMRINFRA',
   'GNFC',
   'GODREJCP',
   'GODREJPROP',
   'GRANULES',
   'GRASIM',
   'GUJGASLTD',
   'HAL',
   'HAVELLS',
   'HCLTECH',
   'HDFCAMC',
   'HDFCBANK',
   'HDFCLIFE',
   'HEROMOTOCO',
   'HINDALCO',
   'HINDCOPPER',
   'HINDPETRO',
   'HINDUNILVR',
   'ICICIBANK',
   'ICICIGI',
   'ICICIPRULI',
   'IDEA',
   'IDFC',
   'IDFCFIRSTB',
   'IEX',
   'IGL',
   'INDHOTEL',
   'INDIACEM',
   'INDIAMART',
   'INDIGO',
   'INDUSINDBK',
   'INDUSTOWER',
   'INFY',
   'IOC',
   'IPCALAB',
   'IRCTC',
   'ITC',
   'JINDALSTEL',
   'JKCEMENT',
   'JSWSTEEL',
   'JUBLFOOD',
   'KOTAKBANK',
   'L&TFH',
   'LALPATHLAB',
   'LAURUSLABS',
   'LICHSGFIN',
   'LT',
   'LTIM',
   'LTTS',
   'LUPIN',
   'M&M',
   'M&MFIN',
   'MANAPPURAM',
   'MARICO',
   'MARUTI',
   'MCDOWELL-N',
   'MCX',
   'METROPOLIS',
   'MFSL',
   'MGL',
   'MOTHERSON',
   'MPHASIS',
   'MRF',
   'MUTHOOTFIN',
   'NATGASMINI',
   'NATIONALUM',
   'NATURALGAS',
   'NAUKRI',
   'NAVINFLUOR',
   'NESTLEIND',
   'NIFTY',
   'NMDC',
   'NTPC',
   'OBEROIRLTY',
   'OFSS',
   'ONGC',
   'PAGEIND',
   'PEL',
   'PERSISTENT',
   'PETRONET',
   'PFC',
   'PIDILITIND',
   'PIIND',
   'PNB',
   'POLYCAB',
   'POWERGRID',
   'PVRINOX',
   'RAMCOCEM',
   'RBLBANK',
   'RECLTD',
   'RELIANCE',
   'SAIL',
   'SBICARD',
   'SBILIFE',
   'SBIN',
   'SENSEX',
   'SENSEX50',
   'SHREECEM',
   'SHRIRAMFIN',
   'SIEMENS',
   'SRF',
   'SUNPHARMA',
   'SUNTV',
   'SYNGENE',
   'TATACHEM',
   'TATACOMM',
   'TATACONSUM',
   'TATAMOTORS',
   'TATAPOWER',
   'TATASTEEL',
   'TCS',
   'TECHM',
   'TITAN',
   'TORNTPHARM',
   'TRENT',
   'TVSMOTOR',
   'UBL',
   'ULTRACEMCO',
   'UPL',
   'VEDL',
   'VOLTAS',
   'WIPRO',
   'ZEEL',
   'ZYDUSLIFE'],
  'options': ['667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'AARTIIND',
   'ABB',
   'ABBOTINDIA',
   'ABCAPITAL',
   'ABFRL',
   'ACC',
   'ADANIENT',
   'ADANIPORTS',
   'ALKEM',
   'AMBUJACEM',
   'APOLLOHOSP',
   'APOLLOTYRE',
   'ASHOKLEY',
   'ASIANPAINT',
   'ASTRAL',
   'ATUL',
   'AUBANK',
   'AUROPHARMA',
   'AXISBANK',
   'BAJAJ-AUTO',
   'BAJAJFINSV',
   'BAJFINANCE',
   'BALKRISIND',
   'BALRAMCHIN',
   'BANDHANBNK',
   'BANKBARODA',
   'BANKNIFTY',
   'BATAINDIA',
   'BEL',
   'BERGEPAINT',
   'BHARATFORG',
   'BHARTIARTL',
   'BHEL',
   'BIOCON',
   'BOSCHLTD',
   'BPCL',
   'BRITANNIA',
   'BSOFT',
   'CANBK',
   'CANFINHOME',
   'CHAMBLFERT',
   'CHOLAFIN',
   'CIPLA',
   'COALINDIA',
   'COFORGE',
   'COLPAL',
   'CONCOR',
   'COROMANDEL',
   'CROMPTON',
   'CUB',
   'CUMMINSIND',
   'DABUR',
   'DALBHARAT',
   'DEEPAKNTR',
   'DELTACORP',
   'DIVISLAB',
   'DIXON',
   'DLF',
   'DRREDDY',
   'EICHERMOT',
   'ESCORTS',
   'EXIDEIND',
   'FEDERALBNK',
   'GAIL',
   'GLENMARK',
   'GMRINFRA',
   'GNFC',
   'GODREJCP',
   'GODREJPROP',
   'GRANULES',
   'GRASIM',
   'GUJGASLTD',
   'HAL',
   'HAVELLS',
   'HCLTECH',
   'HDFCAMC',
   'HDFCBANK',
   'HDFCLIFE',
   'HEROMOTOCO',
   'HINDALCO',
   'HINDCOPPER',
   'HINDPETRO',
   'HINDUNILVR',
   'ICICIBANK',
   'ICICIGI',
   'ICICIPRULI',
   'IDEA',
   'IDFC',
   'IDFCFIRSTB',
   'IEX',
   'IGL',
   'INDHOTEL',
   'INDIACEM',
   'INDIAMART',
   'INDIGO',
   'INDUSINDBK',
   'INDUSTOWER',
   'INFY',
   'IOC',
   'IPCALAB',
   'IRCTC',
   'ITC',
   'JINDALSTEL',
   'JKCEMENT',
   'JSWSTEEL',
   'JUBLFOOD',
   'KOTAKBANK',
   'L&TFH',
   'LALPATHLAB',
   'LAURUSLABS',
   'LICHSGFIN',
   'LT',
   'LTIM',
   'LTTS',
   'LUPIN',
   'M&M',
   'M&MFIN',
   'MANAPPURAM',
   'MARICO',
   'MARUTI',
   'MCDOWELL-N',
   'MCX',
   'METROPOLIS',
   'MFSL',
   'MGL',
   'MOTHERSON',
   'MPHASIS',
   'MRF',
   'MUTHOOTFIN',
   'NATIONALUM',
   'NAUKRI',
   'NAVINFLUOR',
   'NESTLEIND',
   'NIFTY',
   'NMDC',
   'NTPC',
   'OBEROIRLTY',
   'OFSS',
   'ONGC',
   'PAGEIND',
   'PEL',
   'PERSISTENT',
   'PETRONET',
   'PFC',
   'PIDILITIND',
   'PIIND',
   'PNB',
   'POLYCAB',
   'POWERGRID',
   'PVRINOX',
   'RAMCOCEM',
   'RBLBANK',
   'RECLTD',
   'RELIANCE',
   'SAIL',
   'SBICARD',
   'SBILIFE',
   'SBIN',
   'SENSEX',
   'SENSEX50',
   'SHREECEM',
   'SHRIRAMFIN',
   'SIEMENS',
   'SRF',
   'SUNPHARMA',
   'SUNTV',
   'SYNGENE',
   'TATACHEM',
   'TATACOMM',
   'TATACONSUM',
   'TATAMOTORS',
   'TATAPOWER',
   'TATASTEEL',
   'TCS',
   'TECHM',
   'TITAN',
   'TORNTPHARM',
   'TRENT',
   'TVSMOTOR',
   'UBL',
   'ULTRACEMCO',
   'UPL',
   'VEDL',
   'VOLTAS',
   'WIPRO',
   'ZEEL',
   'ZYDUSLIFE']},
 '2024-01-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
 '2024-01-31': {'fut': ['91DTB',
   'ALUMINI',
   'ALUMINIUM',
   'COPPER',
   'COTTONCNDY',
   'GOLDGUINEA',
   'GOLDPETAL',
   'LEAD',
   'LEADMINI',
   'MENTHAOIL',
   'NICKEL',
   'ZINC',
   'ZINCMINI'],
  'options': []},
 '2024-02-05': {'fut': ['GOLD'], 'options': []},
 '2024-02-16': {'fut': ['CRUDEOIL', 'CRUDEOILM'], 'options': []},
 '2024-02-20': {'fut': [], 'options': ['SILVERM']},
 '2024-02-23': {'fut': [], 'options': ['SILVER']},
 '2024-02-27': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': []},
 '2024-02-29': {'fut': ['ALUMINI',
   'ALUMINIUM',
   'COPPER',
   'KAPAS',
   'LEAD',
   'LEADMINI',
   'MENTHAOIL',
   'NICKEL',
   'SILVERM',
   'SILVERMIC',
   'ZINC',
   'ZINCMINI'],
  'options': []},
 '2024-03-05': {'fut': ['SILVER'], 'options': []},
 '2024-03-26': {'fut': [], 'options': ['GOLD']},
 '2024-03-27': {'fut': ['91DTB', 'EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
 '2024-03-28': {'fut': ['664GS2035',
   '667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036'],
  'options': ['667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'BANKNIFTY',
   'NIFTY']},
 '2024-03-29': {'fut': ['ONMIBOR'], 'options': ['SENSEX']},
 '2024-04-05': {'fut': ['GOLD'], 'options': []},
 '2024-04-19': {'fut': [], 'options': ['SILVERM']},
 '2024-04-24': {'fut': [], 'options': ['SILVER']},
 '2024-04-26': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': []},
 '2024-04-30': {'fut': ['KAPAS', 'SILVERM'], 'options': []},
 '2024-05-03': {'fut': ['SILVER'], 'options': []},
 '2024-05-27': {'fut': [], 'options': ['GOLD']},
 '2024-05-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': []},
 '2024-06-05': {'fut': ['GOLD'], 'options': []},
 '2024-06-19': {'fut': [], 'options': ['SILVERM']},
 '2024-06-26': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': ['EURINR', 'GBPINR', 'JPYINR', 'SILVER', 'USDINR']},
 '2024-06-27': {'fut': ['667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036'],
  'options': ['667GS2035',
   '718GS2033',
   '726GS2032',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'BANKNIFTY',
   'NIFTY']},
 '2024-06-28': {'fut': ['ONMIBOR', 'SILVERM'], 'options': ['SENSEX']},
 '2024-07-05': {'fut': ['SILVER'], 'options': []},
 '2024-07-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': []},
 '2024-08-28': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': []},
 '2024-09-26': {'fut': ['667GS2035',
   '718GS2033',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'EURINR',
   'GBPINR',
   'JPYINR',
   'USDINR'],
  'options': ['667GS2035',
   '718GS2033',
   '726GS2033',
   '741GS2036',
   '754GS2036',
   'BANKNIFTY',
   'EURINR',
   'GBPINR',
   'JPYINR',
   'NIFTY',
   'USDINR']},
 '2024-09-27': {'fut': [], 'options': ['SENSEX']},
 '2024-09-30': {'fut': ['ONMIBOR'], 'options': []},
 '2024-10-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
  'options': []},
 '2024-12-26': {'fut': [], 'options': ['NIFTY']},
 '2024-12-27': {'fut': [], 'options': ['SENSEX']},
 '2025-06-26': {'fut': [], 'options': ['NIFTY']},
 '2025-06-27': {'fut': [], 'options': ['SENSEX']},
 '2025-12-24': {'fut': [], 'options': ['NIFTY']},
 '2025-12-26': {'fut': [], 'options': ['SENSEX']},
 '2026-06-25': {'fut': [], 'options': ['NIFTY']},
 '2026-06-26': {'fut': [], 'options': ['SENSEX']},
 '2026-12-25': {'fut': [], 'options': ['SENSEX']},
 '2026-12-31': {'fut': [], 'options': ['NIFTY']},
 '2027-06-24': {'fut': [], 'options': ['NIFTY']},
 '2027-06-25': {'fut': [], 'options': ['SENSEX']},
 '2027-12-30': {'fut': [], 'options': ['NIFTY']},
 '2027-12-31': {'fut': [], 'options': ['SENSEX']},
 '2028-06-29': {'fut': [], 'options': ['NIFTY']},
 '2028-06-30': {'fut': [], 'options': ['SENSEX']}}
				
			

The result is a JSON object where each expiry date is a key, and the associated value is a dictionary containing the futures and options expiring on that date. This format is useful for understanding the market scenario on specific expiry dates and planning trades accordingly.

Combined Expiry List

Both variations offer unique insights into the expiry data, catering to different analysis needs. By having a stock-wise view, one can focus on the expiry timeline of individual instruments. Conversely, a date-wise view provides a broader picture of the market on particular expiry dates, which can be critical for making informed trading decisions.

  • The create_combined_expiry_list function is an integration function that amalgamates the data generated by the create_expiry_list and create_expiry_list2 functions into a unified JSON object. 
  • Initially, it invokes both functions to get the stock-wise and date-wise expiry data in JSON format. Following that, it combines these JSON data into a single JSON object under the keys “stockwise” and “datewise”.
				
					def create_combined_expiry_list(df):
    # Getting the JSON data from both functions
    stockwise_json = json.loads(create_expiry_list(df))
    datewise_json = json.loads(create_expiry_list2(df))
    
    # Combining the JSON data
    combined_json = {
        "stockwise": stockwise_json,
        "datewise": datewise_json
    }
    
    # File path
    file_path = 'expiry.json'
    
    # Reading existing JSON data if file exists
    if os.path.exists(file_path):
        with open(file_path, 'r') as file:
            existing_json = json.load(file)
        
        # Merging the JSON data
        for leg in combined_json:
            if leg in existing_json:
                existing_json[leg].update(combined_json[leg])
            else:
                existing_json[leg] = combined_json[leg]
    else:
        existing_json = combined_json
    
    # Saving the merged JSON data
    with open(file_path, 'w') as file:
        json.dump(existing_json, file, indent=4)

    return json.dumps(existing_json, indent=4)


json.loads(create_combined_expiry_list(instrumentList))
				
			

Output – 

				
					{'stockwise': {'fut': {'EURINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-02-27',
    '2024-03-27',
    '2024-04-26',
    '2024-05-29',
    '2024-06-26',
    '2024-07-29',
    '2024-08-28',
    '2024-09-26',
    '2024-10-29'],
   'GBPINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-02-27',
    '2024-03-27',
    '2024-04-26',
    '2024-05-29',
    '2024-06-26',
    '2024-07-29',
    '2024-08-28',
    '2024-09-26',
    '2024-10-29'],
   'JPYINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-02-27',
    '2024-03-27',
    '2024-04-26',
    '2024-05-29',
    '2024-06-26',
    '2024-07-29',
    '2024-08-28',
    '2024-09-26',
    '2024-10-29'],
   'USDINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-02-27',
    '2024-03-27',
    '2024-04-26',
    '2024-05-29',
    '2024-06-26',
    '2024-07-29',
    '2024-08-28',
    '2024-09-26',
    '2024-10-29'],
   'BANKEX': ['2023-10-30',
    '2023-11-06',
    '2023-11-13',
    '2023-11-20',
    '2023-11-24',
    '2023-12-04',
    '2023-12-11',
    '2023-12-22'],
   'SENSEX': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-29',
    '2024-01-25'],
   'SENSEX50': ['2023-11-02',
    '2023-11-09',
    '2023-11-16',
    '2023-11-23',
    '2023-11-30',
    '2023-12-07',
    '2023-12-14',
    '2023-12-28',
    '2024-01-25'],
   '654GS2032': ['2023-11-30', '2023-12-28'],
   '664GS2035': ['2023-11-30', '2023-12-28', '2024-01-25', '2024-03-28'],
   '667GS2035': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '718GS2033': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '726GS2032': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27'],
   '726GS2033': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '741GS2036': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '754GS2036': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '91DTB': ['2023-11-29', '2023-12-27', '2024-01-31', '2024-03-27'],
   'ONMIBOR': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-03-29',
    '2024-06-28',
    '2024-09-30'],
   'ALUMINI': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'ALUMINIUM': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'COPPER': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'COTTONCNDY': ['2023-11-30', '2024-01-31'],
   'CRUDEOIL': ['2023-11-17', '2023-12-18', '2024-01-19', '2024-02-16'],
   'CRUDEOILM': ['2023-11-17', '2023-12-18', '2024-01-19', '2024-02-16'],
   'GOLD': ['2023-12-05', '2024-02-05', '2024-04-05', '2024-06-05'],
   'GOLDGUINEA': ['2023-10-31', '2023-11-30', '2023-12-29', '2024-01-31'],
   'GOLDM': ['2023-11-03', '2023-12-05', '2024-01-05'],
   'GOLDPETAL': ['2023-10-31', '2023-11-30', '2023-12-29', '2024-01-31'],
   'KAPAS': ['2023-11-30', '2024-02-29', '2024-04-30'],
   'LEAD': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'LEADMINI': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'MCXBULLDEX': ['2023-11-24', '2023-12-22', '2024-01-24'],
   'MCXMETLDEX': ['2023-11-21', '2023-12-19', '2024-01-19'],
   'MENTHAOIL': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'NATGASMINI': ['2023-11-27', '2023-12-26', '2024-01-25'],
   'NATURALGAS': ['2023-11-27', '2023-12-26', '2024-01-25'],
   'NICKEL': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'SILVER': ['2023-12-05', '2024-03-05', '2024-05-03', '2024-07-05'],
   'SILVERM': ['2023-11-30', '2024-02-29', '2024-04-30', '2024-06-28'],
   'SILVERMIC': ['2023-11-30', '2024-02-29'],
   'ZINC': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'ZINCMINI': ['2023-10-31',
    '2023-11-30',
    '2023-12-29',
    '2024-01-31',
    '2024-02-29'],
   'NIFTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BANKNIFTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AARTIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABBOTINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABCAPITAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABFRL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ACC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ADANIENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ADANIPORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ALKEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AMBUJACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'APOLLOHOSP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'APOLLOTYRE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ASHOKLEY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ASIANPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ASTRAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ATUL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AUBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AUROPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AXISBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BAJAJ-AUTO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BAJAJFINSV': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BAJFINANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BALKRISIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BALRAMCHIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BANDHANBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BANKBARODA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BATAINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BERGEPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BHARATFORG': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BHARTIARTL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BHEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BIOCON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BOSCHLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BPCL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BRITANNIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BSOFT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CANBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CANFINHOME': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CHAMBLFERT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CHOLAFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CIPLA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COALINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COFORGE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COLPAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CONCOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COROMANDEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CROMPTON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CUB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CUMMINSIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DABUR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DALBHARAT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DEEPAKNTR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DELTACORP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DIVISLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DIXON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DLF': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DRREDDY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'EICHERMOT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ESCORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'EXIDEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'FEDERALBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'FINNIFTY': ['2023-10-31', '2023-11-28', '2023-12-26'],
   'GAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GLENMARK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GMRINFRA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GNFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GODREJCP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GODREJPROP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GRANULES': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GRASIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GUJGASLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HAVELLS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HCLTECH': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HDFCAMC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HDFCBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HDFCLIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HEROMOTOCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDALCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDCOPPER': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDPETRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDUNILVR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IBULHSGFIN': ['2023-11-30', '2023-12-28'],
   'ICICIBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ICICIGI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ICICIPRULI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IDEA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IDFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IDFCFIRSTB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IEX': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDHOTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDIACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDIAMART': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDIGO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDUSINDBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDUSTOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INFY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IOC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IPCALAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IRCTC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ITC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JINDALSTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JKCEMENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JSWSTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JUBLFOOD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'KOTAKBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'L&TFH': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LALPATHLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LAURUSLABS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LICHSGFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LTIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LTTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LUPIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'M&M': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'M&MFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MANAPPURAM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MARICO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MARUTI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MCDOWELL-N': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MCX': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'METROPOLIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MFSL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MIDCPNIFTY': ['2023-10-30', '2023-11-24', '2023-12-22'],
   'MOTHERSON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MPHASIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MUTHOOTFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NATIONALUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NAUKRI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NAVINFLUOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NESTLEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NMDC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NTPC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'OBEROIRLTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'OFSS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ONGC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PAGEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PERSISTENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PETRONET': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PIDILITIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PNB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'POLYCAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'POWERGRID': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PVRINOX': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RAMCOCEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RBLBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RECLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RELIANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SBICARD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SBILIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SBIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SHREECEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SHRIRAMFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SIEMENS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SUNPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SUNTV': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SYNGENE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATACHEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATACOMM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATACONSUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATAMOTORS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATAPOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATASTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TCS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TECHM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TITAN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TORNTPHARM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TRENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TVSMOTOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'UBL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ULTRACEMCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'UPL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'VEDL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'VOLTAS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'WIPRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ZEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ZYDUSLIFE': ['2023-11-30', '2023-12-28', '2024-01-25']},
  'options': {'EURINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-03-27',
    '2024-06-26',
    '2024-09-26'],
   'GBPINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-03-27',
    '2024-06-26',
    '2024-09-26'],
   'JPYINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-03-27',
    '2024-06-26',
    '2024-09-26'],
   'USDINR': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-11-28',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-22',
    '2023-12-27',
    '2023-12-29',
    '2024-01-05',
    '2024-01-12',
    '2024-01-29',
    '2024-03-27',
    '2024-06-26',
    '2024-09-26'],
   'BANKEX': ['2023-10-30',
    '2023-11-06',
    '2023-11-13',
    '2023-11-20',
    '2023-11-24',
    '2023-12-04',
    '2023-12-11',
    '2023-12-22'],
   'SENSEX': ['2023-11-03',
    '2023-11-10',
    '2023-11-17',
    '2023-11-24',
    '2023-12-01',
    '2023-12-08',
    '2023-12-15',
    '2023-12-29',
    '2024-01-25',
    '2024-03-29',
    '2024-06-28',
    '2024-09-27',
    '2024-12-27',
    '2025-06-27',
    '2025-12-26',
    '2026-06-26',
    '2026-12-25',
    '2027-06-25',
    '2027-12-31',
    '2028-06-30'],
   'SENSEX50': ['2023-11-02',
    '2023-11-09',
    '2023-11-16',
    '2023-11-23',
    '2023-11-30',
    '2023-12-07',
    '2023-12-14',
    '2023-12-28',
    '2024-01-25'],
   '654GS2032': ['2023-11-30', '2023-12-28'],
   '667GS2035': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '718GS2033': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '726GS2032': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27'],
   '726GS2033': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '741GS2036': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   '754GS2036': ['2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   'COPPER': ['2023-11-21', '2023-12-19', '2024-01-19'],
   'CRUDEOIL': ['2023-11-15', '2023-12-14', '2024-01-17'],
   'GOLD': ['2023-11-24', '2024-01-24', '2024-03-26', '2024-05-27'],
   'GOLDM': ['2023-11-24', '2023-12-27'],
   'NATURALGAS': ['2023-11-23', '2023-12-21', '2024-01-23'],
   'SILVER': ['2023-11-24', '2024-02-23', '2024-04-24', '2024-06-26'],
   'SILVERM': ['2023-11-21', '2024-02-20', '2024-04-19', '2024-06-19'],
   'ZINC': ['2023-11-21', '2023-12-19', '2024-01-19'],
   'NIFTY': ['2023-11-02',
    '2023-11-09',
    '2023-11-16',
    '2023-11-23',
    '2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26',
    '2024-12-26',
    '2025-06-26',
    '2025-12-24',
    '2026-06-25',
    '2026-12-31',
    '2027-06-24',
    '2027-12-30',
    '2028-06-29'],
   'BANKNIFTY': ['2023-11-01',
    '2023-11-08',
    '2023-11-15',
    '2023-11-22',
    '2023-11-30',
    '2023-12-28',
    '2024-01-25',
    '2024-03-28',
    '2024-06-27',
    '2024-09-26'],
   'AARTIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABBOTINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABCAPITAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ABFRL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ACC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ADANIENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ADANIPORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ALKEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AMBUJACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'APOLLOHOSP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'APOLLOTYRE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ASHOKLEY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ASIANPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ASTRAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ATUL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AUBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AUROPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'AXISBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BAJAJ-AUTO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BAJAJFINSV': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BAJFINANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BALKRISIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BALRAMCHIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BANDHANBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BANKBARODA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BATAINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BERGEPAINT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BHARATFORG': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BHARTIARTL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BHEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BIOCON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BOSCHLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BPCL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BRITANNIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'BSOFT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CANBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CANFINHOME': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CHAMBLFERT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CHOLAFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CIPLA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COALINDIA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COFORGE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COLPAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CONCOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'COROMANDEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CROMPTON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CUB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'CUMMINSIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DABUR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DALBHARAT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DEEPAKNTR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DELTACORP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DIVISLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DIXON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DLF': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'DRREDDY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'EICHERMOT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ESCORTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'EXIDEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'FEDERALBNK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'FINNIFTY': ['2023-10-31',
    '2023-11-07',
    '2023-11-13',
    '2023-11-21',
    '2023-11-28',
    '2023-12-05',
    '2023-12-26'],
   'GAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GLENMARK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GMRINFRA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GNFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GODREJCP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GODREJPROP': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GRANULES': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GRASIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'GUJGASLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HAL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HAVELLS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HCLTECH': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HDFCAMC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HDFCBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HDFCLIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HEROMOTOCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDALCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDCOPPER': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDPETRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'HINDUNILVR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IBULHSGFIN': ['2023-11-30', '2023-12-28'],
   'ICICIBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ICICIGI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ICICIPRULI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IDEA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IDFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IDFCFIRSTB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IEX': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDHOTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDIACEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDIAMART': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDIGO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDUSINDBK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INDUSTOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'INFY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IOC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IPCALAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'IRCTC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ITC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JINDALSTEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JKCEMENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JSWSTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'JUBLFOOD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'KOTAKBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'L&TFH': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LALPATHLAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LAURUSLABS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LICHSGFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LTIM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LTTS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'LUPIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'M&M': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'M&MFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MANAPPURAM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MARICO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MARUTI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MCDOWELL-N': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MCX': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'METROPOLIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MFSL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MGL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MIDCPNIFTY': ['2023-10-30',
    '2023-11-06',
    '2023-11-13',
    '2023-11-20',
    '2023-11-24',
    '2023-12-04',
    '2023-12-22'],
   'MOTHERSON': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MPHASIS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'MUTHOOTFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NATIONALUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NAUKRI': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NAVINFLUOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NESTLEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NMDC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'NTPC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'OBEROIRLTY': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'OFSS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ONGC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PAGEIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PERSISTENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PETRONET': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PFC': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PIDILITIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PIIND': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PNB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'POLYCAB': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'POWERGRID': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'PVRINOX': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RAMCOCEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RBLBANK': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RECLTD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'RELIANCE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SAIL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SBICARD': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SBILIFE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SBIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SHREECEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SHRIRAMFIN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SIEMENS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SRF': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SUNPHARMA': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SUNTV': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'SYNGENE': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATACHEM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATACOMM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATACONSUM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATAMOTORS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATAPOWER': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TATASTEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TCS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TECHM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TITAN': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TORNTPHARM': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TRENT': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'TVSMOTOR': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'UBL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ULTRACEMCO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'UPL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'VEDL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'VOLTAS': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'WIPRO': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ZEEL': ['2023-11-30', '2023-12-28', '2024-01-25'],
   'ZYDUSLIFE': ['2023-11-30', '2023-12-28', '2024-01-25']}},
 'datewise': {'2023-10-30': {'fut': ['BANKEX', 'MIDCPNIFTY'],
   'options': ['BANKEX', 'MIDCPNIFTY']},
  '2023-10-31': {'fut': ['ALUMINI',
    'ALUMINIUM',
    'COPPER',
    'FINNIFTY',
    'GOLDGUINEA',
    'GOLDPETAL',
    'LEAD',
    'LEADMINI',
    'MENTHAOIL',
    'NICKEL',
    'ONMIBOR',
    'ZINC',
    'ZINCMINI'],
   'options': ['FINNIFTY']},
  '2023-11-01': {'fut': [], 'options': ['BANKNIFTY']},
  '2023-11-02': {'fut': ['SENSEX50'], 'options': ['NIFTY', 'SENSEX50']},
  '2023-11-03': {'fut': ['EURINR',
    'GBPINR',
    'GOLDM',
    'JPYINR',
    'SENSEX',
    'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2023-11-06': {'fut': ['BANKEX'], 'options': ['BANKEX', 'MIDCPNIFTY']},
  '2023-11-07': {'fut': [], 'options': ['FINNIFTY']},
  '2023-11-08': {'fut': [], 'options': ['BANKNIFTY']},
  '2023-11-09': {'fut': ['SENSEX50'], 'options': ['NIFTY', 'SENSEX50']},
  '2023-11-10': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2023-11-13': {'fut': ['BANKEX'],
   'options': ['BANKEX', 'FINNIFTY', 'MIDCPNIFTY']},
  '2023-11-15': {'fut': [], 'options': ['BANKNIFTY', 'CRUDEOIL']},
  '2023-11-16': {'fut': ['SENSEX50'], 'options': ['NIFTY', 'SENSEX50']},
  '2023-11-17': {'fut': ['CRUDEOIL',
    'CRUDEOILM',
    'EURINR',
    'GBPINR',
    'JPYINR',
    'SENSEX',
    'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2023-11-20': {'fut': ['BANKEX'], 'options': ['BANKEX', 'MIDCPNIFTY']},
  '2023-11-21': {'fut': ['MCXMETLDEX'],
   'options': ['COPPER', 'FINNIFTY', 'SILVERM', 'ZINC']},
  '2023-11-22': {'fut': [], 'options': ['BANKNIFTY']},
  '2023-11-23': {'fut': ['SENSEX50'],
   'options': ['NATURALGAS', 'NIFTY', 'SENSEX50']},
  '2023-11-24': {'fut': ['BANKEX',
    'EURINR',
    'GBPINR',
    'JPYINR',
    'MCXBULLDEX',
    'MIDCPNIFTY',
    'SENSEX',
    'USDINR'],
   'options': ['BANKEX',
    'EURINR',
    'GBPINR',
    'GOLD',
    'GOLDM',
    'JPYINR',
    'MIDCPNIFTY',
    'SENSEX',
    'SILVER',
    'USDINR']},
  '2023-11-27': {'fut': ['NATGASMINI', 'NATURALGAS'], 'options': []},
  '2023-11-28': {'fut': ['EURINR', 'FINNIFTY', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'FINNIFTY', 'GBPINR', 'JPYINR', 'USDINR']},
  '2023-11-29': {'fut': ['91DTB'], 'options': []},
  '2023-11-30': {'fut': ['654GS2032',
    '664GS2035',
    '667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'AARTIIND',
    'ABB',
    'ABBOTINDIA',
    'ABCAPITAL',
    'ABFRL',
    'ACC',
    'ADANIENT',
    'ADANIPORTS',
    'ALKEM',
    'ALUMINI',
    'ALUMINIUM',
    'AMBUJACEM',
    'APOLLOHOSP',
    'APOLLOTYRE',
    'ASHOKLEY',
    'ASIANPAINT',
    'ASTRAL',
    'ATUL',
    'AUBANK',
    'AUROPHARMA',
    'AXISBANK',
    'BAJAJ-AUTO',
    'BAJAJFINSV',
    'BAJFINANCE',
    'BALKRISIND',
    'BALRAMCHIN',
    'BANDHANBNK',
    'BANKBARODA',
    'BANKNIFTY',
    'BATAINDIA',
    'BEL',
    'BERGEPAINT',
    'BHARATFORG',
    'BHARTIARTL',
    'BHEL',
    'BIOCON',
    'BOSCHLTD',
    'BPCL',
    'BRITANNIA',
    'BSOFT',
    'CANBK',
    'CANFINHOME',
    'CHAMBLFERT',
    'CHOLAFIN',
    'CIPLA',
    'COALINDIA',
    'COFORGE',
    'COLPAL',
    'CONCOR',
    'COPPER',
    'COROMANDEL',
    'COTTONCNDY',
    'CROMPTON',
    'CUB',
    'CUMMINSIND',
    'DABUR',
    'DALBHARAT',
    'DEEPAKNTR',
    'DELTACORP',
    'DIVISLAB',
    'DIXON',
    'DLF',
    'DRREDDY',
    'EICHERMOT',
    'ESCORTS',
    'EXIDEIND',
    'FEDERALBNK',
    'GAIL',
    'GLENMARK',
    'GMRINFRA',
    'GNFC',
    'GODREJCP',
    'GODREJPROP',
    'GOLDGUINEA',
    'GOLDPETAL',
    'GRANULES',
    'GRASIM',
    'GUJGASLTD',
    'HAL',
    'HAVELLS',
    'HCLTECH',
    'HDFCAMC',
    'HDFCBANK',
    'HDFCLIFE',
    'HEROMOTOCO',
    'HINDALCO',
    'HINDCOPPER',
    'HINDPETRO',
    'HINDUNILVR',
    'IBULHSGFIN',
    'ICICIBANK',
    'ICICIGI',
    'ICICIPRULI',
    'IDEA',
    'IDFC',
    'IDFCFIRSTB',
    'IEX',
    'IGL',
    'INDHOTEL',
    'INDIACEM',
    'INDIAMART',
    'INDIGO',
    'INDUSINDBK',
    'INDUSTOWER',
    'INFY',
    'IOC',
    'IPCALAB',
    'IRCTC',
    'ITC',
    'JINDALSTEL',
    'JKCEMENT',
    'JSWSTEEL',
    'JUBLFOOD',
    'KAPAS',
    'KOTAKBANK',
    'L&TFH',
    'LALPATHLAB',
    'LAURUSLABS',
    'LEAD',
    'LEADMINI',
    'LICHSGFIN',
    'LT',
    'LTIM',
    'LTTS',
    'LUPIN',
    'M&M',
    'M&MFIN',
    'MANAPPURAM',
    'MARICO',
    'MARUTI',
    'MCDOWELL-N',
    'MCX',
    'MENTHAOIL',
    'METROPOLIS',
    'MFSL',
    'MGL',
    'MOTHERSON',
    'MPHASIS',
    'MRF',
    'MUTHOOTFIN',
    'NATIONALUM',
    'NAUKRI',
    'NAVINFLUOR',
    'NESTLEIND',
    'NICKEL',
    'NIFTY',
    'NMDC',
    'NTPC',
    'OBEROIRLTY',
    'OFSS',
    'ONGC',
    'ONMIBOR',
    'PAGEIND',
    'PEL',
    'PERSISTENT',
    'PETRONET',
    'PFC',
    'PIDILITIND',
    'PIIND',
    'PNB',
    'POLYCAB',
    'POWERGRID',
    'PVRINOX',
    'RAMCOCEM',
    'RBLBANK',
    'RECLTD',
    'RELIANCE',
    'SAIL',
    'SBICARD',
    'SBILIFE',
    'SBIN',
    'SENSEX50',
    'SHREECEM',
    'SHRIRAMFIN',
    'SIEMENS',
    'SILVERM',
    'SILVERMIC',
    'SRF',
    'SUNPHARMA',
    'SUNTV',
    'SYNGENE',
    'TATACHEM',
    'TATACOMM',
    'TATACONSUM',
    'TATAMOTORS',
    'TATAPOWER',
    'TATASTEEL',
    'TCS',
    'TECHM',
    'TITAN',
    'TORNTPHARM',
    'TRENT',
    'TVSMOTOR',
    'UBL',
    'ULTRACEMCO',
    'UPL',
    'VEDL',
    'VOLTAS',
    'WIPRO',
    'ZEEL',
    'ZINC',
    'ZINCMINI',
    'ZYDUSLIFE'],
   'options': ['654GS2032',
    '667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'AARTIIND',
    'ABB',
    'ABBOTINDIA',
    'ABCAPITAL',
    'ABFRL',
    'ACC',
    'ADANIENT',
    'ADANIPORTS',
    'ALKEM',
    'AMBUJACEM',
    'APOLLOHOSP',
    'APOLLOTYRE',
    'ASHOKLEY',
    'ASIANPAINT',
    'ASTRAL',
    'ATUL',
    'AUBANK',
    'AUROPHARMA',
    'AXISBANK',
    'BAJAJ-AUTO',
    'BAJAJFINSV',
    'BAJFINANCE',
    'BALKRISIND',
    'BALRAMCHIN',
    'BANDHANBNK',
    'BANKBARODA',
    'BANKNIFTY',
    'BATAINDIA',
    'BEL',
    'BERGEPAINT',
    'BHARATFORG',
    'BHARTIARTL',
    'BHEL',
    'BIOCON',
    'BOSCHLTD',
    'BPCL',
    'BRITANNIA',
    'BSOFT',
    'CANBK',
    'CANFINHOME',
    'CHAMBLFERT',
    'CHOLAFIN',
    'CIPLA',
    'COALINDIA',
    'COFORGE',
    'COLPAL',
    'CONCOR',
    'COROMANDEL',
    'CROMPTON',
    'CUB',
    'CUMMINSIND',
    'DABUR',
    'DALBHARAT',
    'DEEPAKNTR',
    'DELTACORP',
    'DIVISLAB',
    'DIXON',
    'DLF',
    'DRREDDY',
    'EICHERMOT',
    'ESCORTS',
    'EXIDEIND',
    'FEDERALBNK',
    'GAIL',
    'GLENMARK',
    'GMRINFRA',
    'GNFC',
    'GODREJCP',
    'GODREJPROP',
    'GRANULES',
    'GRASIM',
    'GUJGASLTD',
    'HAL',
    'HAVELLS',
    'HCLTECH',
    'HDFCAMC',
    'HDFCBANK',
    'HDFCLIFE',
    'HEROMOTOCO',
    'HINDALCO',
    'HINDCOPPER',
    'HINDPETRO',
    'HINDUNILVR',
    'IBULHSGFIN',
    'ICICIBANK',
    'ICICIGI',
    'ICICIPRULI',
    'IDEA',
    'IDFC',
    'IDFCFIRSTB',
    'IEX',
    'IGL',
    'INDHOTEL',
    'INDIACEM',
    'INDIAMART',
    'INDIGO',
    'INDUSINDBK',
    'INDUSTOWER',
    'INFY',
    'IOC',
    'IPCALAB',
    'IRCTC',
    'ITC',
    'JINDALSTEL',
    'JKCEMENT',
    'JSWSTEEL',
    'JUBLFOOD',
    'KOTAKBANK',
    'L&TFH',
    'LALPATHLAB',
    'LAURUSLABS',
    'LICHSGFIN',
    'LT',
    'LTIM',
    'LTTS',
    'LUPIN',
    'M&M',
    'M&MFIN',
    'MANAPPURAM',
    'MARICO',
    'MARUTI',
    'MCDOWELL-N',
    'MCX',
    'METROPOLIS',
    'MFSL',
    'MGL',
    'MOTHERSON',
    'MPHASIS',
    'MRF',
    'MUTHOOTFIN',
    'NATIONALUM',
    'NAUKRI',
    'NAVINFLUOR',
    'NESTLEIND',
    'NIFTY',
    'NMDC',
    'NTPC',
    'OBEROIRLTY',
    'OFSS',
    'ONGC',
    'PAGEIND',
    'PEL',
    'PERSISTENT',
    'PETRONET',
    'PFC',
    'PIDILITIND',
    'PIIND',
    'PNB',
    'POLYCAB',
    'POWERGRID',
    'PVRINOX',
    'RAMCOCEM',
    'RBLBANK',
    'RECLTD',
    'RELIANCE',
    'SAIL',
    'SBICARD',
    'SBILIFE',
    'SBIN',
    'SENSEX50',
    'SHREECEM',
    'SHRIRAMFIN',
    'SIEMENS',
    'SRF',
    'SUNPHARMA',
    'SUNTV',
    'SYNGENE',
    'TATACHEM',
    'TATACOMM',
    'TATACONSUM',
    'TATAMOTORS',
    'TATAPOWER',
    'TATASTEEL',
    'TCS',
    'TECHM',
    'TITAN',
    'TORNTPHARM',
    'TRENT',
    'TVSMOTOR',
    'UBL',
    'ULTRACEMCO',
    'UPL',
    'VEDL',
    'VOLTAS',
    'WIPRO',
    'ZEEL',
    'ZYDUSLIFE']},
  '2023-12-01': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2023-12-04': {'fut': ['BANKEX'], 'options': ['BANKEX', 'MIDCPNIFTY']},
  '2023-12-05': {'fut': ['GOLD', 'GOLDM', 'SILVER'], 'options': ['FINNIFTY']},
  '2023-12-07': {'fut': ['SENSEX50'], 'options': ['SENSEX50']},
  '2023-12-08': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2023-12-11': {'fut': ['BANKEX'], 'options': ['BANKEX']},
  '2023-12-14': {'fut': ['SENSEX50'], 'options': ['CRUDEOIL', 'SENSEX50']},
  '2023-12-15': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2023-12-18': {'fut': ['CRUDEOIL', 'CRUDEOILM'], 'options': []},
  '2023-12-19': {'fut': ['MCXMETLDEX'], 'options': ['COPPER', 'ZINC']},
  '2023-12-21': {'fut': [], 'options': ['NATURALGAS']},
  '2023-12-22': {'fut': ['BANKEX',
    'EURINR',
    'GBPINR',
    'JPYINR',
    'MCXBULLDEX',
    'MIDCPNIFTY',
    'USDINR'],
   'options': ['BANKEX',
    'EURINR',
    'GBPINR',
    'JPYINR',
    'MIDCPNIFTY',
    'USDINR']},
  '2023-12-26': {'fut': ['FINNIFTY', 'NATGASMINI', 'NATURALGAS'],
   'options': ['FINNIFTY']},
  '2023-12-27': {'fut': ['91DTB', 'EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'GOLDM', 'JPYINR', 'USDINR']},
  '2023-12-28': {'fut': ['654GS2032',
    '664GS2035',
    '667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'AARTIIND',
    'ABB',
    'ABBOTINDIA',
    'ABCAPITAL',
    'ABFRL',
    'ACC',
    'ADANIENT',
    'ADANIPORTS',
    'ALKEM',
    'AMBUJACEM',
    'APOLLOHOSP',
    'APOLLOTYRE',
    'ASHOKLEY',
    'ASIANPAINT',
    'ASTRAL',
    'ATUL',
    'AUBANK',
    'AUROPHARMA',
    'AXISBANK',
    'BAJAJ-AUTO',
    'BAJAJFINSV',
    'BAJFINANCE',
    'BALKRISIND',
    'BALRAMCHIN',
    'BANDHANBNK',
    'BANKBARODA',
    'BANKNIFTY',
    'BATAINDIA',
    'BEL',
    'BERGEPAINT',
    'BHARATFORG',
    'BHARTIARTL',
    'BHEL',
    'BIOCON',
    'BOSCHLTD',
    'BPCL',
    'BRITANNIA',
    'BSOFT',
    'CANBK',
    'CANFINHOME',
    'CHAMBLFERT',
    'CHOLAFIN',
    'CIPLA',
    'COALINDIA',
    'COFORGE',
    'COLPAL',
    'CONCOR',
    'COROMANDEL',
    'CROMPTON',
    'CUB',
    'CUMMINSIND',
    'DABUR',
    'DALBHARAT',
    'DEEPAKNTR',
    'DELTACORP',
    'DIVISLAB',
    'DIXON',
    'DLF',
    'DRREDDY',
    'EICHERMOT',
    'ESCORTS',
    'EXIDEIND',
    'FEDERALBNK',
    'GAIL',
    'GLENMARK',
    'GMRINFRA',
    'GNFC',
    'GODREJCP',
    'GODREJPROP',
    'GRANULES',
    'GRASIM',
    'GUJGASLTD',
    'HAL',
    'HAVELLS',
    'HCLTECH',
    'HDFCAMC',
    'HDFCBANK',
    'HDFCLIFE',
    'HEROMOTOCO',
    'HINDALCO',
    'HINDCOPPER',
    'HINDPETRO',
    'HINDUNILVR',
    'IBULHSGFIN',
    'ICICIBANK',
    'ICICIGI',
    'ICICIPRULI',
    'IDEA',
    'IDFC',
    'IDFCFIRSTB',
    'IEX',
    'IGL',
    'INDHOTEL',
    'INDIACEM',
    'INDIAMART',
    'INDIGO',
    'INDUSINDBK',
    'INDUSTOWER',
    'INFY',
    'IOC',
    'IPCALAB',
    'IRCTC',
    'ITC',
    'JINDALSTEL',
    'JKCEMENT',
    'JSWSTEEL',
    'JUBLFOOD',
    'KOTAKBANK',
    'L&TFH',
    'LALPATHLAB',
    'LAURUSLABS',
    'LICHSGFIN',
    'LT',
    'LTIM',
    'LTTS',
    'LUPIN',
    'M&M',
    'M&MFIN',
    'MANAPPURAM',
    'MARICO',
    'MARUTI',
    'MCDOWELL-N',
    'MCX',
    'METROPOLIS',
    'MFSL',
    'MGL',
    'MOTHERSON',
    'MPHASIS',
    'MRF',
    'MUTHOOTFIN',
    'NATIONALUM',
    'NAUKRI',
    'NAVINFLUOR',
    'NESTLEIND',
    'NIFTY',
    'NMDC',
    'NTPC',
    'OBEROIRLTY',
    'OFSS',
    'ONGC',
    'PAGEIND',
    'PEL',
    'PERSISTENT',
    'PETRONET',
    'PFC',
    'PIDILITIND',
    'PIIND',
    'PNB',
    'POLYCAB',
    'POWERGRID',
    'PVRINOX',
    'RAMCOCEM',
    'RBLBANK',
    'RECLTD',
    'RELIANCE',
    'SAIL',
    'SBICARD',
    'SBILIFE',
    'SBIN',
    'SENSEX50',
    'SHREECEM',
    'SHRIRAMFIN',
    'SIEMENS',
    'SRF',
    'SUNPHARMA',
    'SUNTV',
    'SYNGENE',
    'TATACHEM',
    'TATACOMM',
    'TATACONSUM',
    'TATAMOTORS',
    'TATAPOWER',
    'TATASTEEL',
    'TCS',
    'TECHM',
    'TITAN',
    'TORNTPHARM',
    'TRENT',
    'TVSMOTOR',
    'UBL',
    'ULTRACEMCO',
    'UPL',
    'VEDL',
    'VOLTAS',
    'WIPRO',
    'ZEEL',
    'ZYDUSLIFE'],
   'options': ['654GS2032',
    '667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'AARTIIND',
    'ABB',
    'ABBOTINDIA',
    'ABCAPITAL',
    'ABFRL',
    'ACC',
    'ADANIENT',
    'ADANIPORTS',
    'ALKEM',
    'AMBUJACEM',
    'APOLLOHOSP',
    'APOLLOTYRE',
    'ASHOKLEY',
    'ASIANPAINT',
    'ASTRAL',
    'ATUL',
    'AUBANK',
    'AUROPHARMA',
    'AXISBANK',
    'BAJAJ-AUTO',
    'BAJAJFINSV',
    'BAJFINANCE',
    'BALKRISIND',
    'BALRAMCHIN',
    'BANDHANBNK',
    'BANKBARODA',
    'BANKNIFTY',
    'BATAINDIA',
    'BEL',
    'BERGEPAINT',
    'BHARATFORG',
    'BHARTIARTL',
    'BHEL',
    'BIOCON',
    'BOSCHLTD',
    'BPCL',
    'BRITANNIA',
    'BSOFT',
    'CANBK',
    'CANFINHOME',
    'CHAMBLFERT',
    'CHOLAFIN',
    'CIPLA',
    'COALINDIA',
    'COFORGE',
    'COLPAL',
    'CONCOR',
    'COROMANDEL',
    'CROMPTON',
    'CUB',
    'CUMMINSIND',
    'DABUR',
    'DALBHARAT',
    'DEEPAKNTR',
    'DELTACORP',
    'DIVISLAB',
    'DIXON',
    'DLF',
    'DRREDDY',
    'EICHERMOT',
    'ESCORTS',
    'EXIDEIND',
    'FEDERALBNK',
    'GAIL',
    'GLENMARK',
    'GMRINFRA',
    'GNFC',
    'GODREJCP',
    'GODREJPROP',
    'GRANULES',
    'GRASIM',
    'GUJGASLTD',
    'HAL',
    'HAVELLS',
    'HCLTECH',
    'HDFCAMC',
    'HDFCBANK',
    'HDFCLIFE',
    'HEROMOTOCO',
    'HINDALCO',
    'HINDCOPPER',
    'HINDPETRO',
    'HINDUNILVR',
    'IBULHSGFIN',
    'ICICIBANK',
    'ICICIGI',
    'ICICIPRULI',
    'IDEA',
    'IDFC',
    'IDFCFIRSTB',
    'IEX',
    'IGL',
    'INDHOTEL',
    'INDIACEM',
    'INDIAMART',
    'INDIGO',
    'INDUSINDBK',
    'INDUSTOWER',
    'INFY',
    'IOC',
    'IPCALAB',
    'IRCTC',
    'ITC',
    'JINDALSTEL',
    'JKCEMENT',
    'JSWSTEEL',
    'JUBLFOOD',
    'KOTAKBANK',
    'L&TFH',
    'LALPATHLAB',
    'LAURUSLABS',
    'LICHSGFIN',
    'LT',
    'LTIM',
    'LTTS',
    'LUPIN',
    'M&M',
    'M&MFIN',
    'MANAPPURAM',
    'MARICO',
    'MARUTI',
    'MCDOWELL-N',
    'MCX',
    'METROPOLIS',
    'MFSL',
    'MGL',
    'MOTHERSON',
    'MPHASIS',
    'MRF',
    'MUTHOOTFIN',
    'NATIONALUM',
    'NAUKRI',
    'NAVINFLUOR',
    'NESTLEIND',
    'NIFTY',
    'NMDC',
    'NTPC',
    'OBEROIRLTY',
    'OFSS',
    'ONGC',
    'PAGEIND',
    'PEL',
    'PERSISTENT',
    'PETRONET',
    'PFC',
    'PIDILITIND',
    'PIIND',
    'PNB',
    'POLYCAB',
    'POWERGRID',
    'PVRINOX',
    'RAMCOCEM',
    'RBLBANK',
    'RECLTD',
    'RELIANCE',
    'SAIL',
    'SBICARD',
    'SBILIFE',
    'SBIN',
    'SENSEX50',
    'SHREECEM',
    'SHRIRAMFIN',
    'SIEMENS',
    'SRF',
    'SUNPHARMA',
    'SUNTV',
    'SYNGENE',
    'TATACHEM',
    'TATACOMM',
    'TATACONSUM',
    'TATAMOTORS',
    'TATAPOWER',
    'TATASTEEL',
    'TCS',
    'TECHM',
    'TITAN',
    'TORNTPHARM',
    'TRENT',
    'TVSMOTOR',
    'UBL',
    'ULTRACEMCO',
    'UPL',
    'VEDL',
    'VOLTAS',
    'WIPRO',
    'ZEEL',
    'ZYDUSLIFE']},
  '2023-12-29': {'fut': ['ALUMINI',
    'ALUMINIUM',
    'COPPER',
    'EURINR',
    'GBPINR',
    'GOLDGUINEA',
    'GOLDPETAL',
    'JPYINR',
    'LEAD',
    'LEADMINI',
    'MENTHAOIL',
    'NICKEL',
    'ONMIBOR',
    'SENSEX',
    'USDINR',
    'ZINC',
    'ZINCMINI'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SENSEX', 'USDINR']},
  '2024-01-05': {'fut': ['EURINR', 'GBPINR', 'GOLDM', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
  '2024-01-12': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
  '2024-01-17': {'fut': [], 'options': ['CRUDEOIL']},
  '2024-01-19': {'fut': ['CRUDEOIL', 'CRUDEOILM', 'MCXMETLDEX'],
   'options': ['COPPER', 'ZINC']},
  '2024-01-23': {'fut': [], 'options': ['NATURALGAS']},
  '2024-01-24': {'fut': ['MCXBULLDEX'], 'options': ['GOLD']},
  '2024-01-25': {'fut': ['664GS2035',
    '667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'AARTIIND',
    'ABB',
    'ABBOTINDIA',
    'ABCAPITAL',
    'ABFRL',
    'ACC',
    'ADANIENT',
    'ADANIPORTS',
    'ALKEM',
    'AMBUJACEM',
    'APOLLOHOSP',
    'APOLLOTYRE',
    'ASHOKLEY',
    'ASIANPAINT',
    'ASTRAL',
    'ATUL',
    'AUBANK',
    'AUROPHARMA',
    'AXISBANK',
    'BAJAJ-AUTO',
    'BAJAJFINSV',
    'BAJFINANCE',
    'BALKRISIND',
    'BALRAMCHIN',
    'BANDHANBNK',
    'BANKBARODA',
    'BANKNIFTY',
    'BATAINDIA',
    'BEL',
    'BERGEPAINT',
    'BHARATFORG',
    'BHARTIARTL',
    'BHEL',
    'BIOCON',
    'BOSCHLTD',
    'BPCL',
    'BRITANNIA',
    'BSOFT',
    'CANBK',
    'CANFINHOME',
    'CHAMBLFERT',
    'CHOLAFIN',
    'CIPLA',
    'COALINDIA',
    'COFORGE',
    'COLPAL',
    'CONCOR',
    'COROMANDEL',
    'CROMPTON',
    'CUB',
    'CUMMINSIND',
    'DABUR',
    'DALBHARAT',
    'DEEPAKNTR',
    'DELTACORP',
    'DIVISLAB',
    'DIXON',
    'DLF',
    'DRREDDY',
    'EICHERMOT',
    'ESCORTS',
    'EXIDEIND',
    'FEDERALBNK',
    'GAIL',
    'GLENMARK',
    'GMRINFRA',
    'GNFC',
    'GODREJCP',
    'GODREJPROP',
    'GRANULES',
    'GRASIM',
    'GUJGASLTD',
    'HAL',
    'HAVELLS',
    'HCLTECH',
    'HDFCAMC',
    'HDFCBANK',
    'HDFCLIFE',
    'HEROMOTOCO',
    'HINDALCO',
    'HINDCOPPER',
    'HINDPETRO',
    'HINDUNILVR',
    'ICICIBANK',
    'ICICIGI',
    'ICICIPRULI',
    'IDEA',
    'IDFC',
    'IDFCFIRSTB',
    'IEX',
    'IGL',
    'INDHOTEL',
    'INDIACEM',
    'INDIAMART',
    'INDIGO',
    'INDUSINDBK',
    'INDUSTOWER',
    'INFY',
    'IOC',
    'IPCALAB',
    'IRCTC',
    'ITC',
    'JINDALSTEL',
    'JKCEMENT',
    'JSWSTEEL',
    'JUBLFOOD',
    'KOTAKBANK',
    'L&TFH',
    'LALPATHLAB',
    'LAURUSLABS',
    'LICHSGFIN',
    'LT',
    'LTIM',
    'LTTS',
    'LUPIN',
    'M&M',
    'M&MFIN',
    'MANAPPURAM',
    'MARICO',
    'MARUTI',
    'MCDOWELL-N',
    'MCX',
    'METROPOLIS',
    'MFSL',
    'MGL',
    'MOTHERSON',
    'MPHASIS',
    'MRF',
    'MUTHOOTFIN',
    'NATGASMINI',
    'NATIONALUM',
    'NATURALGAS',
    'NAUKRI',
    'NAVINFLUOR',
    'NESTLEIND',
    'NIFTY',
    'NMDC',
    'NTPC',
    'OBEROIRLTY',
    'OFSS',
    'ONGC',
    'PAGEIND',
    'PEL',
    'PERSISTENT',
    'PETRONET',
    'PFC',
    'PIDILITIND',
    'PIIND',
    'PNB',
    'POLYCAB',
    'POWERGRID',
    'PVRINOX',
    'RAMCOCEM',
    'RBLBANK',
    'RECLTD',
    'RELIANCE',
    'SAIL',
    'SBICARD',
    'SBILIFE',
    'SBIN',
    'SENSEX',
    'SENSEX50',
    'SHREECEM',
    'SHRIRAMFIN',
    'SIEMENS',
    'SRF',
    'SUNPHARMA',
    'SUNTV',
    'SYNGENE',
    'TATACHEM',
    'TATACOMM',
    'TATACONSUM',
    'TATAMOTORS',
    'TATAPOWER',
    'TATASTEEL',
    'TCS',
    'TECHM',
    'TITAN',
    'TORNTPHARM',
    'TRENT',
    'TVSMOTOR',
    'UBL',
    'ULTRACEMCO',
    'UPL',
    'VEDL',
    'VOLTAS',
    'WIPRO',
    'ZEEL',
    'ZYDUSLIFE'],
   'options': ['667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'AARTIIND',
    'ABB',
    'ABBOTINDIA',
    'ABCAPITAL',
    'ABFRL',
    'ACC',
    'ADANIENT',
    'ADANIPORTS',
    'ALKEM',
    'AMBUJACEM',
    'APOLLOHOSP',
    'APOLLOTYRE',
    'ASHOKLEY',
    'ASIANPAINT',
    'ASTRAL',
    'ATUL',
    'AUBANK',
    'AUROPHARMA',
    'AXISBANK',
    'BAJAJ-AUTO',
    'BAJAJFINSV',
    'BAJFINANCE',
    'BALKRISIND',
    'BALRAMCHIN',
    'BANDHANBNK',
    'BANKBARODA',
    'BANKNIFTY',
    'BATAINDIA',
    'BEL',
    'BERGEPAINT',
    'BHARATFORG',
    'BHARTIARTL',
    'BHEL',
    'BIOCON',
    'BOSCHLTD',
    'BPCL',
    'BRITANNIA',
    'BSOFT',
    'CANBK',
    'CANFINHOME',
    'CHAMBLFERT',
    'CHOLAFIN',
    'CIPLA',
    'COALINDIA',
    'COFORGE',
    'COLPAL',
    'CONCOR',
    'COROMANDEL',
    'CROMPTON',
    'CUB',
    'CUMMINSIND',
    'DABUR',
    'DALBHARAT',
    'DEEPAKNTR',
    'DELTACORP',
    'DIVISLAB',
    'DIXON',
    'DLF',
    'DRREDDY',
    'EICHERMOT',
    'ESCORTS',
    'EXIDEIND',
    'FEDERALBNK',
    'GAIL',
    'GLENMARK',
    'GMRINFRA',
    'GNFC',
    'GODREJCP',
    'GODREJPROP',
    'GRANULES',
    'GRASIM',
    'GUJGASLTD',
    'HAL',
    'HAVELLS',
    'HCLTECH',
    'HDFCAMC',
    'HDFCBANK',
    'HDFCLIFE',
    'HEROMOTOCO',
    'HINDALCO',
    'HINDCOPPER',
    'HINDPETRO',
    'HINDUNILVR',
    'ICICIBANK',
    'ICICIGI',
    'ICICIPRULI',
    'IDEA',
    'IDFC',
    'IDFCFIRSTB',
    'IEX',
    'IGL',
    'INDHOTEL',
    'INDIACEM',
    'INDIAMART',
    'INDIGO',
    'INDUSINDBK',
    'INDUSTOWER',
    'INFY',
    'IOC',
    'IPCALAB',
    'IRCTC',
    'ITC',
    'JINDALSTEL',
    'JKCEMENT',
    'JSWSTEEL',
    'JUBLFOOD',
    'KOTAKBANK',
    'L&TFH',
    'LALPATHLAB',
    'LAURUSLABS',
    'LICHSGFIN',
    'LT',
    'LTIM',
    'LTTS',
    'LUPIN',
    'M&M',
    'M&MFIN',
    'MANAPPURAM',
    'MARICO',
    'MARUTI',
    'MCDOWELL-N',
    'MCX',
    'METROPOLIS',
    'MFSL',
    'MGL',
    'MOTHERSON',
    'MPHASIS',
    'MRF',
    'MUTHOOTFIN',
    'NATIONALUM',
    'NAUKRI',
    'NAVINFLUOR',
    'NESTLEIND',
    'NIFTY',
    'NMDC',
    'NTPC',
    'OBEROIRLTY',
    'OFSS',
    'ONGC',
    'PAGEIND',
    'PEL',
    'PERSISTENT',
    'PETRONET',
    'PFC',
    'PIDILITIND',
    'PIIND',
    'PNB',
    'POLYCAB',
    'POWERGRID',
    'PVRINOX',
    'RAMCOCEM',
    'RBLBANK',
    'RECLTD',
    'RELIANCE',
    'SAIL',
    'SBICARD',
    'SBILIFE',
    'SBIN',
    'SENSEX',
    'SENSEX50',
    'SHREECEM',
    'SHRIRAMFIN',
    'SIEMENS',
    'SRF',
    'SUNPHARMA',
    'SUNTV',
    'SYNGENE',
    'TATACHEM',
    'TATACOMM',
    'TATACONSUM',
    'TATAMOTORS',
    'TATAPOWER',
    'TATASTEEL',
    'TCS',
    'TECHM',
    'TITAN',
    'TORNTPHARM',
    'TRENT',
    'TVSMOTOR',
    'UBL',
    'ULTRACEMCO',
    'UPL',
    'VEDL',
    'VOLTAS',
    'WIPRO',
    'ZEEL',
    'ZYDUSLIFE']},
  '2024-01-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
  '2024-01-31': {'fut': ['91DTB',
    'ALUMINI',
    'ALUMINIUM',
    'COPPER',
    'COTTONCNDY',
    'GOLDGUINEA',
    'GOLDPETAL',
    'LEAD',
    'LEADMINI',
    'MENTHAOIL',
    'NICKEL',
    'ZINC',
    'ZINCMINI'],
   'options': []},
  '2024-02-05': {'fut': ['GOLD'], 'options': []},
  '2024-02-16': {'fut': ['CRUDEOIL', 'CRUDEOILM'], 'options': []},
  '2024-02-20': {'fut': [], 'options': ['SILVERM']},
  '2024-02-23': {'fut': [], 'options': ['SILVER']},
  '2024-02-27': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': []},
  '2024-02-29': {'fut': ['ALUMINI',
    'ALUMINIUM',
    'COPPER',
    'KAPAS',
    'LEAD',
    'LEADMINI',
    'MENTHAOIL',
    'NICKEL',
    'SILVERM',
    'SILVERMIC',
    'ZINC',
    'ZINCMINI'],
   'options': []},
  '2024-03-05': {'fut': ['SILVER'], 'options': []},
  '2024-03-26': {'fut': [], 'options': ['GOLD']},
  '2024-03-27': {'fut': ['91DTB', 'EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR']},
  '2024-03-28': {'fut': ['664GS2035',
    '667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036'],
   'options': ['667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'BANKNIFTY',
    'NIFTY']},
  '2024-03-29': {'fut': ['ONMIBOR'], 'options': ['SENSEX']},
  '2024-04-05': {'fut': ['GOLD'], 'options': []},
  '2024-04-19': {'fut': [], 'options': ['SILVERM']},
  '2024-04-24': {'fut': [], 'options': ['SILVER']},
  '2024-04-26': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': []},
  '2024-04-30': {'fut': ['KAPAS', 'SILVERM'], 'options': []},
  '2024-05-03': {'fut': ['SILVER'], 'options': []},
  '2024-05-27': {'fut': [], 'options': ['GOLD']},
  '2024-05-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': []},
  '2024-06-05': {'fut': ['GOLD'], 'options': []},
  '2024-06-19': {'fut': [], 'options': ['SILVERM']},
  '2024-06-26': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': ['EURINR', 'GBPINR', 'JPYINR', 'SILVER', 'USDINR']},
  '2024-06-27': {'fut': ['667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036'],
   'options': ['667GS2035',
    '718GS2033',
    '726GS2032',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'BANKNIFTY',
    'NIFTY']},
  '2024-06-28': {'fut': ['ONMIBOR', 'SILVERM'], 'options': ['SENSEX']},
  '2024-07-05': {'fut': ['SILVER'], 'options': []},
  '2024-07-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': []},
  '2024-08-28': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': []},
  '2024-09-26': {'fut': ['667GS2035',
    '718GS2033',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'EURINR',
    'GBPINR',
    'JPYINR',
    'USDINR'],
   'options': ['667GS2035',
    '718GS2033',
    '726GS2033',
    '741GS2036',
    '754GS2036',
    'BANKNIFTY',
    'EURINR',
    'GBPINR',
    'JPYINR',
    'NIFTY',
    'USDINR']},
  '2024-09-27': {'fut': [], 'options': ['SENSEX']},
  '2024-09-30': {'fut': ['ONMIBOR'], 'options': []},
  '2024-10-29': {'fut': ['EURINR', 'GBPINR', 'JPYINR', 'USDINR'],
   'options': []},
  '2024-12-26': {'fut': [], 'options': ['NIFTY']},
  '2024-12-27': {'fut': [], 'options': ['SENSEX']},
  '2025-06-26': {'fut': [], 'options': ['NIFTY']},
  '2025-06-27': {'fut': [], 'options': ['SENSEX']},
  '2025-12-24': {'fut': [], 'options': ['NIFTY']},
  '2025-12-26': {'fut': [], 'options': ['SENSEX']},
  '2026-06-25': {'fut': [], 'options': ['NIFTY']},
  '2026-06-26': {'fut': [], 'options': ['SENSEX']},
  '2026-12-25': {'fut': [], 'options': ['SENSEX']},
  '2026-12-31': {'fut': [], 'options': ['NIFTY']},
  '2027-06-24': {'fut': [], 'options': ['NIFTY']},
  '2027-06-25': {'fut': [], 'options': ['SENSEX']},
  '2027-12-30': {'fut': [], 'options': ['NIFTY']},
  '2027-12-31': {'fut': [], 'options': ['SENSEX']},
  '2028-06-29': {'fut': [], 'options': ['NIFTY']},
  '2028-06-30': {'fut': [], 'options': ['SENSEX']}}}
				
			
  1. If there’s an existing JSON file at the specified file path, it reads this file and updates its content with the new data. If the file doesn’t exist, it initializes the file with the combined JSON data. 
  2. The function then saves the updated or newly created JSON object back to the file, ensuring that the expiry data is stored persistently.
  3. Finally, it returns the combined JSON data, providing a comprehensive view of the expiry data both stock-wise and date-wise.
This combined data structure can be invaluable for analysis, enabling a more nuanced understanding of the market dynamics from two different perspectives – by individual instruments and by expiry dates.
Post a comment

Leave a Comment

Your email address will not be published. Required fields are marked *

×Close