Skip to content

finstack-dev/morningstar-equity-classification-system

Repository files navigation

Morningstar

Morningstar Equity Classification System

This NPM package aims to enable lookups in the reference table of Morningstar as published on their website.

GitHub license Current npm package version. NPM downloads GitHub stars GitHub forks Current open issues PRs welcome!

Installation

Yarn

yarn add morningstar-equity-classification-system

NPM

npm install morningstar-equity-classification-system

Usage

import * as mecs from 'morningstar-equity-classification-system';

mecs.all()

/** Output:
 
  [
    { 
      "superSector": "Cyclical",
      "superSectorId": 1,
      "description": "..."
    },
    {
      ...
    }
  ] 
 
**/

mecs.search('finance');

/** Output:
 
  [
    { 
      "superSector": "...",
      "superSectorId": ...,
      "sector": "...",
      "sectorId": ...,
      "industryGroup": "...",
      "industryGroupId": ...,
      "industry": "...",
      "industryId": ...,
      "description": "..."
    },
    {
      ...
    }
  ] 
 
**/

mecs.find('31169148');

/** Output:
 
  { 
    "superSector": "...",
    "superSectorId": ...,
    "sector": "...",
    "sectorId": ...,
    "industryGroup": "...",
    "industryGroupId": ...,
    "industry": "...",
    "industryId": ...,
    "description": "..."
  }
 
**/

mecs.above('31169148');

/** Output:
 
  [
    { 
      "superSector": "...",
      "superSectorId": ...,
      "sector": "...",
      "sectorId": ...,
      "industryGroup": "...",
      "industryGroupId": ...,
      "industry": "...",
      "industryId": 31169148,
      "description": "..."
    },
    { 
      "superSector": "...",
      "superSectorId": ...,
      "sector": "...",
      "sectorId": ...,
      "industryGroup": "...",
      "industryGroupId": 31169,
      "description": "..."
    },
    { 
      "superSector": "...",
      "superSectorId": ...,
      "sector": "...",
      "sectorId": 311,
      "description": "..."
    },
    { 
      "superSector": "...",
      "superSectorId": 3,
      "description": "..."
    }
  ] 
 
**/


mecs.below('311');

/** Output:
 
  [
    { 
      "superSector": "...",
      "superSectorId": ...,
      "sector": "...",
      "sectorId": ...,
      "industryGroup": "...",
      "industryGroupId": 31169,
      "description": "..."
    },
    { 
      "superSector": "...",
      "superSectorId": ...,
      "sector": "...",
      "sectorId": ...,
      "industryGroup": "...",
      "industryGroupId": ...,
      "industry": "...",
      "industryId": 31169148,
      "description": "..."
    }
  ] 
 
**/

Build with love Made with JavaScript
Check it out! Check it out!