Log in to see Cloud of Tags

Wealth-Lab Wiki

Bloomberg Static Provider for BBLoader

RSS
Bloomberg customers can connect BBLoader DataSources to Wealth-Lab Version 6 using the Bloomberg Static Adapter. You'll find it at Extensions at www.wealth-lab.com.

1. Create DataSet(s)

Connect to BBLoader DataSources by creating a new DataSet in the Data Manager (Ctrl+M). Follow the Wizard pages and be sure to indicate the correct scale and intraday interval (if applicable).

2. Accessing Price Data

No special notes here. Access price data as you would for any other DataSet.

3. BlmbrgF Indicator


BBLoader fundamental data doesn't conform to Version 6's Fundamental Data Store standards. Consequently, instead of a full-fledged Fundamental Provider, we can access BBLoader fundamental data in the same way that we did in Version 4, i.e., like a technical indicator. For this purpose the WealthLab.DataProviders.Blmbrg contains public methods for the BlmbrgF indicator.

Syntax

public BlmbrgF(WealthLab.Bars ds, string fieldID, string description)
public static BlmbrgF Series(WealthLab.Bars ds, string fieldID)
public static BlmbrgF Series(WealthLab.Bars ds, string dir, string fieldID)  // added 2014.10.0.0

Parameter Description

ds Source Bars object. Note: To access fundamental data for secondary series, SetContext first. See example 3b for more information.
fieldID Bloomberg mneumonic for the fundamental field, e.g., "NET_INCOME"

3a. Accessing Fundamental Data for the Primary Symbol

using System;
using System.Drawing;
using WealthLab;
using WealthLab.DataProviders.Blmbrg;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Using the Series method DataSeries fund = BlmbrgF.Series(Bars, "PE_RATIO"); ChartPane fPane = CreatePane( 100, true, true ); PlotSeries(fPane, fund, Color.Blue, LineStyle.Solid, 2); // Using BlmbrgF constructor method BlmbrgF fund2 = new BlmbrgF(Bars, "NET_INCOME", "Net Income"); ChartPane fPane2 = CreatePane( 100, true, true ); PlotSeries(fPane2, fund2, Color.Green, LineStyle.Histogram, 2); } } }

3b. Accessing Fundamental Data for Secondary Symbols

To properly access fundamental data of external symbols, you must tell BlmbrgF where to find the data. Use either method below. For this example, assume that you click on symbol "AA US".

Note! If the secondary symbol is not contained in the primary symbol's directory, use the BlmbrgF.Series method with the dir overload to explicitly identify the directory of the external symbol's DataSet. (Version 2014.10.0.0 or later required.)

using System;
using System.Drawing;
using WealthLab;
using WealthLab.DataProviders.Blmbrg;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { ChartPane pePane = CreatePane( 100, true, true ); /* Tell BlmbrgF where the data is by first accessing a secondary symbol's data */ // Note: The call to BlmbrgF must occur 'immediately' after accessing the secondary Bars Bars msft = GetExternalSymbol("MSFT US", true); DataSeries pe = BlmbrgF.Series(msft, "PE_RATIO"); PlotSeries(pePane, pe, Color.Blue, LineStyle.Solid, 2); // Or with SetContext SetContext("MRK US", true); DataSeries pe2 = BlmbrgF.Series(Bars, "PE_RATIO"); PlotSeries(pePane, pe2, Color.Red, LineStyle.Histogram, 2); RestoreContext(); } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.