➡️ Quantitative Finance from Scratch, part 52: Kalman Filter.
QuantFinanceToGo
TikTok profili40 B takipçi
41.700 görüntüleme #quantfinance #kalmanfilter #algorithmictrading
➡️ Quantitative Finance from Scratch, part 52: Kalman Filter. The Kalman filter estimates a value you cannot see directly from measurements that are full of noise. It runs in GPS receivers, self driving cars and rockets. In finance it tracks values like a fair price or a hedge ratio that slowly change over time. The input is a stream of measurements, for example the price on the screen. Each measurement is the hidden true value plus some random noise. The output is a best guess of the true value together with a number for how unsure the filter is. Every step has two parts. Predict: before the new price arrives, the filter expects it at its last guess and becomes a little less sure (P + Q). Update: the new price arrives, the filter looks at the difference and moves its guess only part of the way toward it. How far is set by the Kalman gain K = P / (P + R), where P is the uncertainty of the guess and R is the noise in the measurement. K always lies between 0 and 1. Noisy measurements give a small gain, an uncertain guess gives a gain close to 1, and after every update the uncertainty shrinks again. Q sets how fast the true value can drift: a large Q reacts quickly but the line gets jumpy, a small Q gives a smooth line that reacts slowly. Rudolf Kalman published the method in 1960 ("A New Approach to Linear Filtering and Prediction Problems"), and a few years later it helped navigate the Apollo spacecraft. The code (kf_reel.py, 16 lines of Python) is general on purpose: predict, update, the filter loop over all measurements, and one step for a hedge ratio. If you want to go deeper, check out the full course I built: quantfinancetogo.com #quantfinance #kalmanfilter #algorithmictrading #statistics #python Education only, not financial advice.
Yorumlar
Yorumlar TikTok üzerindeki orijinal gönderiden alınmıştır
Henüz yorum yok
