Category Archives: Uncategorized

A Personal Ad Server

I like programming, I’m a bit embarrassed to admit. As a fifty-year old, programming is not what I am supposed to be interested in. I should be managing large teams of people and making insane amount of money. That’s the way we think in today’s hyper-competitive and overachievement-oriented world, where we are all in a race to nowhere. But, what can I say, I do like programming. In particular, I like web programming, which is even worse. I mean, any teenager with a diploma from any of those fly-by-night schools can do web site development and such. I would like to think that I do it with a difference, but who am I to judge?

Continue reading

Rates and Valuation

Marking trades to market requires up-to-date market data. There are two types of market data required for pricing — one is the live spot rates, volatilities, interest rates etc. This type of data is collectively called rates. The second type is the kind that goes into defining the products being traded, or the characteristics of the rates. These include definitions of interest rate pillars, bond coupon dates and rates etc. This second type is considered static data.

Valuation and Product Control

The rates management team is in charge of the first type data. They ensure that the live data providers are consistent with each other and that the data itself is accurate. They do this by applying various automated tests and limits to the incoming rates to flag any suspicious movement or inconsistency. Once approved by the team, the data gets consumed by the trading platform. The rates management is a critical role, and the market data is often stored and served in dedicated databases and services. Because of the technicalities involved, this team works closely with the information technology professionals.

The static data is typically managed by a separate team independent of rates management. They go by various names, Treasury Control being one of them. They set up traded products and rates pillars and so on. In some banks, they may also be responsible for trade input data validation.

Two other important functions of Middle Office are valuation and product controls. These functions are pretty far removed from quantitative development and trading platform. These teams ensure that the trade valuations and P/L movements are consistent with market movements. Valuation Control takes a close look at pricing and P/L mostly at trade level while Product Control worries about P/L explanation typically at portfolio level. Since we have the Greeks (rates of change of product prices with respect to market quantities and time), we can compute and predict the change in the prices (or P/L movements) using Taylor series expansion. If the independently computed prices (using actual market rates) are at odds with the predicted ones, it points to an internal inconsistency and should trigger a detailed investigation.

Product Control may also help Finance and Human Resource with valuation reserves process, which estimates the level of exaggeration in the profit expectations of ebullient traders. Since traders’ compensation is tied to the profit they generate, this process of assigning reserves against profit is essential in ensuring equitable performance rewards.

Accidental Writer

I consider myself an accidental writer. Despite the modest success I enjoyed as a published writer and a columnist, writing is not where my talents lie. I wrote my first book because I thought I had something important to say. To be sure, I still believe what I said is pretty important for the world to know, and is getting more relevant in the light of the recent discovery of superluminal neutrinos. But when it comes to writing, such a sense of importance is a bit beside the point. A singer is a singer because he has a good voice and adequate singing talent, not because he knows a good song to sing.

This principle holds good in writing as well. It is not so much what you write about, rather how you write it, that makes you a writer. So writing my first book was hard. I had to learn how to write. And here are some writing tips to my fellow accidental writers.

First of all, you have to have a good grasp of grammar — that goes without saying. In fact, it goes beyond the basic subject-predicate, parts-of-speech, sequence-of-tense kind of rules. These run-of-the-mill rules you can pick up from any standard text book, and Chicago Style Manual, etc. What these books leave out, though, are a couple of simple tips in connecting sentences, closing paragraphs, and even chaining chapters into books. Grammar is usually taught and understood as something that applies at a sentence-level, not to collections of sentences that form a paragraph, chapter, articles or a book.

I have to point out a pattern here; the techie in me won’t let it slide. A vocabulary book would teach you some good words, but that is not enough. Basic grammar tells you how to form good sentences using words. How do you put sentences together to make good prose? May be standard writing courses teach you that, but I haven’t taken any, and it came as a revelation to me when I learned these rules (from a Frenchman, as it happened). It is this high-level meta-grammar that I want to share with you here.

With that dramatic and long-winded introduction, let’s sink our teeth into it. All strong sentences have a subject, an object and an action. In that last sentence, for instance, “all strong sentences” would be the subject, “have” is the action, and the list of categories the object. The subject is the topic of the sentence. The subject of the first sentence in the paragraph is the topic of the paragraph.

