Tag Archives: pricing

Formula debugger… More addictive than heroin

Hum, probably not the best title in the world. But that’s the truth: for any Murex support person, the formula debugger has become very hard to live without.

What is Formula debugger?

I’ll have to assume that you are from another planet . The formula debugger is THE tool to use whether you are actually working (so useful) or just pretending (looks very serious and on the scale of Lazy Fridays Hangover I am Coming to Work but I am Still Asleep (LFHICWISA), it scores a 9 (only beaten by the Excel screensaver)).

As the formula debugger name could have led you to believe: It is used to debug formula. When you turn it on, whenever you are using functions which calls the pretrade, you will see a pop up with all the formulas executed as well as their resolution.

How does it work?

To turn it on, it is very simple, from your enduser session, do Help-Monitor-Formula debugger. You will get a pop-up stating: Formula debugging is now on.  (do the same steps to turn it off)

Now, very simply price a trade from ePad, or whatever you want to do, and a pop up will come up showing you the different formulas executed.

Even better (it’s like a double rainbow) if shows you the resolution of formulas. For example (first line is my formula, second one is the resolution details always starting with //)

IF fLFHICWISA>9. THEN sResults:=’Better than Excel Screensaver’

// IF 8.5>9. statement result is FALSE

You also get the content of the variables when they are assigned:


// legGetString(pointer,”Counterpart”) returned “HSBC”

And of course you also get the name of the formula being executed so you can check the formula you have been working on is properly being used by the pricing.

And the whole text is exportable to Notepad or you can also search through it.

Any more tips?

You are getting quite demanding, but I actually have 2 more things:

One is the obvious Clear button, to make sure that you only have as debugging output what you need to focus on (between 2 tests, just clear the window)

And the other one is to couple with the action button wf:XML refresh in the strategies/notpads (right click on the folder,Properties, Actions. Then you can add a button wf:XML refresh. Usually it is the last one in the list.

This button lets you reload all the changes you made in the formulas in a CONFIG session without having to exit eTradepad and re-enter.

Time for you to get cracking on new strategies and formulas!

Macro buttons – Coding your problems away

Macro buttons. As the name suggests, it is a macro embedded in a button. They’re one of Murex most powerful features as they expand what eTradepad can do by a massive factor. While I can’t give code here of what macros can be (ok I could do examples, but won’t anyway), I’ll describe usages and hopefully inspire you to start using them.

Macros are setup from pricing templates, that’s where you code them. They follow exactly the same code than eTradepad so you can first test your macros via etradepad. The trick with macros is that you usually want to have them triggered on request. To emulate a similar behavior in eTradepad, you can simply put a condition to execute the code if the comment field has a value of 1 (or Go, or Eureka or “Peter Piper picked a peck of pickled peppers” if you wish to see that the comment field is indeed limited in characters). And during the course of your code, you empty the field.

Assuming you can code and what I mentioned above is not complete Chinese to you (or Icelandic in case you’re fluent in Chinese), then your next question should be: but what can I do with macro buttons?

That’s a great question (and the part where I can’t give you code examples) but I can give you contexts as to where I saw them used:

  • Creating a series of transactions in eTradepad by reading a lookup table. Indeed you can easily insert legs via coding in eTradepad and if you find a way of populating a lookup table with the trade data, then you’re golden. This is especially useful when the users need to review/amend the trades before injecting them into Murex
  • Solve a strategy. That’s another good one. The trader defines its strategy (or uses an existing one) and when he needs the strategy to be priced a certain way, the macro can setup the global parameter, set some values and trigger the solver by changing the total value of the NPV.
  • Mirror transactions and perform variations. The mirror task in the workflow is usually the best when back-to-back or hard margin transactions are entered. But it gets harder and harder to configure once you start getting into non perfect back-to-back or when the user wishes to perform manually amendments to the copy. Macro can do that for you, they can copy the leg and do changes before letting the user change what he/she needs.

As you could read, the macros have a wide array of functionalities and they’re not restricted to being a combination of existing Murex buttons. They actually do much more than that. So let’s get coding some macros… Hum, maybe not, you won’t need to code a new one everyday but at least if one user comes to you with a request, they will be another weapon in your war against issues.

eTradepad – 10 useful tricks

eTradepad is a great tool, it lets you price, build strategies, strip pricings, compare prices and save quotes for later use. The tool is very rich and there are few things to know about it if you want to maximize its usefulness. Here’s my 10 things to know about eTradepad for a better you!

1. Finding a field name in eTradepad

Let’s start with the basics. When writing code, sometimes finding a field name is not obvious. Of course, one could always use the right click-Field-Plain name but you can’t copy it. So I prefer to use formula editor-customize on the field to have the field name and its string directly in the formula editor

2. Comment code

This is very very important: always comment your code. Especially when you put in a workaround or something not obvious. You could think that it will guarantee your job but it will effectively guarantee that you won’t remember your code in couple of months. And that if you go on holidays, people will need to get in touch with you to understand what is happening

3. Macros

You can create macro buttons in eTradepad. You basically attach some code to them and you can then add them at the bottom of your screen. Macros are very useful when the user wants to have some things changed all in one go

4. Workflow refresh

The button to have when doing pretrade workflow. (it sits at the very end of the list of action buttons: wkf: XML refresh). This button refreshes the pretrade code and applies it. So rather than starting a new session every time you need to try out some pretrade, use that button

5. Formula debugger

Hopefully everyone knows about it now but the formula debugger (Help-Monitor-Formula debugger) brings a popup with the executed formula as well as boolean statements and values loaded into variables.

6. Viewer

You can turn your etradepad into a viewer. The look would be like a pricing matrix. For example option maturity on the top, swap maturity on the left and premiums as the output. The development is relatively recent and can be triggered from the external settings of the notepad you’re in.

7. SCF … Don’t

SCFs are a no go in eTradepad. If you do need to use them, test, test, test and re-test. They are not all supposed to be used in the context of eTradepad. Choose an additional flow or any other solution instead of using them

8. Text area

With Mxpress, Murex did a great job at educating people to use the text area. It can give a nice text description of the payoff that the user is currently pricing. It can also be copied into the clipboard if the info needs to be sent to customers

9. Archiving

When awaiting for a customer answer or to share a pricing, Archiving is a great tool. It lets you save a pricing (either privately or publicly) so you can re-use it for later. It is much lighter than saving a dedicated notepad for each pricing you want to keep. In terms of maintenance, it is much easier to clean old archives as opposed to old notepads

10. Excel paste special

Really love this function. If you’ve got a correctly formatted excel (and preferably a notepad with horizontal display), you can paste from Excel into Murex creating new entries (aka new pricings). For that you need the action Paste Special and choose to create new lines. Very useful if sometimes you need to price a set of trades external to Murex.

What about you dear reader? Was this useful to you? Any other tricks to give away?