Before you start
What this module changes in your trading process.
Calculate total return, CAGR, and annualized volatility.
Returns alone are misleading. Build the metric vocabulary needed to balance reward and risk and compare strategies fairly.
Module outline
Before you start
Calculate total return, CAGR, and annualized volatility.
Lesson 1
Menghitung return total, CAGR, dan volatilitas tahunan.
Mulai dari yang mendasar: • Return total: pertumbuhan modal dari awal ke akhir. • CAGR (Compound Annual Growth Rate): return tahunan setara — menormalkan periode berbeda agar bisa dibandingkan. CAGR = (akhir/awal)^(1/tahun) − 1. • Volatilitas: simpangan baku return, ukuran fluktuasi. Ditahunankan dengan mengalikan simpangan baku harian dengan akar jumlah periode per tahun (mis. √252 untuk harian saham).
Example code: import numpy as np ann_return = (equity[-1]/equity[0])**(252/len(equity)) - 1 ann_vol = daily_ret.std() * np.sqrt(252) Return tanpa risiko = setengah cerita Strategi A dan B sama-sama 20% setahun, tetapi A berayun liar dan B mulus. Keduanya tidak setara. Selalu pasangkan return dengan ukuran risiko.
Example
import numpy as np ann_return = (equity[-1]/equity[0])**(252/len(equity)) - 1 ann_vol = daily_ret.std() * np.sqrt(252)
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
Menafsirkan rasio risiko-imbal hasil: Sharpe, Sortino, Calmar.
Metrik ini menggabungkan return dan risiko menjadi satu angka: Metrik Inti Catatan Sharpe (return − bebas risiko) ÷ volatilitas total Paling umum; menghukum semua volatilitas Sortino Return ÷ volatilitas sisi bawah saja Tidak menghukum volatilitas naik Calmar CAGR ÷ max drawdown Fokus pada nyeri terburuk Sebagai kasar: Sharpe < 1 lemah, ~1–2 layak, >2 sangat bagus (dan patut dicurigai jika dari backtest ritel — sering tanda overfitting/biaya diabaikan).
Maximum drawdown (MDD) Drawdown adalah penurunan dari puncak ekuitas sebelumnya. Max drawdown adalah yang terdalam — mengukur skenario terburuk yang harus Anda tahan. MDD 50% berarti modal pernah separuh lenyap; secara psikologis & matematis berat (butuh +100% untuk pulih dari −50%). Example code: cummax = equity.cummax() drawdown = equity/cummax - 1 max_dd = drawdown.min() # nilai negatif terdalam
Example
cummax = equity.cummax() drawdown = equity/cummax - 1 max_dd = drawdown.min() # nilai negatif terdalam
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
Mengukur risiko penurunan: maximum drawdown dan durasinya.
Selain kurva ekuitas, kita menilai kualitas tiap trade: • Win rate: persentase trade menang.
Tinggi tidak selalu baik — strategi bisa menang 80% tetapi rugi besar saat kalah. • Average win / average loss (payoff ratio): rata-rata untung dibanding rata-rata rugi. • Profit factor: total profit ÷ total loss. >1 berarti menguntungkan; ~1.3–2 umumnya sehat. • Expectancy: ekspektasi profit per trade = (win rate × avg win) − (loss rate × avg loss). Inilah "edge" rata-rata Anda.
Example code: # Expectancy per trade exp = (win_rate * avg_win) - (loss_rate * avg_loss) # Contoh: 40% menang, avg win 2R, avg loss 1R # exp = 0.4*2 - 0.6*1 = 0.2R -> positif meski win rate Win rate vs payoff Strategi trend-following sering punya win rate rendah (banyak rugi kecil) tetapi expectancy positif karena beberapa kemenangan besar. Jangan menilai strategi hanya dari win rate.
Example
# Expectancy per trade exp = (win_rate * avg_win) - (loss_rate * avg_loss) # Contoh: 40% menang, avg win 2R, avg loss 1R # exp = 0.4*2 - 0.6*1 = 0.2R -> positif meski win rate < 50%
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 Performance and Risk Metrics: 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
A bad backtest is more dangerous than no backtest. Learn honest testing practices and the biases that must be avoided.
Next module
Indicators transform price data into features. Learn the main indicator families, how to program them, and common implementation mistakes.
Risk note: Metavulus learning content is for education and market preparation only. It is not financial advice, investment advice, or a trading recommendation.