In yesterday’s post I promised to give more detail on the Yield Curve Bootstrapping sheet running on the Amazon hosted SpreadServe instance. If you’d like to try running the sheet on your own desktop you can download it from the repository; just click on ycb_quandl_pub.xls. To run the sheet in your own Excel you’ll need to download the QuantLib and SpreadServe addins. ycb_quandl_pub.xls is based on one of QuantLibXL’s example spreadsheets, YieldCurveBootstrapping.xls, which gives a sample QuantLib Excel solution to a common fixed income rates maths problem: bootstrapping a yield curve. If you look at the original sheet you’ll see that all input data is present as simple cell values. To change it you must rekey it. Ideally this would be automated, so that deposit, futures and swap rates could be regularly pulled from a clean data source, and the bootstrapping results recalculated and published. ycb_quandl_pub.xls uses the SpreadServe Addin to pull the depo, futures and swap rates from quandl. Look at the top left block on the Quandl sheet within the ycb_quandl_pub workbook to see the invocations of the s2quandl function that pull the rates into the sheet from Lower down on the same sheet you can see the s2cron invocation that schedules a timer to go off every 5 minutes and trigger a new download of the same data. The same trigger is used as input to QuantLib’s qlPieceWiseYieldCurve function on the Bootstrapping sheet to force a recalculation when freshly downloaded data arrives. All that is great for automating an Excel spreadsheet. With SpreadServe we can take it one step further and get the sheet off the desktop and onto a server. The whole process is then automated, centralised and freed from possible manual disruption on the desktop.

NB QuantLib date calcs mean the results of this sheet are only good on weekdays, Mon-Fri, and not Sat or Sun.

The readthedocs github workflow is so smooth I had to knock together some docs for the SpreadServe Addin. Here they are

Going off topic here, as this isn’t etrading related, but I’ll blog it as I suspect others might be having problems with Windows 7 and 8 PCs dropping connections to BT HomHub 2 modem routers. If you’re connection only lasts for a few minutes, and then shows as “limited connectivity” it could be because recent Windows does DHCP differently than Homehub. I found an MS KB article that suggests adding a registry flag in HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Interfaces/{GUID}. The flag is called DhcpConnEnableBcastFlagToggle, it should be a DWORD, and be set to 1. There may be several GUIDs under Interfaces, depending on how many Wifi hubs your PC talks to. Look inside each and examine IP addresses to figure out which is the Homehub.

Penny jumping on EBS

September 20, 2012

EBS is an FX ECN owned and operated by ICAP, a cash FX equivalent to Bloomberg or TradeWeb. It’s been in decline for some time as flow shifts to single dealer platforms. Here’s an interesting NY Times article on how introducing an extra decimal place in their prices resulted in a fall in trading volumes. It’s an interesting illustration of how market microstructure choices can affect participant behaviour. A key phrase in the article is: “But that fifth decimal attracted super-fast computer traders, often disrupting the flow of liquidity on the EBS platform”

So how did the high speed traders disrupt the flow of liquidity ? Note that EBS’s cash FX trading is organised as a limit order book.  Introducing an extra decimal creates 10 times as many price levels in the order book, which in turn makes penny jumping much easier for quick automated trading strategies. Which is obviously going to piss off the other market participants, who end up paying the spread earned by the penny jumpers. Larry Harris has an excellent discussion of penny jumping it in his seminal “Trading and Exchanges”, but the Wikipedia link has an adequate explanation.

No doubt considerations like the ones above motivated the rates dealers making govt bond markets on MTS when they decided not to admit hedge funds.

Progress ?

June 6, 2012

prog21 blogs that progress in software tech is slower than one might think. I suggest it’s slower than even prog21 thinks, possibly negative even. Xerox had the Alto running in 1973, and it had a GUI & mouse, TCP/IP networking and a Smalltalk-72 programming environment. So how much fundamental progress has there been since 1973 ?

Single threaded async

April 11, 2012

This is an excellent explanation of the single threaded asynchronous model of programming. It’s refers to Twisted, but many of the points apply generally.

Lords of Finance II

January 11, 2010

Finished Lords of Finance over the Xmas break, and strongly recommend to any interested in financial history. The author concludes by summarising the causes of the Great Depression as four distinct crises: the German contraction in 1928, the Great Crash of 29, the US banking panics of 31-33 and the European financial crisis of 31. He compares these four to the Mexican peso crisis of 94, the dotcom crash in 2000, the recent credit crunch and the 97/8 Asian currency and Russian default crisis. Compelling stuff…

I’ve been interviewing C++ developers for years now, so I know that Alexandrescu, Meyers, Josuttis and Sutter are the thought leaders in C++ land. Interviewing JavaScript devs has taught me that their analogs in JavaScript land are Doug Crockford, Nick Zakas, Steve Heron and Dean Edwards.

Effective Boost

May 1, 2008

I’ve long been a fan of Scott Meyer‘s Effective C++, More Effective C++ and Effective STL series of books. I have a 1992 first edition of Effective C++ on my desk that’s been very well thumbed. Today I asked a colleague who’s a heavy hitting C++ expert for Boost book recommendation. He suggested Karlsson’s book, which looks OK. But we really need Scott to write a book on Boost. Bring it on please Scott !!

Clueless journos

May 30, 2006

The cluelessness of most journalists is a bit of a pet theme for me. It shouldn't really need pointing out. Anyone with two brain cells to rub together will figure it out like this: read a newspaper article on your specialist subject, notice that the author has failed to do even the most basic research and ask the most obvious questions, then realise that the same must apply to pretty much everything else in the paper.

Today's Evening Standard had yet another example. The City Editor, Anthony Hilton commented on 'Big banks deadly game'. He mentions Enron, points out that they had a dealing room, and then asserts that we're now surrounded by Enrons, in the shape of the global investment banks, which of course, all have dealing rooms. He goes on to say "the big banks make between half and three quarters of their profit from dealing, and that no one from the outside can tell how they do it, or what their business really is".

Later in the column there's an attempt to appear cluefull by means of a reference to Taleb. So let's spell it out for Hilton, since he seems not to understand what a dealer is, depsite his long and distinguished journalisic career. A dealer offers liquidity to the market by quoting prices to buy and sell a range of financial instruments in trades up to a certain size. I work for a dealer that supplies liquidity to the European government bond markets, among others. By standing ready to buy or sell EuroGovies in large amounts, my employer makes it possible for pension funds and insurers to take or unwind positions in EuroGovies at any time. They also make it possible for European governments to conduct treasury operations smoothly – for instance borrowing to finance government spending by issuing new debt. Dealers play a critical role in the smooth running of market economies.

 I suspect Hilton is confused about the distinction between dealers and proprietary traders. No doubt he's confused about a lot else too.