TradingView
DojiEmoji
7 de Set de 2021 14:07

Drift Study (Inspired by Monte Carlo Simulations with BM) [KL] 

Tesla, Inc.NASDAQ

Descrição

Inspired by the Brownian Motion ("BM") model that could be applied to conducting Monte Carlo Simulations, this indicator plots out the Drift factor contributing to BM.

Interpretation: If the Drift value is positive, then prices are possibly moving in an uptrend. Vice versa for negative drifts.

Notas de Lançamento

  • Code clean up
  • Added option to show/hide repaint
Comentários
Mohamed3nan
in the drift equation, why you multiply *0.5 ?!
DojiEmoji
@Mohamed3nan, In the formula "avg. log returns minus half its variance", we multiple variance by 0.5 because we assume historical data to be less relevant for the purpose of predicting future values. Under this assumption, we adjust the variance component by removing out half the data that we have observed.

The formula was straight out from the textbooks. To conceptualize it, I think about it by referring to the principles, i.e sample-variance formula ∑i_n(x_i-x_bar)^2/(n-1); in a large dataset, if you replace half the observed x_i with zeros while keeping n and x_bar constant, then the new variance would approximate 0.5 of its original.
Mohamed3nan
@DojiEmoji, thank you friend, tbh i didn't get it exactly, but at least I know now I can not play with this "0.5" value,
I try to normalize drift to find a relation for signals for different assent, this is the formula:

mormalized_zero = (2)* ((0-drift-lowest(drift,len_drift*100))/(highest(0-drift,len_drift*100)-lowest(0-drift,len_drift*100))) - 1

normalized_drift = (2)* ((drift-lowest(drift,len_drift*100))/(highest(drift,len_drift*100)-lowest(drift,len_drift*100))) - 1

Mais