Wednesday, November 13, 2013

Know yourself & your opponents

According to Sun Tzu (Art of War):

  • If you know only yourself or the enemy, you are expected to win about half of the battles.
  • If you know both yourself and the enemy, you are expected to win most of the battles.

How does that apply to trading?

Simply crunching numbers, trying to find gratuitously complex patterns alone is not enough. There is no edge, profit, trying to blindly forecast what other traders are likely to do going forward. People improve their execution algorithms almost everyday (at least I do), just so no pattern based traders couldn't exploit them.

You must understand and create trading strategies based on what other traders are doing, they are the enemies who work day and night to take your money.

An example of monitoring what the NYSE traders are up to:
 
http://oi40.tinypic.com/mk8bhc.jpg

full size link: http://oi40.tinypic.com/mk8bhc.jpg

Wednesday, October 30, 2013

Directional HFT? you're wasting time

I've met a lot of aspiring traders/analysts who have spent (way too) much time looking for the secret magical formula, pursuing a directional edge within very small time steps; they assume that this is how HFT firms do it, and they are very much wrong.

Paying for liquidity makes it tough

There's only so much vol within short periods of time. If the trader has to pay the bid/offer spread, then the trader might have a negative expectation from the get go.

Transaction Costs

Yeah, there are other fees involved too.

Significantly large edge needed

Therefore, a significantly edge is needed to make this profitable; which is near impossible, unless you can see incoming orders, and get yours executed before theirs... i.e. latency arb it.


Simplest Solution

Stop trying to squeeze blood out of stones; this is a painful path to nowhere.

From my experience, some of the longer term trades make more money because of the low costs around IT infrastructure needs and etc.

Friday, October 25, 2013

It'll never be perfect, roll with it.


Work's been tough, developing trading solutions for Chinese financial products. There's been numerous software, network, and of course trading related issues, and I've realized that nobody has the perfect team of research, software guys, and traders, yet some manage to still make money. Reality remains, there will always be problems.

Frame adjustment

I have met a lot of people who had waited for "the perfect time" to start a business, put on that trade
, or leave a disadvantageous relationship. Having gone through this myself, it is highly unlikely that this "perfect time" would ever arrive. Waiting feels like a waste of time.

People're innately lazy, it is probably human nature to desire for minimal energy expenditure.

Maybe going forward in business, life is more about making +EV changes NOW, no looking back. It takes courage, diligence, and some practical planning, which might not be all that easy but definitely achievable.


Friday, October 18, 2013

Interview with a Chinese finance journalist

I did a talk about how foreign prop trading firms trade treasury derivatives, and met a journalist, Mac Jia, there. He in turn interviewed me around how I plan to trade Chinese treasury futures, and the article's gotten relatively known within the Shanghai finance community (unexpectedly, since I thought it was just small talk between him and I).

