Archive

Archive for the ‘portfolio management’ Category

transitions

February 8th, 2010

Today we return to our series on regime switching and the topic of managing portfolios of strategies.  In particular, we build on the examples illustrated in sensitivity testing and steppin’ out, in which we showed historical and then real-time ‘forward-walking’ of strategies.  The next step we’d described was to evolve the techniques illustrated to support the real-time management of a portfolio of strategies.

In the example below, we look at another ‘meta’ strategy named StrategyPortfolio which maintains a dynamic portfolio – P – of strategies which it will select from a set of strategies – S – running concurrently in simulation.  The constituents of P as well as their cash allocations and parameterizations will be rebalanced/adjusted regularly after an initial ‘out-of-sample’ period during which only the S strategies are run.

Apart education, the intention of this strategy, as I’d originally suggested here, is to ‘back-into’ a regime-switching strategy without attempting to directly quantify the regimes explicitly.

This has proved to be even more interesting than I’d expected, not so much because it performs particularly well (though it’s promising), but because of all of the things it has taught us.  In particular, the transitions are a killer and there are properties of strategies which (dis-)qualify them from being effective in such a scheme…

Read more…

EMS Internals, portfolio management, regime-switching, strategy development

sensitivity testing

November 14th, 2009

'optimization' or 'search'?

We’ve been looking at how a strategy container might view and implement a variety of modes for strategies it will launch and contain.  Last time I documented a uniform initialization process for many of them, including a posited walk-forward parameter optimization mode.  I’ve implemented an initial version of this that I’ll illustrate through a screencast (first ever – be gentle) below, but before continuing want to raise a couple of cautionary notes about the slope we’re traversing here.

From the very first post on this blog I’ve tried to underline the danger that over ‘optimization’ poses in view of the simple unalterable fact that if you look at enough random junk, you are bound to see things that look impossibly good.  Doesn’t mean they’re actually good.  In the context of trading strategy development, this is a particular danger as strategy parameter optimizers are easy to come by and can be very misleading if employed naively.  I think this is in part due to the term ‘optimization’ which is really a stretch for what these tools do.  They’re better described as search tools as they are really searching through a tuple-space of possible parameter combinations that you’ve specified, and then ranking them by some criteria you specify.

They’re still useful, but less as ‘optimizers’ and more as tools for judging the sensitivity of the strategy to different parameterizations.  If the strategy demonstrates good performance and stability over a variety of market conditions and parameterizations, you may just have found yourself a winner

Anyway, I felt that had to be said…

Read more…

EMS Internals, back-testing, performance analysis, portfolio management, regime-switching, strategy development

multi-strategy trading with regimes

September 13th, 2009

One of the challenges of algorithmic trading is that although there’s plenty of interest in the space, practitioners aren’t generally forthcoming about their observations.  Academics, instead, focus on things that are frequently not very immediately practicable, or when they might be, always seem to set-up a little hedge-fund on the side while publishing colorful chum about how markets are ‘behavioural’ or somesuch.

Even if it’s hard to find good stuff, one must still look as there’s always more information that can help you than you can effectively process or retain.  A few weeks ago I was trying to formalize the expected profit function of an algorithm I’m developing and wanted to see what people had written about the topic.  I entered ‘define profit function for trading algo’ into google and was pleasantly surprised to see a paper entitled ‘Multi-strategy trading utilizing market regimes’ by Mlnarik, Ramamoorthy and Savani.  It doesn’t directly cover the topic I was looking for, but instead addresses a number of related topics I’ve been interested in for some time:

  • the treatment of a strategy as an instrument in its own right
  • composing portfolios comprised of strategies
  • using regime switching techniques to manage portfolios of strategies

In this post, I’ll briefly review their paper, illustrate how one can easily model strategies in relevant ways using the strategy ‘object model’ I’ve described previously through an example, and conclude with some thoughts on how these kinds of strategies might be implemented and further explored.

Read more…

EMS Internals, dereferenced, portfolio management, regime-switching, strategy development

containing a strategy

August 19th, 2009

My son recently had his first birthday and amazes me daily with his new feats as he runs around increasingly stably exploring the world around him.  It occurs to me that the system I use to trade every day, Stratbox, is approaching its fourth “birthday” in the next few months.  I hadn’t originally intended to write a system – an algorithmic trading platform – but found that existing products were limited, expensive and didn’t fit my mental model of what they should do.

