Quantemplate's Capital IQ integration enables you to augment your pipeline output with time series financial data from Capital IQ.
Capital IQ IDs
This demo shows a basic integration with the Capital IQ company IDs stored locally. You can also take a look at a more advanced example which uses Capital IQ company IDs stored in a Quantemplate dataset. The dataset could be the product of a pipeline to match incoming company names to Capital IQ IDs.
Before trying this example, make sure you have:
First, navigate to the Quantemplate app, choose the
Data tab and create a new dataset that will host the Capital IQ data.
Share the dataset with API User via the sharing popup.
Moving forward we will need ID of your dataset and the organisation
Take a look at the URL used by your dataset. In the screenshot above this is
From this, you can extract the IDs as follows:
app.quantemplate.com/organisation id/dataset/dataset id/preview
In this particular example:
- organisation ID is
- dateset ID is is
As the code for Capital IQ integration is a little bit more involved, instead of writing it from scratch we will use an existing open-source Quantemplate API integration helper.
In order to download the helper, navigate to the releases section and click on
qt-integration-0.1.0.jar. This will download Java 8+ compatible jar.
The integration helper expects a few environment variables used for configuring API access, in particular:
CAPITALIQ_API_USERNAME=<api username you got with Capital IQ API license> CAPITALIQ_API_PASSWORD=<password for the corresponding Capital IQ API user> CAPITALIQ_DEMO_ACCOUNT=<indicates whether the Capital IQ demo account is used> QT_ENV=<name of the Quantemplate environment, should be `prod` for any consumers> QT_AUTH_REALM=<name of the Quantemplate auth ream, should be `qt` for any consumers> QT_CLIENT_ID=<id of the api-client user generated by the Quantemplate team> QT_CLIENT_SECRET=＜password for the used api-client user, also provided by the Quantemplate team>
You can save this file as a
.env and fill out the
< > spots with your settings.
Then these options could be exported as environment variables. In macOS and Linux this could be done using a simple
export $(xargs < .env) command.
Having environment variables from the previous step in your command line session you can start using the program.
The orchestration helper accepts parameters either as command-line arguments or reads them from YAML, which should be familiar to many Quantemplate users.
command: generateRevenueReport params: orgId: c-jcre-hi # Quantemplate organisationId datasetId: d-jvv2uapp2rcfnreytumsmniw # Quantemplate datasetId currency: USD # Currency supported by the CapitalIQ from: 1988-12-31 # Starting date in yyy-mm-dd format for the CapitalIQ query to: 2018-12-31 # Ending date in yyy-mm-dd format for the CapitalIQ query identifiers: # CapitalIQ identifiers, that could be downloaded from: # dataset: d-pjuq6lofrnbszq5zntfy4rvv # - remote Quantemplate `dataset` (currently it only takes data from the first column) # local: ./capitaliq-identifiers.txt # - `local` .txt file, (relative file path will be resolved against the config file) inline: # - defined `inline` in the config file - IQ121238 # Multiple sources of identifiers will be merged together - IQ598807 - IQ723344 - IQ956057
As you can see in the config above this will instruct the orchestration program to generate the revenue report in
d-jvv2uapp2rcfnreytumsmniw dataset which belongs to the
c-jcre-hi organisation, for the periods between 1988 and 2018 for the companies which Capital IQ identifiers are included in the
Identifiers could be inlined in the YAML file, could come from a local text file, or be loaded from existing Quantemplate datasets. The last option allows us to achieve rich automated workflows.
For the sake of simplicity, in this example, we will use inline identifiers.
Save the YAML file defined above as
revReport.yml and replace the
datsetId with identifiers extracted from the dataset URL.
With a YAML file created in the previous step now, you can run the integration helper with just a:
java -jar qt-integration-0.1.0.jar apply ./revReport.yml
After a few seconds, the program should inform you about a successful upload.
Now you can refresh the dataset page and see the results:
The report data comes from Capital IQ and it's using
The whole program is open-sourced so you can either extend it yourself or roll out your own solution based on its internals.
Updated 5 months ago