0% found this document useful (0 votes)
64 views8 pages

Bloomberg: Custom Technical Studies Quick Start Guide

Uploaded by

jose.amador
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views8 pages

Bloomberg: Custom Technical Studies Quick Start Guide

Uploaded by

jose.amador
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Bloomberg

Custom Technical Studies June 13


Quick Start Guide 2018

This document describes the process developing a custom study using


CS.Net and the Bloomberg Study SDK.
Bloomberg
Table of Contents
Prerequisites ............................................................................................. 3
Downloading and Installing the SDK ....................................................... 3
Coding a Custom Study ........................................................................... 3
To modify a Bloomberg-provided sample study project: ......................................................... 3
To create a new study project: ................................................................................................ 3
SDOC<GO> - Custom Study API Documentation .................................................................. 3

Previewing and Publishing ...................................................................... 4


Previewing a Custom Study .................................................................................................... 4
Publishing a Custom Study..................................................................................................... 4
When publishing a new study for the first time, create a new custom study profile: ............. 4
After creating the study profile, publishing the custom study: .............................................. 5
Using a Published Custom Study ........................................................................................... 5
To use a published custom study, add it to a single-security G chart: ................................. 5
To edit properties of a custom study on a G chart: .............................................................. 6
Publishing a New Version of an Existing Custom Study ......................................................... 6

Assembly Versioning ............................................................................... 7


Study Assembly Versioning .................................................................................................... 7
Assembly Version Management Guidelines ........................................................................ 7
Shared Library Versioning ...................................................................................................... 7

Changing the Default Properties of a Custom Study ............................. 8


Bloomberg
Prerequisites
 An active Bloomberg Professional Service account (accessed via local Bloomberg
installation - the shortcut on your desktop, not via Bloomberg Anywhere).

 Microsoft Visual Studio versions 2015, 2015 & 2017. Version 2019 is currently not
supported.

Downloading and Installing the SDK


1. Run STDY<GO> on the Bloomberg Professional Service to access the Custom Study
Manager screen.
2. Enter 92<GO> or click Download SDK to access the Study SDK screen.
3. Select the latest version of the SDK in the list and click Install. By default, the SDK is
installed in the C:\Program Files\Bloomberg\SmartClient\Study SDK on your PC.

Coding a Custom Study


To modify a Bloomberg-provided sample study project:
1. Go to C:\Program Files\Bloomberg\SmartClient\Study SDK\Samples on your PC.
2. Open the CSharp or Visual Basic folder, based on your language preference.
3. Double-click the Visual Studio “.sln” solution file. Visual Studio opens.
4. Double-click a sample study project contained in the solution to view the code.

To create a new study project:


1. Start Visual Studio.
2. Select File > New > Project. The New Project dialog appears.
3. Select either Visual C# or Visual Basic in the Project Types list.
4. Select Bloomberg Custom Study under My Templates in the Templates pane.
5. Enter a name for your project in the Name field and click OK.
6. Add to or edit the generated skeleton code as needed.

SDOC<GO> - Custom Study API Documentation


Run SDOC<GO> on the Bloomberg Professional Service to access the Custom Study API
Documentation page.
Bloomberg
Previewing and Publishing
Previewing a Custom Study
1. Compile your custom study.
2. Click the Study Settings icon on the Study Tools toolbar.

The Project Settings dialog opens.


3. Select the study project from the Project list.
4. Enter the single-security G chart # on which to preview the study.
5. Click Save.
6. Click the Preview Study in Bloomberg icon on the Study Tools toolbar.

The G chart is launched in a Bloomberg panel with the study previewed.


7. Right-click on the chart and select Preview Study > Settings to launch the Study
Properties popup for the previewed study.
8. Modify the settings of the previewed study.
9. Select the Display tab to modify the visual properties of the previewed study.
10. Click Update to refresh the chart with the new properties of the previewed study.

Publishing a Custom Study


When publishing a new study for the first time, create a new custom study profile:
1. Run STDY<GO> on the Bloomberg Professional Service to access the Custom Study
Manager screen.
2. Enter 90<GO> or click Create New to access the Create New Study screen.
3. Enter a unique Study Name that concisely describes the study.
4. Enter a unique ProgId, the unique publishing key used for the custom study and all of its
subsequent versions. A suggested format may be: <username>.<number>. For
example, if your username is “jsmith99”, a possible ProgId would be “jsmith99.01”.
5. Enter a Description that describes the nature and purpose of the custom study.
6. Enter 2<GO> or click Add to assign an administrator for the custom study.

Page 4 of 8
Bloomberg
7. Begin typing your name in the User field and select it from the auto-complete list.
8. Check off Administrator.
9. Click OK.
10. Enter 4<GO> or click Apply to finish.
11. Click OK to close the confirmation popup. Note that STDY<GO> will not list the new
study until the first version is published.

After creating the study profile, publishing the custom study:


1. Return to the custom study project in Visual Studio.
2. Click the Publish Study icon on the Study Tools toolbar to launch the Publishing
Wizard.