This isn’t surprising as I wanted the system to support all of the activities associated with our algorithmic trading.  It turns out that that’s a lot to ask of a system.  It also turns out that you learn as you go and so the system continues to evolve.  A few years ago I’d posted about the basics of a strategy container and in this post I’m going to come back to this topic and describe some of the layers of code and thought developed since then.

First, let’s consider the role of a strategy container.  Its job is to intermediate between trading strategies and the external environments with which they interact.  It must also provide services that strategies can use (e.g., position management) and that it wouldn’t make sense for each strategy to re-implement.  In the past I’ve focused on the former responsibility of adapting strategies to external environments.  Why is this necessary and interesting?  Because it allows us to take the same exact strategy and run it live, or in simulation or in backtest, etc.  Interesting and necessary, but not what I want to focus on this time.  Instead, I want to look at the services provided to strategies; the ‘ecosystem’ a strategy container provides in the hope that strategies might flourish within it.

Read more…

EMS Internals, FIX Protocol, portfolio management, strategy development, technology

doubling down with levered ETFs

April 22nd, 2009

This weekend I read Jason Zweig’s “Will leveraged ETFs Put Cracks in Market Close?” which references a paper by Minder Cheng and Ananth Madhaven at Barclay’s.   I tried, but couldn’t find their original paper over the weekend.  As luck would have it from across the internets Paul Kedrosky came to the rescue with a post referencing that paper, “The Dynamics of Leveraged and Inverse Exchange-Traded Funds“.

If you have any interest in ETFs, then you should read this paper carefully as it provides a very nice and accessible mathematical treatment of leveraged and inverse ETFs.

I’ve had success using ETFs in portfolio-oriented strategies to conveniently provide specific exposures, eg, to emerging markets.  I’ve also explored strategies that pit ETFs against futures and similar arbs that take advantage of contract rolls or other anomalous behaviors across the markets.  But I’ve never looked at ETFs the way they really should be understood: as structured products that should have well-defined (if not necessarily obvious) properties.

Like many structured products, some of these characteristics are not obvious and may be quite unintuitive but are always important to understand.  For instance, the hedging required to implement these funds is both non-linear and asymmetric.

Specifically, leveraged ETFs must re-balance their exposures on a daily basis to produce the promised leveraged returns. What may seem counterintuitive is that irrespective of whether the ETFs are leveraged, inverse or leveraged inverse, their re-balancing activity is always in the same direction as the underlying index’s daily performance. The hedging flows from equivalent long and short leveraged ETFs thus do not “offset” each other. [...]

The impact is particularly significant for inverse ETFs. For example, a double-inverse ETF promising -2X the index return requires a hedge equal to 6X the day’s change in the fund’s Net Asset Value (NAV), whereas a double-leveraged ETF requires only 2X the day’s change. This daily re-leveraging has profound microstructure e ffects, exacerbating the volatility of the underlying index and the securities comprising the index.

Hence Mr Zweig’s concern that these ETFs feed the volatility we’ve seen for the last 8 months or so near the market close.  If the day has been up then both “bull” and “bear” levered ETFs will need to buy in order to stay hedged – reinforcing the trend and effectively supporting serial correlation of returns.

Read more…

dereferenced, portfolio management, strategy development

NVIDIA’s TESLA and Compute Unified Device Architecture

November 29th, 2008

While the war over the latest+greatest video cards for the current generation of graphics intensive games seems always to ebb and flow between nVidia and its arch-rival ATI, I’ve long preferred nVidia for their better support of Linux.  Thus, all of my machines have some sort of nVidia Graphics Processing Unit (GPU) in them.

For those who spend their workdays in the markets and their weekends pondering derivatives pricing, latency, oceans of market data, portfolio optimization, and how to make every last damn thing faster, a preference for nVidia cards could prove to yield an unexpected benefit.

nVidia has recently unveiled a product line dubbed “TESLA” which leverages their absurdly fast GPUs to provide a supercomputer-like High Performance Computing (HPC) platform at a previously unimaginable price point.  TESLA computers are regular machines that have a set of slightly modified GPUs in them; modified such that they have no video out, but instead become additive processing clusters which the machine can use for compute intensive tasks.  For about $10K you can buy a 1U machine with some 4 teraflops of capacity.  By way of comparison, this is over 20 times faster than the funky Helmer project I’d been drooling over a few months ago in a production-worthy package ready for the server room today.

