capiq_excel.workbook package

Submodules

capiq_excel.workbook.commands module

capiq_excel.workbook.commands.financial_data_command(company_id, data_item, freq='Q', num_periods=80, data_item_label=None)[source]

Lower-level utility to create an Excel function from inputs for getting financial data

Parameters
  • company_id (str) – Capital IQ id, e.g. IQ21835

  • data_item (str) – Capital IQ item, e.g. IQ_TOTAL_REV. Look them up in Data -> Formula Builder in the Capital IQ Excel plugin tab

  • freq (str) – One character to represent frequency, Q or Y

  • num_periods (int) – Number of periods to go back in time pulling data

  • data_item_label (Optional[str]) – Column name to use instead of data_item name

Return type

str

Returns

Excel command

capiq_excel.workbook.commands.holdings_command(company_id, data_item, date_str, data_item_label=None)[source]
capiq_excel.workbook.commands.id_command(search_str)[source]
capiq_excel.workbook.commands.market_data_command(company_id, data_item, freq='Q', num_periods=80, data_item_label=None)[source]

Lower-level utility to reate an Excel function from inputs for getting market data

For market data, Capital IQ is expecting begin and end date to be passed rather than relative date. This function converts the relative date to absolute dates then creates the Excel command.

Parameters
  • company_id (str) – Capital IQ id, e.g. IQ21835

  • data_item (str) – Capital IQ item, e.g. IQ_FLOAT_PERCENT. Look them up in Data -> Formula Builder in the Capital IQ Excel plugin tab

  • freq (str) – One character to represent frequency, Q or Y

  • num_periods (int) – Number of periods to go back in time pulling data

  • data_item_label (Optional[str]) – Column name to use instead of data_item name

Return type

str

Returns

Excel command

capiq_excel.workbook.commands.name_command(search_str)[source]

capiq_excel.workbook.create module

capiq_excel.workbook.create.create_all_xlsx_with_commands(folder, company_id_list, financial_data_items_dict, market_data_items_dict, **financials_kwargs)[source]
capiq_excel.workbook.create.create_all_xlsx_with_holdings_commands(folder, company_id_list, date_str_list, data_items_dict)[source]
capiq_excel.workbook.create.create_all_xlsx_with_id_commands(ids, folder, num_files=100)[source]
capiq_excel.workbook.create.create_xlsx_with_commands(folder, company_id, financial_data_items_dict, market_data_items_dict, **financials_kwargs)[source]
capiq_excel.workbook.create.create_xlsx_with_holdings_commands(folder, company_id, date_str, data_items_dict)[source]
capiq_excel.workbook.create.excel_cols()[source]

capiq_excel.workbook.populate module

capiq_excel.workbook.populate.populate_capiq_for_file(filepath, excel, retries_remaining=3, close_workbook=False, index=0)[source]

Private function has main functionality. This is a wrapper to add retries afer com errors

capiq_excel.workbook.populate.populate_capiq_ids_for_file(filepath, excel)[source]

capiq_excel.workbook.wait module

Module contents