퀀트는 어떻게 전략을 만드는가, 3부작

1.
Quandl. 오픈데이타를 수익모델로 한 기업입니다. 오픈소스에서 오픈데이타로에서 보았던 Quandl은 사실 부러운 기업이었습니다. 한국에서 거의 불가능한 수익모델이었기때문입니다. 1년이 지난 현재 Quandl은 자리를 잡은 듯 합니다. 해외의 알고리즘전략중 quandl 데이타를 이용한 것들이 자주 눈에 띄기 때문입니다.

Quandl이 너무 재미있는 인터뷰기사를 올렸습니다. 3부작입니다.

A Quant’s Approach to Building Trading Strategies: Part One
A Quant’s Approach to Building Trading Strategies: Part Two
A Quant’s Approach to Building Trading Strategies: Part Three

첫회가 나왔을 때부터 Linkedin 등에 아주 많은 관심을 받았던 기사입니다. 인터뷰이(interviewee)는 대형자산운영사의 포트폴리오 책임자라고 합니다.

Quandl interviewed a senior quantitative portfolio manager at a large hedge fund. We spoke about how she builds trading strategies–how she transitions from an abstract representation of the market to something concrete with genuine predictive powers.

아래는 1부와 2부에 실린 질문입니다.

Can you tell us how you design new trading strategies?
What do you mean by “formal research”? And why is it necessary?
What steps do you include in your formal research process?
So, you strictly separate in-sample and out-of-sample; you blind yourself to date ranges; you use Monte Carlo to avoid starting-point biases; and you try various robustness tricks. What else do you do to ensure that you’re not fooling yourself?
That sounds comprehensive. What happens next?

What does moving into production entail?
How long does this entire process take?
Are you ever worried that the model-based opportunities you strive to capture will disappear for good?
Where do you get ideas for new models or trading strategies?
It sounds like you use a lot of tools – Mathematica, Matlab, Python, Excel, C. Is that deliberate?
How do you manage the data flow for all these stages and tools?

2.
개인적으로 1부에서 인상적인 부분은 Equation과 Formal Research입니다. Equation은 첫번째 질문에 등장합니다. 전략 디자인의 첫단계입니다.

It all starts with a hypothesis. I conjecture that there ought to be a relationship between two instruments, or maybe there’s a new instrument in the market that’s gaining popularity, or maybe there’s an unusual macroeconomic factor I’ve discovered that drives micro pricing behavior. So I write down an equation – a model, if you like – that aims to capture this relationship. Typically it’ll be some sort of process equation that shows how the variables evolve over time, with a random (stochastic) component.

Formal Research는 전략 디자인의 다음단계로 위험를 최소화하고 전략 혹은 모형을 객관화하는 단계입니다. 이 단계에서 가장 중요하게 여기는 부분은 데이타의 무결성(Data integrity) 혹은 데이타의 오염(Data contamination)이라고 합니다.

Early on, my biggest fear is data contamination. History is a limited resource; once you’ve run out of historical data to test against, you can’t generate any more. I’m paranoid about not exhausting my supply of uncontaminated out-of-sample data.

So I start by dividing my historical data into non-overlapping chunks. I then randomize so that even I don’t know which chunk is which. (This guards against subconscious biases: for instance, being risk-averse when I know my test dataset is 2008, or being risk-seeking in 2009).

I designate one chunk as my calibration set. I usually use Python for calibration: I use their built-in optimization libraries and have written a few of my own. In this particular example, my parameters are constrained and correlated. So I use a 2-step optimization process called the EM algorithm. Optimizers can be sensitive to initial conditions, so I use Monte Carlo to choose a number of starting points in the solution space. All of this is quite easy to do in Python.

The result of this calibration should be a set of “model parameters” – numerical values – that can be combined with actual market observations to predict other market prices.

2부의 주제는 ‘production’입니다. 저는 Speed라는 단어가 중요해 보였습니다.

Another aspect of production is that speed is critical. I can’t fit my model to market data in real time (gradient descent is slow!) so instead, I have to reduce everything to linear approximations of changes. This entails a lot of matrix manipulation.

댓글에 비슷한 의미의 문장이 있습니다.

Make no mistake; once you’ve found a new source of alpha, the clock is ticking. You’re in a race to extract as much PL as possible before the opportunity fades away.

‘Where do you get ideas for new models or trading strategies?’라는 질문에 긴 답을 주었습니다. 역시나 출발점이면서 가장 중요한 것은 데이타입니다.

First, data. If you have a new or obscure source of data which anticipates the market in some way, that’s the easiest way to generate alpha. These days especially there are a ton of interesting new data sources out there: startups collecting new datasets; analytics firms with predictive indicators; large corporations with “data exhaust” that we can mine; and aggregators like Quandl to bring them all together. I’m always on the lookout for interesting, unusual and predictive datasets.

마지막 3부는 독자의 질문입니다. 질문중 전략의 Life Cycle과 관련한 것이 있습니다. 쉽지 않다고 합니다.

3. How do you determine if the model is dead or just having a bad time? Do you know of any useful predictive regime change filters?

This was the single most commonly asked question. And I’m afraid I’ll have to disappoint everyone: I don’t know the answer. I wish I did!

For me, I use a variety of rules of thumb. Statistical tests to make sure the meta-characteristics of the model remain intact. Anecdotal evidence of capital entering or leaving the market. Other people’s positions and pain. Price action: is it nervous and choppy, or dull and arbed out? And so on.

I’ve yet to find a reliable, universal, predictive (or even contemporaneous) indicator of regime change/model death. Sad, but true.

4. Model deaths seem to last a period of years then come back better than ever sometimes. Do you keep tracking “dead” models and will you bring them back after a “revival”?

Absolutely, and this is a great point. Models do come back from the dead. US T-note futures versus cash is a classic example: it cycled between “easy money”, “completely arbitraged out”, and “blowup central” three times in my trading career. Same science in each case; all that changed was the market’s risk appetite. So I never say goodbye to a model forever; I have a huge back catalogue of ideas whose time may come again.

3.
트레이딩을 관계하지만 정량적으로 전략을 만들어 프로덕션(실거래)까지 책임을 지지 않습니다. 아주 일부부만을 책임집니다. 글을 읽으면서 ZeroAOS의 가치(Value)가 어디에 있을까 생각해보았습니다. 저는 두가지입니다.

첫째는 Production Speed입니다. 적시생산(JIT, Just In Time)이라는 표현을 자주 사용합니다. 모든 전략은 생성과 소멸을 하기때문에 기회를 포착했을 때 빨리 적용하는 것이 이익을 높이는 방법이라고 생각하고 ZeroAOS가 이런 시간을 단축시킬 수 있다고 생각합니다.

둘째는 Design과 Research에 집중입니다. ZeroAOS는 본질적으로 실거래 매매를 위한 시스템입니다. 즉, Production을 위한 시간을 분산하고 줄여서 퀀트가 다른 업무에 집중할 수 있도록 도움을 주는 시스템입니다.

앞서 매매 아이디어를 어디에서 얻는지. 이 질문에 대한 마지막 답변은 아래와 같습니다.

I just keep my eyes and ears open. The world is a pretty inefficient place; if you’re inquisitive and keep asking “why? / why not?”, you will always find opportunities.

알파고가 첫대국에서 이세둘 9단에게 불계승을 거두었습니다. 기계가 인간을 압도하고 있다는 반응입니다. 그렇지만 아직 인간의 몫이 있습니다. 바로 ‘생각(thinking)’입니다.

“why? / why not?”

생각의 시작은 질문입니다.

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.