本文為高曼計量參加「彭博 2021 年台灣金融黑客松」的參賽心得，主要聚焦於比賽的進行方式以及我們所推出的 app「主力佈局水晶球」背後的理論與技術。透過機器學習的技術擴展 Max-pain Theory 的實用性，並設計出 MPT Strength 指標來量化主力的籌碼脈動。
Max-pain Theory, also known as option pain, is a theory for open interest analysis.  states that it emerged in 2004 and is a very young theory with little academic research.
From the definition, it’s clear that there is a major assumption of Max-pain Theory: sellers and market makers have more dominant power than buyers for spot price in the option market. Under this assumption, on the expiration date of option contract, sellers and market makers tend to control the spot price at the level that is most disadvantageous for buyers, that is, to make the value of most option contracts zeroed out.
Overall, the Max-pain Theory itself is not directly applicable in the market. We have made the following adjustments to make Max-pain Theory much more accurate and practical.
In data preprocessing stage, open interest data is separated into old and new increments on a weekly/monthly basis. The purpose of this stage is to reduce the impact of calendar spread positions and extract the open interest that reflect the real buyer/seller defined by Max-pain Theory.
Projected Max-pain Price (Projected MPT)
We found that the direction of shifting in max-pain price’s time series is a very useful piece of information in determining the actual settlement price. Hence, we introduced an Gamma Robust Linear Model to take the distribution and frequency of these changes into account, which is the core of adaptive look-back window— the technique of automatically determining the length of data used in the model, to transform the plain max-pain price into the projected max-pain price, which is the price level with higher predictive power for actual settlement price.
We are not only concerned with how max-pain price changes for a certain option contract, but also with the change of “structure” of max-pain price, which is a series of max-pain prices across all available option contracts (from nearby month to back month). MPT Strength indicator is designed to capture all the shifting and structural changes by adding different weightings on each contract based on their time to expiration with the inspiration from  ‘s the Center of Gravity Oscillator..
 Govindasamy, P., & Ravimohan, M. R. ANALYTICAL STUDY ON MAX PAIN THEORY AND PCR IS THE NOVEL STRATEGY IN OPTIONS TRADING.
 Ehlers, J. F. (2011). Cybernetic analysis for stocks and futures: Cutting-Edge DSP Technology to Improve Your trading (Vol. 202). John Wiley & Sons.
AVP Quantitative Finance, Gamma Paradigm
Contact us at email@example.com if you want to know more.