From 1c2308dd6509b063fba06fddac4db532033e5ae5 Mon Sep 17 00:00:00 2001 From: Eskil Gjerde Sviggum Date: Wed, 28 Aug 2024 14:51:40 +0200 Subject: [PATCH] Add docs for TimeSeries and RNANews connectors (#18) * Add docs for TimeSeries * Add docs for cumulative return * Add docs for dividend * Add docs for growth * Add docs for price * Add docs for RNANews * Add sections *How to use* and *Relevant demos* to time series docs * Add sections *How to use* and *Relevant demos* to rna news docs * Move morningstar directory into docs/connectors * Rework examples in time-series docs --- demos/dashboards-rna-news/demo.js | 2 +- docs/connectors/morningstar.md | 12 +- .../rna-news/regulatory-news-announcements.md | 104 ++++++++++++++++ .../time-series/cumulative-return.md | 41 +++++++ .../morningstar/time-series/dividend.md | 38 ++++++ .../morningstar/time-series/growth.md | 40 ++++++ .../morningstar/time-series/price.md | 38 ++++++ .../morningstar/time-series/time-series.md | 115 ++++++++++++++++++ 8 files changed, 383 insertions(+), 7 deletions(-) create mode 100644 docs/connectors/morningstar/rna-news/regulatory-news-announcements.md create mode 100644 docs/connectors/morningstar/time-series/cumulative-return.md create mode 100644 docs/connectors/morningstar/time-series/dividend.md create mode 100644 docs/connectors/morningstar/time-series/growth.md create mode 100644 docs/connectors/morningstar/time-series/price.md create mode 100644 docs/connectors/morningstar/time-series/time-series.md diff --git a/demos/dashboards-rna-news/demo.js b/demos/dashboards-rna-news/demo.js index 8344ed3..3cdcb9f 100644 --- a/demos/dashboards-rna-news/demo.js +++ b/demos/dashboards-rna-news/demo.js @@ -9,7 +9,7 @@ function displayRNANews (postmanJSON) { options: { security: { id: 'GB00BLGZ9862', - idType: 'MSID' + idType: 'ISIN' }, postman: { environmentJSON: postmanJSON diff --git a/docs/connectors/morningstar.md b/docs/connectors/morningstar.md index ca5c431..66683b1 100644 --- a/docs/connectors/morningstar.md +++ b/docs/connectors/morningstar.md @@ -11,13 +11,13 @@ requires a Highcharts license and a Morningstar subscription. * Morningstar credentials: You will need credentials to access the services. This can be either: - Access token from your server - - Usernam and password + - Username and password * Morningstar standalone for Highcharts: - `@highcharts/morningstar-connectors/morningstar-standalone` + `@highcharts/connectors-morningstar/connectors-morningstar.js` * Morningstar connectors for Dashboards: - `@highcharts/morningstar-connectors` + `@highcharts/connectors-morningstar` * Package bundler like Webpack. @@ -32,15 +32,15 @@ products and Highcharts Dashboards. ### Highcharts Quick Start -You can connect Highcharts core products with Morningstar by using the -`morningstar-standalone` bundle. You have to manually create the connector and +You can connect Highcharts core products with Morningstar by using +`connectors-morningstar.js` in the `connectors-morningstar` bundle. You have to manually create the connector and assing the resulting table to your series options. ### Highcharts Dashboards Quick Start -For Highcharts Dashboards you just need to load the `morningstar-connectors` +For Highcharts Dashboards you just need to load the `connectors-morningstar` bundle, which will register all connectors to the Dashboards registry. All Morningstar connectors are then available in the data pool as other connector types. diff --git a/docs/connectors/morningstar/rna-news/regulatory-news-announcements.md b/docs/connectors/morningstar/rna-news/regulatory-news-announcements.md new file mode 100644 index 0000000..bb1cbb9 --- /dev/null +++ b/docs/connectors/morningstar/rna-news/regulatory-news-announcements.md @@ -0,0 +1,104 @@ +# Regulatory News Announcements (RNANews) + +This type yields series of Regulatory News Announcements for a single security. + +> **NOTE:** RNANews is available in the United Kingdom only. + +## How to use RNANews + +Use the `RNANewsConnector` to load regulatory news announcements. + +In dashboards, this connector is called `MorningstarRNANews` + +Specify the security to retrieve in the options along with a postman environment +file for authentication, and other parameters such as `startDate`, `endDate` +or `maxStories`. + +### RNANews with Morningstar standalone for Highcharts: + +```js +const rnaNewsConnector = new Connectors.Morningstar.RNANewsConnector({ + postman: { + environmentJSON: postmanJSON + }, + security: { + id: 'GB00BLGZ9862', + idType: 'ISIN' + }, + startDate: '2000-01-01', + endDate: '2020-12-31', +}); + +await rnaNewsConnector.load(); + +new DataGrid.DataGrid('container', { + dataTable: rnaNewsConnector, + editable: false, + columns: { + Day: { + cellFormatter: function () { + return new Date(this.value) + .toISOString() + .substring(0, 10); + } + } + } +}); +``` + +### RNANews with Morningstar connectors for Dashboards: + +```js +Dashboards.board('container', { + dataPool: { + connectors: [{ + id: 'rna', + type: 'MorningstarRNANews', + options: { + postman: { + environmentJSON: postmanJSON + }, + security: { + id: 'GB00BLGZ9862', + idType: 'ISIN' + }, + startDate: '2000-01-01', + endDate: '2020-12-31' + } + }] + }, + components: [ + { + renderTo: 'dashboard-col-0', + connector: { + id: 'rna' + }, + type: 'DataGrid', + title: 'Regulatory News for Tesco', + dataGridOptions: { + editable: false, + columns: { + Day: { + cellFormatter: function () { + return new Date(this.value) + .toISOString() + .substring(0, 10); + } + } + } + } + } + ] +}); +``` + +For more details, see [Morningstar’s RNANews API]. + +## Relevant demos + +You will find examples of how to use RNANewsConnector in our demos. + +- **Highcharts Dashboards + Morningstar RNA News**: Shows how to use +RNANewsConnector in dashboards to retrieve RNANews for Tesco. + +[Morningstar’s RNANews API]: https://developer.morningstar.com/direct-web-services/documentation/api-reference/time-series/regulatory-news-announcements \ No newline at end of file diff --git a/docs/connectors/morningstar/time-series/cumulative-return.md b/docs/connectors/morningstar/time-series/cumulative-return.md new file mode 100644 index 0000000..110a1e5 --- /dev/null +++ b/docs/connectors/morningstar/time-series/cumulative-return.md @@ -0,0 +1,41 @@ +# Cumulative Return + +This type yields cumulative return time series data for single or +multiple securities. This data can be used to plot cumulative month end +returns charts. + +Returns cumulative return time series data for securities specified. + +When multiple securities are sent, the start date of the first security +in the list is used as the start date for the series. + + +## How to use Cumulative Return + +In order to fetch a cumulative return, specify series type `CumulativeReturn` in +the Time Series Connector options. + +```js +const cumulReturnConnector = new Connectors.Morningstar.TimeSeriesConnector({ + postman: { + environmentJSON: postmanJSON + }, + series: { + type: 'CumulativeReturn' + }, + securities: [{ + id: 'F0GBR04S23', + idType: 'MSID' + }] +}); +``` + +For more details, see [Morningstar’s Time Series API]. + +## Relevant demos + +- **Highcharts Stock + Morningstar TimeSeries**: Shows how to use +TimeSeriesConnector to retrieve Price time series. Specify type +`CumulativeReturn`. + +[Morningstar’s Time Series API]: https://developer.morningstar.com/direct-web-services/documentation/api-reference/time-series/cumulative-return \ No newline at end of file diff --git a/docs/connectors/morningstar/time-series/dividend.md b/docs/connectors/morningstar/time-series/dividend.md new file mode 100644 index 0000000..6dd7ce0 --- /dev/null +++ b/docs/connectors/morningstar/time-series/dividend.md @@ -0,0 +1,38 @@ +# Dividend + +This type yields dividend time series data for single or multiple securities. + +Returns rolling return time series data for securities specified. + +When multiple securities are sent, the start date of the first security +in the list is used as the start date for the series. + +## How to use Dividend + +In order to fetch a dividend time series, specify series type +`Dividend` in the Time Series Connector options. + +```js +const dividendConnector = new Connectors.Morningstar.TimeSeriesConnector({ + postman: { + environmentJSON: postmanJSON + }, + series: { + type: 'Dividend' + }, + securities: [{ + id: 'F0GBR04S23', + idType: 'MSID' + }] +}); +``` + +For more details, see [Morningstar’s Time Series API]. + +## Relevant demos + +- **Highcharts Stock + Morningstar TimeSeries**: Shows how to use +TimeSeriesConnector to retrieve Price time series. Specify type +`Dividend`. + +[Morningstar’s Time Series API]: https://developer.morningstar.com/direct-web-services/documentation/api-reference/time-series/dividend \ No newline at end of file diff --git a/docs/connectors/morningstar/time-series/growth.md b/docs/connectors/morningstar/time-series/growth.md new file mode 100644 index 0000000..21c94d7 --- /dev/null +++ b/docs/connectors/morningstar/time-series/growth.md @@ -0,0 +1,40 @@ +# Growth + +This type yields growth time series data for single or multiple securities. +This data can be used to plot growth charts. + +Returns growth time series data for securities specified. + +When multiple securities are sent, the start date of the first security +in the list is used as the start date for the series. + + +## How to use Growth + +In order to fetch time series for growth, specify series type `Growth` in +the Time Series Connector options. + +```js +const growthConnector = new Connectors.Morningstar.TimeSeriesConnector({ + postman: { + environmentJSON: postmanJSON + }, + series: { + type: 'Growth' + }, + securities: [{ + id: 'F0GBR04S23', + idType: 'MSID' + }] +}); +``` + +For more details, see [Morningstar’s Time Series API]. + +## Relevant demos + +- **Highcharts Stock + Morningstar TimeSeries**: Shows how to use +TimeSeriesConnector to retrieve Price time series. Specify type +`Growth`. + +[Morningstar’s Time Series API]: https://developer.morningstar.com/direct-web-services/documentation/api-reference/time-series/growth \ No newline at end of file diff --git a/docs/connectors/morningstar/time-series/price.md b/docs/connectors/morningstar/time-series/price.md new file mode 100644 index 0000000..09519ce --- /dev/null +++ b/docs/connectors/morningstar/time-series/price.md @@ -0,0 +1,38 @@ +# Price + +Get price time series data for single or multiple securities. + +Returns price series data for securities specified, based on Market data +entitlement. + +When multiple securities are sent, the start date of the first security +in the list is used as the start date for the series. + +## How to use Price + +In order to fetch price time series, specify series type `Price` in +the Time Series Connector options. + +```js +const priceConnector = new Connectors.Morningstar.TimeSeriesConnector({ + postman: { + environmentJSON: postmanJSON + }, + series: { + type: 'Price' + }, + securities: [{ + id: 'F0GBR04S23', + idType: 'MSID' + }] +}); +``` + +For more details, see [Morningstar’s Time Series API]. + +## Relevant demos + +- **Highcharts Stock + Morningstar TimeSeries**: Shows how to use +TimeSeriesConnector to retrieve Price time series. + +[Morningstar’s Time Series API]: https://developer.morningstar.com/direct-web-services/documentation/api-reference/time-series/price \ No newline at end of file diff --git a/docs/connectors/morningstar/time-series/time-series.md b/docs/connectors/morningstar/time-series/time-series.md new file mode 100644 index 0000000..613afef --- /dev/null +++ b/docs/connectors/morningstar/time-series/time-series.md @@ -0,0 +1,115 @@ +# Time Series + +Time Series gives data on performance for securities. This data can for instance +be used for visualization in a chart, or to calculate returns for a given time +period. + +## Capabilities + +- [Cumulative Return](cumulative-return.md) +- [Dividend](dividend.md) +- [Growth](growth.md) +- [Price](price.md) +- [Regulatory News Announcements](../rna-news/regulatory-news-announcements.md) + + +For more details, see [Morningstar’s Time Series API]. + +## How to use Time Series + +Use the `TimeSeriesConnector` to load time series data. + +In dashboards, this connector is called `MorningstarTimeSeries` + +You can fetch time series data of various kinds. Specify the securities and type +to retrieve in the options along with a postman environment file for +authentication, and other parameters such as `startDate`, `endDate` +or `currencyId`. + +### Time Series with Morningstar standalone for Highcharts: + +```js +const dividendConnector = new Connectors.Morningstar.TimeSeriesConnector({ + postman: { + environmentJSON: postmanJSON + }, + series: { + type: 'Dividend' + }, + securities: [{ + id: 'F0GBR04S23', + idType: 'MSID' + }], + startDate: '2000-01-01', + endDate: '2020-12-31', + currencyId: 'EUR' +}); + +await dividendConnector.load(); + +Highcharts.stockChart('container', { + series: [{ + type: 'line', + table: dividendConnector.table.getRows(0, undefined) + }] +}); +``` + +### Time Series with Morningstar connectors for Dashboards: + +```js +Dashboards.board('container', { + dataPool: { + connectors: [{ + id: 'time-series', + type: 'MorningstarTimeSeries', + options: { + postman: { + environmentJSON: postmanJSON + }, + series: { + type: 'Dividend' + }, + securities: [{ + id: 'F0GBR04S23', + idType: 'MSID' + }], + startDate: '2000-01-01', + endDate: '2020-12-31', + currencyId: 'EUR' + } + }] + }, + components: [ + { + renderTo: 'dashboard-col-0', + connector: { + id: 'time-series' + }, + type: 'DataGrid', + title: 'Dividends', + dataGridOptions: { + editable: false, + columns: { + Date: { + cellFormatter: function () { + return new Date(this.value) + .toISOString() + .substring(0, 10); + } + } + } + } + } + ] +}); +``` + +## Relevant demos + +You will find examples of how to use the time series connector in our demos. + +- **Highcharts Stock + Morningstar TimeSeries**: Shows how to use +TimeSeriesConnector to retrieve Dividend time series. + +[Morningstar’s Time Series API]: https://developer.morningstar.com/direct-web-services/documentation/api-reference/time-series/overview \ No newline at end of file