Custom Codes

I use to have a list of custom codes that I created and when I moved to the new version I guess I never copied them to my directory. In trying to recall how to create a code I think I am leaving out a step as this attached example doesn't generate any data. I also tried using the GetData function with the same results. I also tried just the straight codes with no weighting and same results. If someone recognizes the error in my code I would be obliged.

Hi Duke,

I think you need to put the individual symbols in parentheses:

(SPY:BLMB * 0.6) + (EFA:BLMB * 0.3) + (SHV:BLMB * 0.1)

Capture

That was it, thank you Darren. I was applying the weight outside the symbol call.

Darren, as a follow up this question. I am trying to build a graphic (column Chart) of the percent changes of custom codes (which are blended benchmarks.) Normally I would build them in Bloomberg and use the custom symbol there but then I lose a lot of the functionality in Optuma. However, using that method gives me access to Bloomberg datafields. Since I am now building these codes in Optuma I have to create a script to accomplish the same functionality. As an example, in the attached pic I am trying to build out a simple 1 day percent change. I know the formula can be condensed but is my way of practicing the structure. The issue I am running into is that the aggregate data is not accurate which make me believe I am not pulling in the previous days values correctly. In the example the current one day change of the constituents is less than the aggregate summed value.

Hi Duke,

We have the CHANGE() function which will calculate that for you. Try that instead and see how you go. By default it will be the one day change, but you can click on the text to change the lookback interval:

Capture1