3. Click Next to go to the Publish Study page of the wizard.


4. Select the study project to publish from the Project list.
5. Select the same ProgId created in the previous section to use as the publishing target.
6. Click Next to go to the Study Dependencies page of the wizard.
7. Click Next to go to the Additional Resources page of the wizard.
8. Click Next to go to the Version Summary page of the wizard.
9. Enter a version Label for the custom study, if necessary.
10. Enter Comments for the custom study, if necessary, and review the Summary.
11. Click Next to publish the custom study.
12. Click OK to close the publishing wizard. The study should appear on STDY<GO> in
approximately 10 minutes.

Using a Published Custom Study


To use a published custom study, add it to a single-security G chart:
1. Run G<GO>.
2. Create a new single-security chart or open an existing one.
3. Select Edit > Data Series & Studies to launch the Properties popup to the Data Series
& Studies panel.
4. Expand the User Defined Studies node on the left.
5. Expand the My Studies node.

Page 5 of 8
Bloomberg
6. Click the custom study’s name to add it to the right side of the panel.
7. Enter 1<GO> or click Update to refresh the chart with the custom study.

To edit properties of a custom study on a G chart:


1. Right-click on the chart and select Custom Study Name > Settings to launch the Study
Properties popup.
2. Modify the settings of the custom study.
3. Select the Display tab to modify the visual properties of the custom study.
4. Click Update to refresh the chart with the new properties of the custom study.

Publishing a New Version of an Existing Custom Study


1. In Visual Studio, open the custom study project to be updated.
2. Modify the code.
3. Preview the new version of the custom study, following the steps in “Previewing a
Custom Study.”
4. Click the Publish Study icon on the Study Tools toolbar to launch the Publishing
Wizard.
5. Click Next to go to the Publish Study page of the wizard.
6. Select the study project to publish from the Project list.
7. Select the same ProgId used in the previous version as publishing target.
8. Click Next to go to the Study Dependencies page of the wizard.
9. Click Next to go to the Additional Resources page of the wizard.
10. Click Next to go to the Version Summary page of the wizard.
11. Enter a version Label for the new version of the custom study, if necessary.
12. Enter Comments for the custom study, if necessary, and review the Summary.
13. Click Next to publish the custom study.
14. Click OK to close the publishing wizard. The new version will be available in
approximately 10 minutes.
15. Reopen a G chart containing this custom study, or add it to a new G chart by following
the steps in “Using a Custom Study.”

Page 6 of 8
Bloomberg
Assembly Versioning
Study Assembly Versioning
All Study assemblies are strongly named and the version of the assembly needs to be properly
managed to avoid errors at runtime. In order to make most efficient use of system resources,
the Bloomberg Study hosting environment may include multiple study instances in the same
.NET AppDomain during runtime.
For example, when a user selects multiple studies to run against the same Security in a
Bloomberg Chart, it’s more efficient to run them in the same AppDomain sharing the same input
data rather than run them separately with duplicates of the data. When multiple studies share
the same AppDomain, assembly versions must be properly managed to avoid ambiguity,
otherwise it may cause non-deterministic errors.
To avoid such runtime errors, the Bloomberg study publishing service has been upgraded to
detect ambiguous assemblies and force the publisher to increase assembly versions. Precisely,
the Bloomberg publishing service validates all Study assemblies on the server side during
publishing; if an assembly with the same Assembly identity, or Assembly full name (including
name, version and public key token) is found in the system a check is made to confirm binary
integrity. If a different binary content id determined, publishing will fail. To avoid conflict, the
study developer must increase the version of the conflicting assembly.

Assembly Version Management Guidelines


If the source code has been changed since the last publishing, the assembly needs a newer
version.
If the Study SDK has been updated since the last publishing, all assemblies referencing the
Study SDK (Bloomberg.Study.API.dll, or Bloomberg.Study.CoreAPI.dll) need a version
increase.
If any dependent assembly has changed and the current assembly needs to rebuild, increase
the version.
In general, you need to increase the assembly version if the assembly has to be rebuilt (due to
code change or dependency change), since the last publishing.

Shared Library Versioning


Please note: the Microsoft .NET compiler generates a different assembly binary for every build,
even if no source code or dependency changed. So if you have a suite of Studies that use a
shared library, it is strongly recommended that the shared library be referenced by the Studies
as a binary assembly, as opposed to being included in the Visual Studio project. The library will
then only be rebuilt when necessary. Unnecessary rebuilds with increased versions can also
lead to unnecessary resource consumption and performance degradation. You can find useful
Information here:
https://msdn.microsoft.com/en-us/library/wkze6zky.aspx.

Page 7 of 8
Bloomberg
Changing the Default Properties of a Custom Study
1. Run STDY<GO>.
2. Select the custom study whose default properties need to be changed.
3. Enter 1<GO> or click Edit Personal Defaults.
4. Modify the default properties of the custom study.
5. Enter 1<GO> or click Update to save the new defaults.
6. Click OK to close the confirmation popup.
7. Add a new instance of the custom study to a G chart.

Page 8 of 8

You might also like