View Rakesh Nair's profile on LinkedIn

Wednesday, June 16, 2010

"Error creating window handle"

Nothing related to banking, but something which my users keep complaining about.(Why me? Where are the network admin boys??)As an application developer, one could argue that anything outside the application is not his/her problem. But when we build windows applications, a lot of things help remind us that we don't live in an ideal world. 

"Error creating window handle" is one such thing. You can find the nerdy details here http://blogs.msdn.com/b/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx or simple steps below on how to increase desktop heap size:

  1. Click on Start - and in search type regedit and press enter.
  2. Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\
  3. Make backup of your key! Click on File menu and choose Export. Give it a name and choose the destination. Click Save and there it is - a backup of your SubSystems reg key. Just in case you want the original key back.
  4. Doubleclick on Windows key in the right pane.
  5. In Value data field scroll left or right using arrow keys until you find this:
  6. SharedSection=1024,3072,512. Change 3072 into 4096 so it reads: SharedSection=1024,4096,512

Wednesday, March 31, 2010

Gold Trading: GOFO vs Lease Rate

The gold carry trade involves borrowing gold at, say 1%, selling the gold, and then investing the cash at, say 3%. If the gold price doesn’t change, you earn a net 2%. The bigger the net difference the more carry trade return you can earn (assuming a stable price) and therefore more attractive short selling of gold should be – as long as there is an expectation that the gold price won’t rise too far to wipe out the profit from the interest rate differential.

The point of a carry trade is, therefore to “capture the difference between the rates” . The question then is what are the two “rates” and what represents the net difference.  The booklet titled “A Guide to the London Bullion Market” issued by the London Bullion Market Association clearly says:

“Forward rate (GOFO) = Dollar interest rate – metal lease rate”

Therefore the fact is that it is GOFO which represents the “amount that can be earned from the gold carry trade”. GOFO is the measure of the net difference, “the amount that can be earned from the gold carry trade”, not the Lease Rate.

GOFO is called forward offered rate, because it’s the sale of the forward value of gold, in return for USD. 
 
