Simple Algo Testing Framework

Background

The problem of optimal execution of large orders over a finite interval of time is not new. Interested readers may review the risk-adjusted cost minimization approach introduced by Almgren and Chriss (2001).

Generally speaking, the trader faces the problem of optimal execution of large orders because of limited supply-demand liquidity in the market(s). If the order size is small enough there is no such a problem and the whole volume could be executed immediately.

One of the approaches used by traders is to split the original order into a sequence of orders of smaller sizes and execute them within a required time interval.

Click here for the full paper.

Country Sentiment Factors

As an ongoing exercise at Deltix, we seek out new sources of data, raw or derived, which may be useful in quantitative research and trading. We do this for a number of reasons. Firstly, handling new and different data types is a useful exercise with which to develop and road-test our software. Secondly, if we can seed ideas that our clients find useful and develop through to profitable trading strategies then it is just plain good business. Lastly, it satisfies our intellectual curiosity.

Ravenpack (www.ravenpack.com) is a data provider of news analysis services to institutions for use in quantitative trading. They recently released a data service of country sentiment factors. A research paper using these factors is available here. We decided to implement both Ravenpack’s country sentiment factors and their research paper on our Deltix Cloud Services (DCS) platform. The results are extremely interesting. Existing DCS users can download the strategy from the Deltix Developer Network (DDN), accessed from QuantOffice via the “Samples from DDN” button. New users can subscribe DCS and download the strategy here.

The Case for Enhanced Bar Data

One of the paradoxes faced by quantitative researchers and traders is the granularity of data to use in the model back-testing phase. Putting aside using market depth data (order book Level 2, Level 3 data), the choice is in effect between bar data and tick data (trade, best bid/offer aka “BBO”). Bar data, is typically defined in terms of time duration, usually measured in minutes. The bar normally contains the open, high, low and closing (OHLC) quotes in the time period delineated by the bar. Traditionally, bar data has been used in preference to raw tick data because of much lower data density per time period, resulting in less storage and faster processing rates. Another benefit of bar data is that the regular and predictable nature of such data versus irregular (with respect to time) tick data means much simpler programming is required by the end user. However, inevitably, such benefits come at a cost of precision. For trading strategies generating signals infrequently, e.g. hourly or daily, there is minimum loss of precision. However, as signal generation increases in frequency, bars become less satisfactory for both signal generation and simulation of execution.

How then to combine the simplicity of bar data with the precision of tick data? Introducing “Enhanced Bars”.

Our researchers have designed a solution to this conundrum whereby we combine key statistics derived from the underlying tick data and extend the standard OHLC bars with additional attributes. (Hence, we use the term “extended bar” synonymously “enhanced bar”). For example, it is useful to know when the best bid and offer prices occur within the bar, and how many quotes are captured in the bar. Our enhanced bar is defined as (definition taken from our online documentation, Deltix Developer Network (DDN) at http://developer.deltixlab.com):

 

Field nameField TypeData Type
exchangeCodeStaticVARCHAR
originalTimestampStaticTIMESTAMP
openNon StaticFLOAT
highNon StaticFLOAT
lowNon StaticFLOAT
closeNon StaticFLOAT
volumeNon StaticFLOAT
currencyCodeStaticINTEGER
OpenTimeOffsetNon StaticINTEGER
HighTimeOffsetNon StaticINTEGER
LowTimeOffsetNon StaticINTEGER
CloseTimeOffsetNon StaticINTEGER
BestBidNon StaticFLOAT
BestAskNon StaticFLOAT

 

For users of Deltix Cloud Services (DCS), you may download example strategies utilizing extended/enhanced bars at: http://dcs.developer.deltixlab.com/strategies/. DCS includes extended bar data at 10 second and 1 minute granularities.