Here's the article:
"
合约间联动性较弱给高频交易提供了套利空间   
国债期货上市后虽然成交清淡,但部分私募的套利策略已经比较成熟,表现出较高的参与积极性,他们通过不同的算法来规避高频套利交易面临的流动性不足难题。而以趋势交易策略为主的私募对参与国债期货仍比较谨慎。   
国债期货自9月6日上市以来,成交一直比较清淡,但这并未影响部分私募机构参与的积极性。
上海弈泰资产管理公司高级策略师Rocko Chan告诉期货日报记者,公司的国债期货套利策略已经比较成熟,正在进行相关测试。资料显示上海弈泰资产管理公司是一家以量化投资为交易策略的公司。
相较国外以机构参与为主的成熟市场,国内国债期货参与群体以证券公司、私募和散户为主,市场的有效性并未得到充分的挖掘。虽然国债期货每日收盘价基本合理,但是从更高频度的时间周期和跨期的角度来看,合约之间的联动性较弱,给高频交易提供了套利空间。
“就是因为偏离价差的时间维度非常小,所以必须要用高频交易进行套利。”Rocko Chan对记者表示。
高频套利交易面临的流动性不足难题如何解决呢?Rocko Chan告诉记者,“我们通过不同的算法来规避这个问题,例如可以通过挂单进行交易”。
而如何用量化的策略进行挂单交易呢?对此,海通期货国债期货分析师徐莹分析称,应该是从与整体方向一致的那端先建仓。比如判断国债期货的整体趋势向上,当发现国债期货与实际价值偏差较大时,可以先建立买入的套利头寸,以规避流动性不足可能造成的卖出端逆市交易。
其实,许多有套利策略的私募都在积极参与国债期货交易。青骓1号债券对冲专项资产管理计划在国债期货上市首日就完成了首单国债期货交易。白石资产管理公司总经理王智宏也告诉记者,“我们也在少量参与国债期货交易,以对冲策略为主,包括趋势和套利等”。
国 债期货TF1312自9月11日创出新低93.494以来,近日一路振荡走高,但这却未能吸引部分以趋势交易策略为主的私募。上海新泰厚投资管理公司总经 理桑东亮告诉记者,目前并没有参与国债期货的相关交易,因为技术数据还不能给出趋势性的判断,至少30天均线出来以后才会考虑。
"

Interesting interview conversation

So this kid came in today for an interview, having done his post-grad in England, "Computational Finance" with lots of outdated machine learning techniques listed on the resume. So we figured we give him a chance, and here are some excerpts from the interview:

-------------------------------------------------------------------------
me: "So, what kind of role do you want to pursue here?" 
him: "I want to get involved with High Frequency Trading." 
me: "What do you know about HFT?"
him: "well... " long pause, " isn't it just crunching historical numbers?" 
me: "OK, let's move on..."

a minute of small talk...

me: "Have you traded anything on your own?" 
him: "No... "
me: "OK... are you familiar with any particular products?" 
him: "Um... futures, and options!"
me: "Great. Can you tell me which Black Scholes Merton assumptions don't apply to the real world?"
him: "ohh... " more awkward silence, "I can't, sigh..."
----------------------------------------------------------------------

Another day in the hedge fund life.

Wednesday, October 16, 2013

Some interesting stuff about Chinese futures exchanges

Here're some things I've noticed with Chinese index/commodity futures.


  • Heavy momentum effect: mostly due to difficulty around hedging since there are no trade-able options yet, and ETFs are relatively expensive and difficult to borrow for short-selling. 
  • High speculative volumes: It seems like an overwhelming majority of the funds here take the pattern-recognition (curve fitting) approach to trading. There's this belief that directional trading is the only way to make good profit.
  • Generally low understanding of exchange microstructure: This seems to apply to even many "professional" traders or money managers I've met thus far. Making the markets here quite juicy for guys like me who have an advantage with externally applied technology and trading logic around low latency trading.
Over all there seems to be a ton of inefficiencies still available on Chinese derivatives, even on the index futures thus far. As an old colleague had said of OSE products back in the 90's, "We made money all day; everything's outta line, EVERYTHING."

Saturday, September 28, 2013

Order cancellation limits on Chinese futures exchanges, solutions

I'm heading the desk here (Shanghai) on low latency trades on Shanghai Futures Exchange (SHFE), Chinese Financial Futures Exchange (CFFEX), and Dalian Commodity Exchange (DCE). Having read through all their trading rules documents the first week here, a lot of new information seems to surface still each day. For standard exchange participants, there is a daily order cancellation limit of 500 per account.

This is not so much of a bad thing, though it does give institutional outfits such as the firm I'm at a significantly large advantage over retail guys who attempt to dabble in low-latency trades, i.e. High Frequency Trading.

Solutions

Getting following status at the exchanges would resolve the cancellation limit:
1) Arbitrageur entity
2) Commercial hedging entity
3) Exchange membership, these are usually State Owned Enterprises (SOE) in China.

