Machine learning in trading: theory, models, practice and algo-trading - page 3732
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Almost identical tasks
Asking deepseek,
how to denounce random wandering from the actual quote of an asset.
we get an answer:
Excellent question. Distinguishing between random walk and real asset dynamics is one of the key tasks of quantitative analysis and testing efficient market hypotheses.
Here's acomprehensive approach on how to "denounce" random walk, broken down into steps and methods.
1. Philosophical and economic background: what are we looking for?
Random walk (in its weak form) assumes thatsuccessive price changes are independent and identically distributed ( IID). Its logic:
Null hypothesis (H₀): Market is efficient, price follows random walk. Any apparent regularity is random.
Alternative hypothesis (H₁):There are predictable components to price dynamics (autocorrelation, trends, volatility clustering, etc.).
Your goal is to disprove H₀ with statistically significant evidence.
2. Key "denunciation" techniques
А. Tests for randomness and independence of increments (returns)
This is a test of the very nature of random walk.
Autocorrelation test (ACF) and Ljung-Box test:
What it does: Checks if there is a correlation between today's and yesterday's (the day before, etc.) returns.
How to "denounce": Find statistically significant autocorrelations (outside the confidence limits) for the first few lags. The Ljung-Box test gives a p-value. If the p-value < 0.05, we can reject the hypothesis of no autocorrelation.
Important: In real assets, the autocorrelation of returns is often close to zero (which supports the hypothesis), butabsolute returns or squares of returns ( proxies for volatility) have strong autocorrelation - this is already a deviation from simple random walk.
Runs Test:
What it does: It analyses the sequence of earnings signs (+ or -). Too long a series of consecutive rising or falling days, or conversely, too frequent changes of sign is a sign of non-randomness.
How to "denounce": Get the Z-statistic. If |Z| > 1.96 (for 5% level), we reject the hypothesis of randomness.
Test for normality of the distribution of returns (Jarque-Bera, Shapiro-Wilk):
What it does: Tests whether returns are normally distributed. Random walk with normal innovations yields normal returns.
How to "denounce": Real returns almost always have"heavy tails" ( extreme events occur more often than in a normal distribution) and oftenasymmetry. The low p-value in the Jarque-Bera test is evidence against normality and simple random walk.
B. Unit Root Tests (Stationarity Tests)
Random walk is aunit root ( non-stationary)process.But this is too broad a class. We need to check if the process isstationary around a trend.
Extended Dickey-Fuller Test (ADF Test):
What it does: Tests the hypothesis of a unit root (H₀: the process is non-stationary) against the alternative of stationarity.
How to "denounce":Weneed to be careful here. If we reject the unit root (p-value is low), it means that the process isstationary and hasmean reversion to its mean - this is a strong departure from random walk, where the "shock" has a permanent effect.
Phillips-Perron Test (PP Test):
An analogue of the ADF, but more robust to various forms of heteroskedasticity and autocorrelation in the errors.
C. Search for "traces" of real market phenomena
Random wandering does not know these phenomena. Their detection is a direct "denunciation".
Volatility Clustering:
How to look for it: Plot the returns. Periods of high volatility are clearly clustered over time. Compute the autocorrelation function for thesquares ofthereturns ( or absolute values). A significant positive correlation at many lags is clear evidence of clustering.
What this means: the Process is not an IID. It is the basis forARCH/GARCHtype models.
Volume-Price Relationship:
How to look for: Examine the correlation between trading volume and the absolute value of price change. In a random walk, there is no volume. In reality, the correlation is almost always strongly positive.
A Granger causality test can show whether volume predicts future volatility.
"Day-of-week effect", "January effect", and other calendar anomalies:
How to look for: Conduct a regression analysis where returns are the dependent variable and the dummy variables for days of the week are the independent variables.
Statistically significant coefficients (e.g., negative average returns on Mondays) are an anomaly that does not fit within random walk.
3. Practical plan of action
Collect data: Daily or intraday closing prices of the asset. Calculate logarithmic returns: r_t = ln(P_t / P_{t-1}) .
Visual Analysis:
Construct a graph of prices and returns.
Note the clustering of volatility in the plot of returns.
Plot the histogram of returns with the normal distribution curve superimposed (with the same mean and标准差). You will see the "heavy tails".
Basic statistical tests:
Calculate descriptive statistics:skewness ( skewness ) and kurtosis (kurtosis). An excess >3 (for a normal distribution =3) will indicate heavy tails.
Perform the Jarque-Bera test for normality.
Construct ACF for returns and for squares of returns (up to 20-30 lags). Interpret.
Runs Test.
Advanced Tests:
Conduct ADF test ( including constant and trend in the specification if they are visually apparent in the price chart).
If structural breaks are suspected (e.g. after a crisis), use theZywot-Andrews test.
Specific search for anomalies:
Check correlation with volume.
Check calendar effects (requires long time series for reliability).
Important caveats (Disclamer).
"Oblique" completely is impossible. You can onlyreject the hypothesis of random walk with a certain degree of confidence (e.g. 95%). There is always the possibility that you are observing a rare realisation of a random process (1st kind error).
Even after finding outliers, it may not be possible to use them for stable profits. Transaction costs, risks, variability of effects over time can "eat up" all the theoretical profits from a strategy based on an anomaly.
Random walk is a useful basic model. Even if the real asset does not match it, the model serves as an important benchmark for evaluating the difficulty of prediction.
A brief checklist conclusion
If your asset exhibitssimultaneous:
Heavy tails in the distribution of returns.
Significant autocorrelation of squares of returns ( volatility clustering).
Failure to meet any randomness tests ( Runs Test, ACF for signs).
Statistically significant calendar anomalies or correlation with volume,
then you can state with a high degree of certainty that its dynamics aredifferent from simple random wandering. You have "denounced" it by proving the presence of internal structure and predictable (at least in a statistical sense) patterns.
It's crazy how this topic has descended...
to believing in ChatGPT and reposting his sheets.
It's been a hell of a ride....
to believing in ChatGPT and reposting his sheets.
Well, why has it gone "downhill"?
On the contrary.
AI's answers are the base from which to dance, finally the lower boundary below which is uninteresting triviality is rigidly specified, and everything interesting is above. Considering the extremely low general level in the field of statistics of many forum members, AI answers can raise the general level of the forum.
On the contrary.
Well, yes, of course.
"this promptus is the right promptus" :-)