All right, this post got published by accident just now — I thought I was updating the draft, but hit the publish button instead. Serves me right, I guess, what with the title “Accidental Writer” 🙂

Let me try to wrap up quickly here. My last teacher didn’t like rules at all, but what can I say, I’m a techie and I need rules. Rule number one is to stay on the topic. If you open a paragraph with “Mary had a little lamb,” Mary is the topic. The second sentence has to be about Mary, if you are to make a decent paragraph. So you could say, “She went everywhere with her lamb” or “Mary also had a cat.” and so on. That way, you would be staying on the topic of Mary.

The second rule is about how you transition from one topic to the next. It has to happen through the object (or the action). Let me illsutrate: “Mary had a little lamb. It followed her everywhere.” Now the topic has switched to the lamb, and you are free to babble on about the lamb now – like, “It was black in color.” What would be wrong is a paragraph like this, “Mary had a little lamb. It followed her everywhere. It was black in color. Mary also had a cat.” The last sentence abruptly switches the topic back to Mary, and this is not good. In this toy example, you may not find it too jarring, but in more complex, real-life sentences, such a switch may be enough to lose your reader. The reason, I think, is that a transition that breaks my second rule makes your reader work a little harder, his brain gets a bit fatigued, and he interprets this fatigue as a boring style of writing.

I can easily modify my example paragraph to be less damaging. Here it is, “Mary had a little lamb. It was black in color. It followed her everywhere. Mary also had a cat.” I switched the second and third sentences, and now it follows the transition rule and  is a better paragraph, I think.

The third rule is something that every book on writing tells you — avoid passive voice.  Avoid it even when it sounds a bit unnatural. In order to make this rule “mine,” I add a proviso — you can use it when you really cannot find another way of switching topics. Consider this paragraph, “I wrote many articles for a newspaper. One of my articles was noticed by an editor of a magazine, and he contacted me.” The passive voice is not too bad for the second sentence there because it keeps the topic on my articles, and the next sentence is probably about an article I’m going to write for this editor. Slightly better would be, “One of my articles caught the attention of…” or “.. caught the eye of …” It is only slightly better because of the need to use multiple “of’s” — something to avoid according to a later rule we may not have time to get to. Anyway, a much better idea would be to rewrite the whole paragraph.

The fourth rule is to avoid weak sentence beginnings, such as “There is/are…”, “It is…” They are almost like passive voice. They cannot stay on a topic as defined in my first couple of rules. Associated with this rule is the awareness that the beginnings of a sentence (especially the first sentence in a paragraph) are the most effective spots in your article. Don’t squander it with anything weak. Even transitional phrases usually placed at the beginning of sentences (“However,” “On the other hand,” “Therefore,” “For example” etc.) would waste the spot. I, therefore, use the trick I just used in this sentence to move the weaker structure away from the beginning.

Knowing the subtle weakness of certain structures may come in handy in certain situations. You could, for instance,  say to your boss, “There is something wrong with the computer,” or “The computer stopped working,” depending on whether it is you or your annoying co-worker who spilled coffee on it. (By the way, did you see how I moved “for instance” away from the beginning of the sentence? And didn’t move “By the way”? These are not accidents, they are choices.)

Native speakers of the language clearly have an advantage. They follow most of these rules naturally when they speak, I think. They may make use of their naturally assimilated sense of good prose by recording what they want to write and later transcribing it. I’m not a native speaker of English, and my grasp on my own native tongue now is so weak that this trick will never work for me even in my mother tongue. The trick I do use to force myself to revise is to actually write (I mean, using a pen, on a sheet of paper) what I want to say. This way, when I type it in, I have one more revision forced upon me. Revisions are easier on a sheet of paper because you can always see what you are trying to revise — it stays put. On a computer screen, when you cut and paste to move something, it momentarily disappears from your field of vision. Even when you type in new stuff, the rest of the paragraph moves around, and it bothers me.

Unfortunately, this article (the second half of it) didn’t benefit from the physical writing process and might turn out to be a weaker piece for it. I’m relying on my writing skills (cultivated by experience) to get it right. But such reliance on one’s ability is usually misplaced for an accidental writer. You see, despite what the title of this post says, good writing is never an accident.