Friday, August 23, 2013

Backtest (empirical analysis) purposes

Coming from a institutional proprietary trading standpoint, here I attempt to clarify purposes of backtests.

Main Purposes

Software debugging

This is about 95% of why we need backtests, to make sure that the developed trading platform does what it's supposed to do, e.g. enforcing limits, applying logic correctly.

Implementation Shortfall analyasis

Estimating performance decay with respect to latency, competition, etc.

What backtesting is NOT for

Curve-fitting



Friday, August 9, 2013

Dark Pools (Book Review)


Dark Pools: The Rise of the Machine Traders and the Rigging of the U.S. Stock Market by Scott Patterson has been one of the most interesting books I've read this year on the subject of high frequency trading. It explains the history of US exchanges going from floor to electronic, and some of the key (and awesome) people who helped shape the trading environment today.
  





Some key players

Haim Bodek: A star developer/trader at Hull/Goldman, who specialized in options market making. The book explains his experience at Trading Machines being picked off by competing algorithms due to microstructure disadvantages.

Joshua Levine: Mentioned in "Top 10 Financial Technology Innvators of the Decade", this is a t-shirt and jeans computer science genius who created Island ECN, which effectively changed the way NASDAQ stocks were traded, and broke up the floor market makers' control over order flow of the old days. He still updates his blog at wp.josh.com.

GETCO: Now part of KCG Holdings, GETCO was founded by a couple of ex-floor traders Stephen Schuler, Daniel Tierney who understood the potential of electronic trading, and has been one of the most successful firms who specialize in Automated Market Making (AMM). It was estimated in 2007 that their average daily net profit had averaged about $7M USD.

Key money making strategies mentioned

Market Making & high speed arbitrage off exchange microstructure inefficiencies. The book explores tenets around these core principles, and examples of those who had successfully implemented them.


Tuesday, July 9, 2013

Ockhams Formula (Option Valuations)

Ockham's Razor has often been interpreted as "when you have two competing theories that make exactly the same predictions, the simpler one is the better." In the case of option valuations, I have found Ockham's Formula (Gallacher) significantly more practical than Black Scholes for a couple of reasons:

1) Ockham's is much simpler to apply and offers very similar accuracy as BS for ATM (At The Money) options.

* While Ockham's is not explicitly able to estimate fair value of OTM (Out of The Money) options, BS estimates are wildly inaccurate.

2) Ockham's gives answers where BS fails for options near expiration.

Ockham's ATM Option valuation

ATMO = S * 0.5 *  MAD * SD
             = S * 0.5 * sqrt(2/pi) * SD
             = S * 0.4 * SD
             = S * 0.4 * V * sqrt(T/254)
             = S * V / 40

where
ATMO = ATM fair value option price
S = Underlying product value
V = Realized volatility
T = days until option expiration       

Ockham's Option decay estimate
It is similar to theta, except this is much more accurate near expiration.

D(t, T) = 100 * [1 - sqrt(t/T)]

where
D(t, T) = Decay as a % of option price up to time t
T = days until option expiration   
t = days from expiration

For example, between the 4th and 5th trading days until expiration, an option is expected to lose
100 * [1 - sqrt(4/5)] = 10.5573%

Sunday, June 30, 2013

Option prices are more efficient than you think

In The Options Edge, Gallagher looked at performance of (some interpolated) At-The-Money straddles between 15 futures options to determine whether options are indeed traded at a constant premium over future realized volatility, and concluded that they are most likely not.

In the experiment, he held and rolled front month straddles til expiration, back to back. In the last column, a ratio of 1 would mean the premium paid was exactly at fair value, if the ratio is below 1 the sellers made money, and vice versa.

Here are the findings:
 

We can see that at least for the year 1996, futures ATM Straddles were roughly traded at fair value.

My personal take on this

The normal distribution assumption off Black Scholes valuation is most likely off, significantly.