[inspired from http://goldchat.blogspot.com]

Sunday, March 07, 2010

Options Algorithms

Options Algorithms are different to Algorithmic Trading of Options(ATO) or Smart Order Routing of Options(SORO).  ATO is about using the popular cash world algo strategies like VWAP, TWAP, MOC etc, on options.  These slice, dice and schedule an order to avail the most profitable execution price. SORO, on the other hand, has to do with executing the trade with the cheapest transaction cost. The different routing channels to the exchanges, MTFs and dark pool, provide the factiliy to sweep through different liquidity providers, hunting for the most economical way to execute an order.  This will, for example, take into account the various exchange based tariff and cancellation rules.

Options algorithms, go beyond both of these, to involve logic that takes into account option sensitivities.  The strategies generally consist of rules based on the option greeks -Delta, Gamma and Vega. A few of them are :
  • Volatility Pegged Orders
  • Delta Pegged Orders
  • Volatility Dispersion Orders( for indices)
  • Automated Delta Hedging
  • Automated Gamma Hedging
Update:
Some example ATOs implemented by UBS - http://advancedtrading.com/articles/229402648

1. Options TapNow: Seeks to minimize market impact while intelligently seeking aggressive execution up to a limit price.


2. Options Premium Trigger: Allows you to place an options order that is relative to the price of the option premium, rather than the underlying security.

3. Options Float: Allows you to float your order in the market pegged to the passive side of the spread.

4. Options Hidden: Holds your order off the exchange until your desired price is available.

5. Sweep Display: Aggressively sweeps at the market until the order is filled or no longer available, posting on multiple markets simultaneously.

6. Sweep No Display: Aggressively sweeps at the market until filled or no longer available. Unmarketable orders are held back until the displayed price is in your limit.

7. Sweep IOC: Executes a wave of immediate or cancel orders across multiple markets simultaneously, cancelling any residual unfilled shares.

Wednesday, February 17, 2010

Saturday, October 17, 2009

Volatility surface management - Part 2

Volatility surface is a 3d object with option volatilities, option strikes and option expiries on the 3 axes.
The volatility at any point on the surface is used in pricing an option with the corresponding strike and expiry. Rather than have a simple grid of these points, a more intutive and flexible approach is to manage the grid by using parameteric surfaces. i.e.The volatiliy surface is represented by some graphical parameters(specifications) which will plot the values.  This way, its easier to tweak just one meaningful parameter and it will reflect the new values for a set of strikes or expiries. Eg. If 'Skew' is a parameter, then increasing this value for a particular volatiliy curve(Vol vs Strikes for a particular expiry) will increment the vol values for all the ITM call options.

A number of volatility functions can be defined, each of them behaving differently in varied market scenarios.  Few of the criterion are
  • Using parameters that can be easily conceptualised into surface dynamics.  Eg. Skew, Kurtosis, Smile etc
  • Each parameter can be further defined to have a specific economic meaning Eg The long term skew might be the debt to asset ratio of the corporate [ofcourse you don't make up such things, you mathematically prove them..:)]
  • Orthogonality - how change in one parameter affects the other. 
At the end of the day, it boils down to using the model that makes most sense to the trader.  Every trader(or desk) will have his/her own philosophy of the market.  The vol model that helps him visualise the market most intutively, helps him price his options the best.

In liquid markets(like Equities), you have the advantage of using the market bids and asks to formulate your implied volatility curve.  This way you always follow the market and quote your prices within the market bid-ask spread.  Today all insitutions components that automatically fit the volatility surface to the market bids and asks. Easier said than done, as this will need to filter out all the noise in the market and keep our assumptions data up-to-date. Not a trivial thing, considering how dynamic the enviroment can be with corporate actions, acquisitions, algo engine quotes etc.

A few more advanced features into this functionality can be
  • to avoid market volatility moves due to your own firm market quotes
  • analyse the tick by tick vol data to identify arbitrage opportunities and trade against them
Assuming your volatility surfaces are well managed and are accurate enough, another angle to its use can be in the the risk side of things. The data can run through stressing engines, which can churn our VAR numbers.

Friday, September 18, 2009

Measuring your trading application performance

I completely support the idea of collaboration when it comes to sharing and reusing resources between parties. But its not easy when the involved are competing for the top spot in the league tables. However just found out about Securities Technology Analysis Centre which provide various trading systems performance benchmarks in consultation with all the big boys(council members) on the street.  Will be interesting to see how it works. Apparently your firm needs to be a member of the council to gain access to all the information and test harnesses etc. Wonder how much it costs and how much of your secret sauce you will have to divulge before you join.

Thursday, September 17, 2009

Finance data visualization

Today I bumped into something extremely interesting and it has changed the way I look at the topic - Advanced finance data visualisation techniques.

Banks today are spending significant time and effort selecting 3rd party vendors to chart data, graph data etc. The focus primarily is on the quality of the graphs, easy API to use, good documentation and licensing costs. The exercise is a no-brainer. The more time we spend, the better decision we make. Some of the popular vendors being ChartFX, Infragistics, Nevron etc. All of them have their pros and cons. Some support WPF, some don't etc. One can come up with a big feature comparison table.

But are the right questions being asked? Are traditional visualization methods good enough? Are treemaps and heatmaps the end of the road? I had to see Lineplot's tick data video to trigger this creative left side of my brain. Simple and intutive! I guess, the developer's job to build these are trivial compared to the upfront costs required to get these ideas funded and supported by the business.

On a slightly different track, another video here makes it quite easy to understand the business concept. Probably not something a front office technology team could be building , but neverthless interesting to know that there are firms out there using these to woo their clients. Definitely something all sales teams should look into, in addition to adopting all the "inbound marketing" techniques which seems to be the "mantra" for the day.

Wednesday, September 16, 2009

Project Management Software

I am at a stage in my career where I'm beginning to look beyond technical and functional skills that are required to make it big in an organisation. Project management is going to be an eventual step in my career someday, but will try to push it away for as long as I can. I started looking at project management software available and was astounded by the number of players in the market. Microsoft project plans(MPP) are a thing of the past and now the buzz word seems to be "colloborative project management". Create plans on the web that can be shared and updated by loads of people. It definitely is a big plus over MPPs where the thick desktop client never keeps you motivated enough to update your gantt charts. Sharing the plan with other stakeholders and making the whole process more transparent will definitely improve the chances of the project, better tracking real life events.

Clarizen seems to be the 3rd best tool after @Task and Daptive PPM (refer reviews). But I played around with the interface and it seems to be very easy to use. It includes various other enterprise level management tools like Billing, Expenses, Issues etc. I'm not sure how this can integrate well with already existing infrastructure in an organisation for such tasks. The only 3rd party integrations seems to be with MPP and Microsoft outlook. Are there others? What about other bug tracking tools, JIRA etc?

A lot of questions in my head at this stage. Is there a more specific suite of tools aligned to agile methodologies? Are there any open source ones out there? Are these specialised to IT development?

I'll find out and put my thoughts down.

Tuesday, September 15, 2009

Volatility surface management - Part 1

Front office traders in a sell-side derivative houses can involve in a variety of businesses. A few of them are :

Flow - High net worth investors/Buy Side/Coporates willing to buyorsell options to finance or hedge their respective portfolios. Profit making is primarily through commissions.

Option Market Making - Dealer quotes a buy and sell price to maintain liquidity in the market and has to honour any trades done against them. Money is made through spreads.

Exotics business - Special clients requiring complicated products which involves combinging various vanilla products.

All of these have one fundamental technical requirement to do well. Pricing of options, which involves pumping various inputs(market data or derived market data) into mathematical pricing models(quant libraries) to generate a fair price of the option. The fair price is the value of the option based on the firm's model assumptions and other data eg. credit worthiness.

Volatility surface management has always been a critical aspect of the derivatives pre-trading pricing activity for front office trading. In addition to volatility, the other assumptions data that go into the Black Scholes formula for pricing an option are spot price(K), options strike(S), interest rate(r), time to expiry (t), dividend schedule (d) and borrow cost rate(b).

Monday, July 20, 2009

Book Review : CityBoy by Geraint Anderson

Rating : 3/5

Overall, its a quick read book. Nothing spectacular about it. Fairly crude!

It takes atleast 3 chapters for one to start getting into the book and be actually convinced that Geraint is not trying to write a book to make things sound cool, but that they are actual events of his life. A lot of the talk about chinese wall breakdown and analyts maintaining the "buy" or "hold" strategies based on the quality of beer they get treated to, is already common knowldge to the investment banking junta. But its shocking to realise that it still exists today after it was blamed as a major cause of the dot com bubble (refer "Blood on the street") .
Neverthless its interesting to view the City through an Analyst's lens. Now when I bump into one of them in the office, I'll probably just be looking for the blood shot eyes and black circles to prove my conviction. Though he tries to stereotype every investment banker as a druggie who takes part in sex orgies (like himself), those characteristics dont match with any of the bankers I work with on a daily basis. But it seems very possible to have a few Geraints in some of the desks, as it seems to be a very critical component in some of the the client schmoozing businesses that run in the banks.

I completely give it to Geraint to have the ba$%s to openly offend each and every banker on the street. But he should know better than any of us that these ppl are mentally so tough, and even lashing them in public is not going to stop them from doing whatever possible to continue minting money. (That doesn't mean to say they should be lashed, because then I might be an indirect victim since I feed into this rich food chain:)

The bank aliases are intriguing, but very easy to google and hunt down.

Megashite - Dresdner Kleinwort
Banque Inutile - Soc Gen
Scheissebank - Commerzbank
Mighty Yankbank - Citigroup

Managed to dig this out as well :http://excellence.thomsonreuters.com/awards/extel/brokerage-rankings/2004/pan-european-survey- Go to Equity Sectors -> Utilities

Tuesday, March 17, 2009

Moneyness

Moneyness is a measure used in equity derivatives to understand the profitability of an option. Its extensively used to compare volatilities across different underlyings.

Moneyness can be measured in standard deviation or percentage terms.

In percentage terms it is simply (Strike Price/Spot Price)* 100.

We can also define Forward moneyness, which is (Strike Price/Forward Price)* 100 and gives us an idea of how much the option is in-the-money compared to its forward price

The logs of Spot moneyness and Forward moneyness are also used by some traders.

In Standard deviation terms it can be measured in various ways :
  • ln(Strike Price/Fwd Price) / (ATMVol * sqrt(Term) )
  • ln(Strike Price/Fwd Price)/(sqrt(Term))
It can be interpreted as the number of standard deviations it would take for the forward to reach the strike price. The ATMVol term in the first formula takes into account the skew of the volatility surface. Term is the number of days until expiry.

Monday, March 09, 2009

Trading software vendor products

  • Orc
  • Numerix
  • OpenLink
  • Reuters - JRisk Kondor+
  • Misys - Opics , summit
  • Calypso Technology: Calypso
  • Murex: Asset Manager, MXG2000, Mx.3
  • Openlink: Endur & Findur
  • Principia Partners: Principia
  • royalblue: Fidessa
  • Sophis: Risque & Value
  • Sungard: Front Arena
  • Temenos: Globus & T24
  • Trema: Finance Suite / Finance KIT
  • Wall Street Systems: WSS
  • TrayPort
  • SuperDerivatives
  • FFastFill

Tuesday, May 27, 2008

Some pointers on Derivatives

  • Delta is always positive for Call and negative for Puts. Delta exposure is negative for Short Call and Long put.
  • Everything else staying constant, the premium for a Call option keeps reducing as we approach the expiry. This is because of reducing Time value.
  • When we short a call we have a positive pay off only when the option is Out of the money
  • An easier way to understand Delta, is to think of it as an approximate possibility of the option being exercised.
  • For delta hedging short positions we have to buy/sell options. You always "lock in a loss" trying to delta hedge a short call(short gamma) if we use only underlyings. This is because of the convexity, of the short call payoff. So only way to delta hedge in this case is to buy gamma by buying options.
  • Call Deep ITM - Delta =1, Gamma= 0 ; Deep OTM - Delta =0, Gamma =0 ; ATM - Delta =0.5, Gamma=1

Friday, April 06, 2007

Grids for Finance

A short video describing the advantages that Grid computing can provide for the Finance industry

Friday, December 30, 2005

What's the big deal?

Now, what can be so complicated about techonology that a bank would use? Just another software package ,which the software corporates, would vie to accomodate in their ever popular model of outsourcing. What is the big deal in it?

These were the initial thoughts that ran thru my head, when I was selected to join Iflex Solutions Ltd on Jun 31 2003. But believe me, two years of development and a 6 month onsite experience with the company which makes the world's "Best Selling(This is the crucial word in the title) Core Banking Solution" product has changed my concept about 'Banking Technology' . Its a whole new concept, with a plethora of things to consider.

From a different point of view, it is really astounding to see the increase in the IT budget a bank puts in every year. And it makes complete sense why to do so too?
Automation, obviously was the very need of the birth of software. I guess some of the other important parameters for which the bank is ready to spend so much are Functionality, Flexibility,Performance and Security.

Functionality and Flexibility go hand in hand in a banking scenario. Having a myriad of functionalities is just not enough to lure the client into making a deal nowadays. What's more valued is how easily/effectively can you customize your product to that of the bank's requirements. I think that's the most important factor one needs to consider. The flaws in the design only come out at the customisation stage.
Performance definitely can be a nigthmare for the vendor most of the times. Ofcourse everything would look fine for the first one year after the implementation. Its only after those huge volumes of unpurged data and archive logs fill up all the disk space and kill the performance of the bank's day to day transaction, the 'cribbing'(from he bank)begins. End of day time increases, Interface handoffs take longer time and the bank's DBAS go crazy having to answer to the increasing complaints of a slower database. The bank's finance department, already having allocated enought funds towards IT will be all reluctant to spend that extra penny towards infrastructure. So who's to blame finally? Obviosly the application makers! The software vendors!
Security,With the ever popular events of call center fraud scam filling the front page of newspapers, there's no need for me to stress on this explicitly. With ever increasing number of channels through which a bank can transact today, Security has been one of the most challenging areas.

So its no joke to create banking software and there are a number of other technical,functonal and physical aspects to it.

I plan to explore and understand more about this intersting and intriguing class of software development and share them...