Get symbol data from Morningstar.com (sector, industry, code etc.)

Modified on 2014/09/29 09:33 by Eugene — Categorized as: Community Components

Syntax


public MorningstarSymbolData

public static MorningstarSymbolData MorningstarSymbolDataExtractor.GetSymbolData(string symbol)

Parameter Description

symbolAny stock symbol valid on Morningstar website

Description

Morningstar is a well-known investment resouces. Methods of the MorningstarSymbolDataExtractor class return some helpful snapshot data for U.S./international stock symbols: sector, industry, business description, NAICS/SIC/ISIC codes, stock type and style.


Example

Here's an illustration of working with Morningstar data in a Wealth-Lab strategy:


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Components;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { string symbol = Bars.Symbol; var msd = MorningstarSymbolDataExtractor.GetSymbolData(symbol); ClearDebug(); PrintDebug( "Stock: " + symbol + "\r" ); PrintDebug( "Sector: " + "\t" + msd.Sector ); PrintDebug( "Industry: " + "\t" + msd.Industry ); PrintDebug( "Description: " + "\t" + msd.Description ); PrintDebug( "NAICS: " + "\t" + msd.NAICS); PrintDebug( "SIC: " + "\t" + msd.SIC); PrintDebug( "ISIC: " + "\t" + msd.ISIC); PrintDebug( "Stock type: " + "\t" + msd.StockType); PrintDebug( "Stock style: " + "\t" + msd.StockStyle); } } }