Empirically, blindly selling options does not generate a positive E(PnL), i.e. Expected Profit/Loss, particularly after transaction, hedging costs. At the same time, this also means buying volatility through options does not always carry a cost, this then in turn could lead to some very interesting trading strategies with very favorable risk/reward potentials.  

Saturday, June 22, 2013

Respecting the proprietary trading business model

So I'm in Shanghai, heading a proprietary trading project, and I can already sense the need to replace a few of the locals in the team as they seem to have concluded this is more of a game than serious business. To make the operations profitable, every part of the business must be executed near flawlessly and on time, and we simple cannot take on the risk of second guessing little details such as "are these transaction costs in USD or RMB?"


How a lot of new guys lose money even with net profitable EV trading strategies

Once the business model is understood, a lot of the new guys assume that profits would come without much work whatsoever. From my experience, this is exactly the point where things start to go south; fat finger mistakes, miscommunications around order submissions, PnL accounting errors, violations of risk limits, etc.

Some tedious (maybe fun for others), necessary work for the trading entity

  • Accurate book keeping, Mark to Market on a daily basis
  • Negotiations with brokerage firms for best possible transaction costs
  • Solid risk limit implementations in real time
  • Daily research minimum to confirm availability of currently exploited inefficiency
 

Thursday, June 20, 2013

About P&L volatility

Here I will talk about how longer term P&L (Profit & Loss) volatility affects instantaneous (shorter term) expected returns, and some practical means to apply this information.

In the Black-Scholes framework, the expected return is explained as
E(R) = (u - v^2 / 2) * (T - t)

where
E(R) = Expected return
u = expected drift, usually the risk-free interest rate
v = expected volatility of return
T = time at the end of the trade
t = time at the beginning of the trade

With basic calculus, we can see that the (u - v^2 / 2) portion is derived as an integral of v, so return volatility is important for not just risk management, but also estimating P&L.

So it looks like P&L volatility lowers longer term returns off short term P&L estimates, e.g. if a trading strategy is expected to average 1%/week, and if the P&L volatility, a random component, is expected to be greater than 0, then its expected annual return with weekly compounding would be LESS than (1.01)^52.

Assume that there is a 3% weekly volatility on an asset valued $1. We can visualize that a net loss occurs when when a 3% positive return is followed by a 3% negative move of $1.03.

See Neil A. Chriss' Black-Scholes and Beyond for more details behind the math.

Leverage
 
We can now see that applying leverage to a trading strategy does not necessarily increase expected risks more than the expected returns. This is also apparent in the performance of leveraged ETFs.

An example of exploiting this phenomenon

A theoretical inefficeincy exists if one was to sell short a leveraged ETFs/ETNs, hedged with unleveraged ETFs of identical underlyings. Of course it would still have to overcome transaction costs and product dependent limitations around shortselling. 

Saturday, May 11, 2013

VIX Options Trading

Here's a look at the last 6 months of VIX options implied index against realized (index). Looks pretty easy to trade: buy low + sell high.

Candle Bars: VIX Index Implied Volatility Index
Blue Line: VIX Index Realized Volatility

*The last bar reaching infinity is obviously not a trade-able value.

Thursday, May 2, 2013

Risk limits are simple and effective

There is so much focus on finding opportunities for a positive E(PnL) (statistically expected Profit & Loss) that risk management research effort has become unsexy. Analyzing historical trading performance, I've noticed that setting daily risk limits would have improved over all returns significantly. The fact remains that effective risk management can actually improve business performance over time.





Positive kurtosis in financial returns

Empirically evidenced, financial return distributions, individual products or spreads, tend to display very positive kurtosis which suggests heavy tails. That is to say, average prices move turn-around points are impossible (for most of us) to predict with accuracy over time, hence the "falling knife" phrase for those trying to buy the bottoms or sell the tops.

