Skip to content

Commit

Permalink
Add docs for TimeSeries and RNANews connectors (#18)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Eskils authored Aug 28, 2024
1 parent a83e9a4 commit 1c2308d
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 7 deletions.
2 changes: 1 addition & 1 deletion demos/dashboards-rna-news/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function displayRNANews (postmanJSON) {
options: {
security: {
id: 'GB00BLGZ9862',
idType: 'MSID'
idType: 'ISIN'
},
postman: {
environmentJSON: postmanJSON
Expand Down
12 changes: 6 additions & 6 deletions docs/connectors/morningstar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
104 changes: 104 additions & 0 deletions docs/connectors/morningstar/rna-news/regulatory-news-announcements.md
Original file line number Diff line number Diff line change
@@ -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
41 changes: 41 additions & 0 deletions docs/connectors/morningstar/time-series/cumulative-return.md
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions docs/connectors/morningstar/time-series/dividend.md
Original file line number Diff line number Diff line change
@@ -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
40 changes: 40 additions & 0 deletions docs/connectors/morningstar/time-series/growth.md
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions docs/connectors/morningstar/time-series/price.md
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 1c2308d

Please sign in to comment.