So, TESLA refers to the machines built with these specialized GPUs.  Making all this power usable is what CUDA is about…

Read more…

monte-carlo methods, options pricing, portfolio management, technology

portfolio: atomic element of a trading strategy

September 13th, 2008

A wall st risk manager's favorite pastime? A friend recently asked me what I considered to be the “axioms” of alpha-seeking trading strategies. I think there are a few, but probably the one that seems to me most important is that the atomic element of a trading strategy should always be a portfolio as opposed to a single instrument.

In a scenario of perfect knowledge, this wouldn’t be true. If you somehow *know* with certainty that crude will go up or that Citigroup will go down, then concentrating all of your resources into a position based on that belief might be reasonable. But knowledge seldom comes in such a neat package (and will frequently be illegal to act upon when it does!).

Instead, knowledge will typically come in more conditional and less certain forms: “commodities tend to rise during periods of FUD [Fear-Uncertainty-Doubt]” or “companies who announce stadium naming rights deals tend to under-perform.” In some cases, perhaps the knowledge on which you’ll base your strategy can be quantified probabilistically.

Depending on the nature and quality of the knowledge or hypothesis that forms the basis for a given strategy, one can adapt one’s portfolio construction/optimization based on customized relationships amongst the potential portfolio constituents. But one doesn’t need to be so fancy to see the concrete benefits of our first axiom. Below I detail a simple strategy I’ve put together to explore the forces involved.

Read more…

performance analysis, portfolio management, strategy development

evolution of a strategy

July 21st, 2008

(d)evolution

I mentioned several weeks ago that I’ve been developing and trading a strategy that’s proven to be quite interesting and profitable. In that post, I described how I’d tried to improve the strategy through the use of a dynamic hedge. The results of that crude hedge were quite good, but just as no worthwhile software project is ever really complete, trading strategies demand constant iterative development.

Below I describe some of the steps I’ve taken to incrementally improve this strategy, discarding the relatively expensive hedge I’d developed earlier in favor of a complementary strategy. We see that when you combine two positive and uncorrelated results, you end up with a product that is literally better than the sum of its parts.

Read more…

performance analysis, portfolio management, strategy development

a stat arb story

July 12th, 2008

Ed ThorpThe always excellent Wilmott Magazine has recently posted a series of articles by Ed Thorp (pictured) in which he describes his experiences developing and evolving a statistical arbitrage product. Part I provides some insights into his current operation, revealing that he maintains a dollar-neutral portfolio as I’d discussed in another post, they trade some 1.5 billion shares / year, and that they limit position sizes to 2.5% on the long side of the portfolio and 1.5% on the short side. In Part II, he explains why a stat arb system is considered an “arbitrage” and how, with the help of a talented team and led by the insights of Gerry Bamberger, they developed the first iteration of a stat arb product. Part III details the evolution of the system from a set of dollar-neutral sector-oriented portfolios to the more general sets of portfolios generated through statistical factor analysis. He concludes with some anecdotes including the emergence of David E Shaw. Very recommended.

dereferenced, hedge funds, portfolio management, strategy development

unsung virtues of a dynamic hedge

June 4th, 2008

unsung virtues of a dynamic hedge

I’ve recently been working-on and trading an equity strategy that has some great characteristics and some interesting challenges. The great characteristics revolve around its profitability, volatility and simplicity. The challenges start with the fact that the strategy generates alpha on the short side – thus, you are intrinsically swimming against the tide and can conceivably be ruined in a hurry. Your broker might also be unable to find inventory to short. Other challenges include the native capacity of the strategy – it’s not fundamentally scalable as a strategy and only a relatively small amount of money could be put against it without incurring increasingly onerous costs and risks. In any case, it’s been a fun strategy to develop as it’s an interesting puzzle and it makes money.

Discussing the strategy recently with a potential client, they observed that such a strategy wouldn’t be acceptable within their environment (apart the capacity issues) as their risk management practices required all strategies to maintain dollar neutrality – for any dollar of x that they used to buy something, they needed to sell a dollar of y. This led to an interesting experiment for me, the results of which I share with you below.

Read more…

performance analysis, portfolio management, strategy development