Equity Analytics Results Generation
This page provides information on how to configure the pipeline to generate equity analytics results and set up both the daily TCA generation and the manual TCA generation.
A pipeline is provided with the KX Equities Analytics Accelerator to generate and persist the results of equity analysis. The pipeline performs the analysis on the orders in the Order
table for a given date and persists the results to the OrderAnalytics
table.
The pipeline can operate in different modes, which are outlined and discussed below.
Configuring the pipeline
There are different options for the method of operation when running the pipeline. Adjusting that, along with other configuration options, is achieved using variables in the pipeline code file eqeagentca.q
.
1. Date
By default, the pipeline runs on orders for the previous day's date. This can be adjusted by
This should be in the YYY.MM.DD
format.
Refer to setting up manual TCA generation for example and details.
2. Querying HDB directly
The pipeline executes an API call to generate the results. The best performance is achieved by querying the HDB directly and this is the default method of operation. To adjust this, use the QUERYHDB
variable.
By default, the variable is set to true and the HDB is queried directly. If the variable is set to false, the query is sent through the service gateway.
The environment variable is expecting TRUE
or FALSE
.
3. HDB pod name
Depending on how your Insights Enterprise database is configured, the HDB pod name could be different. For example, it could have its own individual pod, or be in a pod along with the RDB and IDB. To allow a direct query to the HDB, the pod name must be correct. The HDBPOD
environment variable configures the HDB pod suffix, the part of the name after the assembly name.
This variable should be adjusted from the default -dap-db
if required. If querying using the service gateway, it is not necessary to adjust this variable.
4. Operate in batches
To allow the pipeline to operate with lower Kubernetes resource settings, it can operate in multiple batches, generating and persisting them one at a time. This feature is disabled by default and can be toggled using the BATCH
environment variable. Valid settings are true
(execute in multiple batches), or false
(execute in one query).
If the pipeline is operating in batches, the number of instruments per batch is controlled with the BATCHNUM
environment variable. This should be an integer value.
5. Direct write of results
The pipeline persists the results using a direct write to the HDB. If you prefer to use RT to persist the results, then the DIRECTWRITE
environment variable can be changed from the default value of true
to false
.
Setting up daily TCA generation
It is possible to generate equity analysis results on a schedule by setting up a cron job to run a pipeline. The relevant pipeline code is in the eqeagentca.q
file in the equities-ea
package.
For detailed steps of how to set up and configure a kubernetes cron job to do this please refer to the appropriate documentation.
Setting up manual TCA generation
It is possible to generate equity analysis results by manually executing a pipeline using a script. The relevant pipeline code is in the eqeagentca.q
file in the equities-ea
package.
For detailed steps of how to set up and configure the script and package required please refer to the appropriate documentation.