In the last section, we introduced the workflow of buildAnalyticsModel. After we insert/update the ETF data to the cf_etf_history_data index, we compute the data for the Bollinger Band. Let's recall the details to compute the Bollinger Band from the Operational data analytics section of Chapter 10, Using Elasticsearch for Exploratory Data Analysis, to work on Java programming. The step-by-step instructions are as follows:
- Collect all the related documents by performing a search operation: symbol and period are given by the user. startDate and endDate can be derived from the period. We have learned how to use Elasticsearch's high-level REST client to build a SearchRequest object in the Java high-level REST client section in Chapter 11, Elasticsearch from Java Programming. The following code block is extracted from the getBollingerBand...