Therefore, if a position displays an unrealized net loss and is left alone, the momentum could keep moving until the trader loses his/her shirt. This is how some of biggest losing days I had experienced, and learned from.

Daily risk limits 

Applying a strict daily risk limit is simple to implement, effective over time, and puts you closer to a professional level. That means as soon as open positions reach a certain threshold intraday, everything must be liquidated/hedged to stop the bleeding. Even for buy & hold guys, a risk limit could have significantly reduced draw downs in high volatility periods.  


If this doesn't make sense, then it is pretty obvious that a deep understanding of stats is necessary to become a profitable trader.

Tuesday, April 30, 2013

A standard problem with businesse in the developed world

Sunday, April 28, 2013

"Micro Trading" racket invades New Zealand (OTC spot FX, reality, problems)

The New Zealand population is generally uneducated in areas of financial derivative trading, and now exploited for it by a wave of bucket shop (illegal in the US) "micro trading" BS campaigns. It has probably drawn a good number of desperate, lazy locals in search of fool's gold, and I hope to help those on the fence make a more informed decision about dumping money into these things.



Would it work, and make money?

Highly unlikely. 

Given that they have spent all this money on this aggressive marketing campaign, hints that they expect to make a higher return on the software sales effort than actual trading with the capital. Successful PROPRIETARY trading firms keep trading strategies discreet because inefficiencies become less profitable if they become exploited at higher volume. Nobody making good money trading would ever think of selling or making their trade(s) publicly known.

Those who are looking to raise money to trade proprietary, self-developed strategies tend to approach family, close friends, or take shots at smaller institutions.

About automated financial trading

Ironically, software automation often adds to operation liabilities than value due to bugs, crashes, hardware incompatibilities, etc. At the institutional levels, automation is only applied where manual trading isn't viable due to things such as speed requirements.  

About Spot FX trading 

These are some of the most liquid, efficient products in the world, and that is undesirable for the professional trader. The space is filled with smart institutional money, what little inefficiencies found are barely worth the work. Given the OTC nature of spot FX, the implied transaction costs alone would kill any profit potential for any serious trader.

Wednesday, April 3, 2013

Making friends in the industry



Going back the past few years where I had made the most development in professional trading, much of what I have gained, whether information or opportunities, resulted from practical, sometime harsh discussions with friends and associates in the field. Therefore it has become apparent that this business is still very much people dependent, not what I had imagined starting out, that I'd end up sitting alone in front of the computer in some dark room all the time.
 

Stress testing

Ray Dalio has mentioned his personal Principles to "beat the market", and this process requires additional minds for stress testing.

"

The pursuit of this goal (to beat the market) taught me:

1) It isn't easy for me to be confident that my opinions are right.
2) Bad opinions can be very costly.
3) The consensus is often wrong, so I have to be an independent thinker. 

so...

1) I worked for what I wanted, not for what others wanted me to do. 
2) I came up with the best independent opinions I could muster to get what I wanted. 
3) I stress-tested my opinions by having the smartest people I could find challenge them so I could find out where I was wrong. 
4) I remained wary about being overconfident, and I figured out how to effectively deal with my not knowing.
5) I wrestled with my realities, reflected on the consequences of my decisions, and learned and improved from this process. 

"

Go out there and make friends, preferably with smarter people.

Monday, April 1, 2013

Fundamentals of Trading Energy Futures and Options (Book Review)

Fundamentals of Trading Energy Futures and Options by Errera and Brown was one of the better books on the subject in my experience. Because the book was written as a guide for commercial entities' risk management objectives, it gives the reader some interesting ideas around the (possibly exploitable) behavior of large institutional trading.




Newbie friendly, straight forward instructional

The book assumes no former familiarities with energy commodities, and explains the mechanics of energy futures and futures options, covering mostly crude oil, natural gas, and associated derivative products. Unlike so many crappy quasi-sales books in the field, the authors do not advocate trading of energy futures or futures options, and instead take an impartial role.

