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.