Before you start
What this module changes in your trading process.
Build mean-reversion logic with z-scores and extreme bounds.
Apply statistical foundations to practical quant strategies including mean reversion, pairs trading, cross-sectional momentum, and factor investing.
Module outline
Before you start
Build mean-reversion logic with z-scores and extreme bounds.
Lesson 1
Membangun logika mean reversion dengan z-score dan batas ekstrem.
Mean reversion bertaruh bahwa harga yang menyimpang jauh dari "nilai wajar"-nya cenderung kembali. Alat umum: z-score — seberapa jauh (dalam simpangan baku) harga dari rata-rata bergeraknya.
Example code: mean = df["close"].rolling(20).mean() std = df["close"].rolling(20).std() df["z"] = (df["close"] - mean) / std # Logika: jual saat sangat tinggi, beli saat sangat rendah df["pos"] = 0 df.loc[df["z"] > 2, "pos"] = -1 # overextended ke atas -> short df.loc[df["z"] long df["pos"] = df["pos"].shift(1) Mean reversion bekerja di pasar range-bound tetapi berbahaya saat tren kuat ("jangan tangkap pisau jatuh").
Karena itu sering dipasangkan filter rezim & stop yang ketat. Risiko ekor Strategi mean reversion sering punya banyak kemenangan kecil dan sesekali kerugian besar (saat harga terus menyimpang). Manajemen risiko & stop menjadi krusial agar satu kejadian tidak menghapus banyak kemenangan.
Example
mean = df["close"].rolling(20).mean() std = df["close"].rolling(20).std() df["z"] = (df["close"] - mean) / std # Logika: jual saat sangat tinggi, beli saat sangat rendah df["pos"] = 0 df.loc[df["z"] > 2, "pos"] = -1 # overextended ke atas -> short df.loc[df["z"] < -2, "pos"] = 1 # overextended ke bawah -> long df["pos"] = df["pos"].shift(1)
Key points
Practice checkpoint
Apply this lesson to one market you actually watch. Write the rule, the data needed, the risk check, and the condition that invalidates the idea.
Before continuing
Lesson 2
Menjelaskan pairs trading berbasis kointegrasi (statistical arbitrage).
Pairs trading memanfaatkan dua aset yang kointegrasi (QUANT 206): saat spread keduanya menyimpang dari normal, long yang tertinggal & short yang unggul, bertaruh spread menyempit kembali. • Temukan pasangan kointegrasi (mis. dua saham sesektor, dua exchange untuk aset sama). • Hitung spread & z-score-nya. • Buka posisi saat z-score ekstrem, tutup saat kembali ke nol.
Daya tariknya: bisa market-neutral — untung dari hubungan relatif, relatif kebal arah pasar keseluruhan. Inilah bentuk dasar statistical arbitrage yang diperluas ke banyak aset. Saat hubungan pecah Risiko terbesar pairs trading: kointegrasi yang dulu stabil bisa runtuh (mis. salah satu perusahaan berubah fundamental). Saat itu spread tidak kembali — ia melebar terus.
Validasi ulang hubungan & batasi risiko per pasangan.
Example
Practical example: Pairs trading: long-short pada pasangan kointegrasi saat spread menyimpang.
Key points
Practice checkpoint
Apply this lesson to one market you actually watch. Write the rule, the data needed, the risk check, and the condition that invalidates the idea.
Before continuing
Lesson 3
Memahami momentum cross-sectional (relative strength) lintas aset.
Momentum cross-sectional (relative strength) memeringkat banyak aset berdasarkan kinerja masa lalu, lalu long yang terkuat & short yang terlemah. Berbeda dari momentum time-series (ikut tren satu aset), ini membandingkan aset satu sama lain .
Example code: # Konsep: peringkat momentum 3 bulan lintas aset mom = prices.pct_change(63) # ~3 bulan rank = mom.rank(axis=1, pct=True) # peringkat lintas aset per tanggal longs = rank > 0.8 # 20% teratas shorts = rank Investasi faktor Faktor adalah karakteristik yang secara historis menjelaskan return: value (murah vs mahal), momentum , quality , size , low-volatility .
Strategi faktor menyusun portofolio yang condong ke faktor-faktor ini. Banyak strategi institusional adalah kombinasi faktor yang terdiversifikasi. Diversifikasi sinyal Sama seperti diversifikasi aset, mengombinasikan beberapa sumber edge yang tidak berkorelasi (mis. tren + mean reversion + faktor) sering menghasilkan kurva ekuitas lebih halus daripada bergantung pada satu sinyal.
Example
# Konsep: peringkat momentum 3 bulan lintas aset mom = prices.pct_change(63) # ~3 bulan rank = mom.rank(axis=1, pct=True) # peringkat lintas aset per tanggal longs = rank > 0.8 # 20% teratas shorts = rank < 0.2 # 20% terbawah
Key points
Practice checkpoint
Apply this lesson to one market you actually watch. Write the rule, the data needed, the risk check, and the condition that invalidates the idea.
Before continuing
Fieldwork
Build one worksheet for Advanced Quantitative Strategies: state the market, the rule, the data input, the risk limit, the validation check, and the review note before using it live.
Glossary
Checkpoint quiz
Quiz results can add XP when you are signed in.
Progress action
Marking complete saves the module, updates streak activity, and awards XP only once per module.
Previous module
Wrong validation is the fastest way to fool yourself with ML. Learn validation techniques specific to financial time series.
Next module
Survey modern AI techniques in trading, where they can help, and where they are often over-promoted.
Risk note: Metavulus learning content is for education and market preparation only. It is not financial advice, investment advice, or a trading recommendation.