ラベル

AI Forecast 8306MUFG (215) Social (75) life (70) Financial (62) IT (57) Proposal (56) idea (50) Fund Management (48) Trading (43) economics (42) Covid-19 (40) AI (38) Hedge Fund (36) Risk (36) Culture (31) BOJ (29) Science (26) hobby (24) accounting (17) Apps (16) career (11) job (7) Travel (6) Hiking (5) emotion (5) music (3) Statarb (2) piano (2)

2019年6月20日木曜日

統計的裁定(StatArb)ポートフォリオの例 StatArb (Statistical Arbitrage) Sample Portfolio

統計的裁定(StatArb)

ポートフォリオの例

English follows


統計的裁定ポートフォリオの簡単な例を見てみよう。

下図のように、東京証券取引所(TSE)上場の1812鹿島(建設)6103オークマ(工作機械)7951ヤマハ( 民生機械)を取り上げてみる。


ここで、この時系列の株価の共分散行列は次のようになる。 


固有値、固有ベクトルは、次のようになる。


固有値が最大の有為なモードの固有ベクトルを見ると、(0.32, 0.46, 0.83)と、同一方向への振れとなっている。これは、株1812が0.32動くと、株7951が0.83動く、即ち2.6倍動く(=0.83/0.32)ことが多いことを示唆している。散布図(下図)を見ても、傾きがおおよそ2.6倍になっていることが確認できる。


ここで注意するべきは、この固有ベクトルに時間軸はないことだ。解析対象は観測した母集団全体の平均値からの偏差のみである。この結果から周期性は分からない。よって時間軸の情報はないので、相場の時間軸上のタイミングも分からない。

一つの単純なペアトレードのスキームとして、株1812の一日の動きの2.6倍だけ株7951が動くことが多いことを利用して、乖離が激しい場合、さやが開いたと判定し、ポジションを立てる(取引を開始する)。2次元以上の場合も同様である。

この例だと、1月18日に株1812が57円下がっているため、株7951は151円下がるはずなのが、実際は10円上がっている。なので、乖離は161円で、仮に設定した閾値100円を超過している。よって、株1812は、株7951から見ると下がりすぎ(本当は上昇してほしい)だ。結果として作るポジションは下がりすぎの株1812を買って、見合いの株7951を売るものになる。1単位買った株1812のCF(キャッシュフロー)はマイナス、空売りした株7951のCFはプラスである(証拠金は省略)。空売りする株7951の単位数は、株7951の相対感度2.6で割ることで作ったポジションを市場中立にする。立てたポジションの反対売買執行条件は、乖離が逆方向に閾値-100円を超えて動いた場合である。

リスク量はシステミックリスクをオフセットする市場中立型であるため、アウトライトよりシステミックリスク部分だけ少ないスプレッドリスクのみである。

なお、ここで考慮していない事項をランダムに列記した。

1)証拠金の金利コスト、もろもろの市場・決済規制
2)流動性チェック(ポジション量は一日当たり平均取引高の1/100程度など)
3)注文タイミング(終値ベースで注文翌日成り行きなど)
4)時間軸(ミリ秒か、1時間か、1日か、観察時間など)
5)複数銘柄、複数資産からテストランを行い、有為な資産の組み合わせを選択する処理
6)システム対応(グローバルリアルタイムモニタリング&自動運用など)
7)閾値および損切レベルのシミュレーションによる最適化
8)ファンダメンタルズ分析(固有ベクトルの論理的理由がもし分かれば)
9)市場価格の正規化(価格が桁違いの商品の組み合わせの場合など)



Stat Arb (Statistical Arbitrage)  Sample Portfolio


Let's look at a simple portfolio of Stat Arb.

As shown below, we take TSE(Tokyo Stock Exchange) listed stock 1812 Kajima (construction), stock 6103 Ohkuma (mother machinery) and stock 7951 Yamaha (retail electronics/machine).


Here, co-variance matrix of stock price is calculated as below.


Corresponding eigen values and eigen vectors are shown below.


If we look at the eigen vector with maximum eigen value with maximum significance, (0.32, 0.46, 0.83) indicates the variation to same direction. This means if stock 1812 moves times 0.32, then stock 7951 moves times 0.83, i.e., tends to move 2.6 times (= 0.83/0.32).  Same can be observed in scatter plot below indicating gradient of around 2.6 times.


Need to be careful here that there is no time axis context to this eigen vector.  Object of analysis is a deviation from average only in the observed population. Thus, there is no time axis information, nor market entry timing information. 

One simple trade scheme on pair trade basis here is to trade by making use of 2.6 times bigger sensitivity of stock 1812 compared to stock 7951. If deviation of real price change from statistical change is bigger, judge that spread is widened, then create position (start trading). All these apply the same for the case where dimensions are higher than two here. 

In this example, stock 1812 dropped JPY57 on Jan 18th, hence stock 7951 should have dropped JPY151 (=57*2.637) however, it has gone up JPY10 instead. Hence deviation is JPY161 and exceeding the temporal threshold set as JPY100.  Thus, position to be created is to buy oversold stock 1812 and short-sell corresponding stock 7951. The CF (Cash Flow) for 1 unit buy of stock 1812 is minus, while CF for short sold stock 7951 is plus (ignoring margin). The units of short sold stock 7951 should be divided by relative sensitivity of 2.6 to make final position(portfolio) to be market neutral. The condition for portfolio unwinds is the deviation of market to opposite direction over threshold level of -JPY100.

Risk amount is less than outright portfolio for systemic risk due to offsetting nature of portfolio leaving only spread risk.

Put some notes below in random to be considered but not touched here.

1) Interest rate cost for margins, rules and regulations of market
2) Market liquidity check (such as position size limit < 1/100 of daily volume)
3) Order timing (use end of day price to decide, then trade next morning etc)
4) Scope of time span (millisecond or hour or day, observation period etc)
5) Workflow to choose multiple assets, names, and test to decide portfolio
6) System development (such as for global real time monitoring & auto trading)
7) Threshold to judge buy/sell as well as threshold to decide loss cut
8) Fundamental analysis (on the composition of eigen vector)
9) Normalization of market price (when combining numbers in different scale)