Trading energy spreads

The authors did a great job going over the high volume exchange supported energy spreads e.g. crack, spark spreads, heating vs. gasoline, and etc. It is absolutely fascinating to learn the industrial processes that influence changes in spread values; this is the kind of information edge with potential for making money, with significantly more value than quantitative curve fitting empirical data. 


Other things I liked about the book

Like me, the authors also found little value from technical analysis, at least in the pure form. 


Over all the book is a great primer on energy derivatives.

Saturday, March 30, 2013

2 Decades of SPX Vols

Despite that this is only up to 2011, it gives a pretty feel for SPX vol term structure and is a beautiful work of art from Artemis Capital Management.

Volatility at World's End: Two Decades of Movement


Tuesday, March 26, 2013

Easy portfolio setup for a 2.37 Sharpe Ratio

The CBOE VARB-X (Volatility Arbitrage) Strategy Benchmark has reached a Sharpe ratio of 2.37-- significantly greater than the Sharpe Ratio for the S&P 500 for the same time period, as seen in the below graph.

* Technically it is more of a statistical arbitrage, since it's an unhedged bet, though with a very positive expectation.

Some basic relative performance stats for the period:

Average Annual Return Standard Deviation
     VARB-X 19.00% 6.40%
             SPX 8.30% 10.30%




It is simple to replicate, by following the setup described in the Strategy Benchmark Paper.

1) Keep 80% of the portfolio cash.
2) Short and hold Variance Futures, roll with each expiration.

Ways to avoid the volatility spikes (drawdowns)

1) Apply a volatility filter
2) Use volatility forecasts for position size adjustment. You can do this in Excel, or off a 3rd party such as NYU V-Lab


Thursday, March 21, 2013

Gamma/Theta Relationship for FX Options

I approach expected option PnL (Profit & Loss) from a holistic approach. Similar to the former post on Expected PnL, i.e. E(PnL) of delta hedged stock options (link), here is the basic estimate for the 24hour E(PnL) for delta neutral FX Options:

Source: Foreign Exchange Derivatives: Advanced Hedging and Trading Techniques
(You're welcome)

Given the following variable definitions:

Sigma: Average Realized Volatility for the life of the trade
S: Underlying FX spot value
Gamma: Option Gamma
r(d): Domestic risk free rate
r(f): Foreign risk free rate
Delta: Option delta
Theta: Option Theta
V: Value of Options (straddles, strangles, etc.)


So how do we use this?

Estimate a RANGE of the coming day's estimated realized vol, and you would find the rough break-even, most-likely points of E(PnL).

Tuesday, March 19, 2013

What's the deal with Barrier Options?

Barrier options offer several interesting benefits to professional traders with increased cost-effectiveness and complex hedging needs, and they can be statically replicated with vanilla options. Today we look at the basic payoff structure of an “up-and-out Call”, and replication with vanilla options so to avoid OTC transactions.

Payoff structure of an Up-and-Out Call Option
Examples are from Static Options Replication by Derman, Ergene, and Kani.

Given that
Underlying
100
Strike
100
Barrier
120
Rebate
0
Time to Expiration
1 Year
Dividend Yield
5%
Expected Volatility
25%
Risk-Free Rate
10%

We get the following option values
Up-and-Out Call
0.656
Vanilla Call
0.114

Payoff diagram








Replication with vanilla options
The key to replication is about matching theoretical payoffs at various future underlying values so that the portfolio behaves like the barrier option. See the Goldman Sachs Research Note for detailed notes. I will leave the replication for the example Up-and-Out Call here,

Quantity
Strike
Expiration
Values
0.16253
120
2
0.0001
0.25477
120
4
0.018
0.44057
120
6
0.106
0.93082
120
8
0.455
2.79028
120
10
2.175
-6.51351
120
12
-7.14
1
100
12
6.67


Total Cost
2.284