Discussing the article: "Forecasting a Conditional Distribution Using MLP"
That’s brilliant – this must be the first post on the forum about probabilistic MO.
I wonder if it’s possible to do something similar for other distributions (such as the Gamma or Weibull distributions)?
I think I’ll have a go at it sometime for the height of the zigzag’s knee. There, for random walk, the distribution is exponential, so we need distributions on the positive half-axis that include the exponential distribution as a special case.
I could also try to incorporate a survival analysis, but I just haven’t got round to it yet.
Everything’s fine, apart from one thing. For the ‘forecast indicator’, the PLOT_SHIFT parameter (shifting the lines into the future) should have been enabled, but at the moment, instead of a forecast, only the ‘actual’ data from the historical record is being plotted. Or perhaps we have different interpretations of the term ‘forecast’.
After all, we only make forecasts one step ahead. We don’t forecast several bars ahead.
In other words, are we showing on each test bar where the predicted closing price and its range lie for a bar that, as it were, does not yet exist?
Why ‘non-existent’? The zero bar is still forming, but we’ve already received the forecast for it when this bar opened, as a new vector of indicators has formed. And this forecast does not change or get recalculated, as the forecast depends on past prices, not on past and current prices. Or have I missed something, and does the code look into the future?
It’s unlikely to be a glimpse into the future; that’s not what I meant. Apparently, the forecast is calculated right at the start of a new bar forming, i.e. effectively only when the opening price of that ‘bar’ is known, which is why I described it, and I quote, as ‘virtually non-existent’.
Check out the new article: Forecasting a Conditional Distribution Using MLP.
In the highly volatile and uncertain financial markets such as Forex, accurately predicting price movements remains a key challenge for traders and analysts. Traditional regression approaches based on standard loss functions such as mean squared error (MSE) or sum of squared errors (SSE) often underperform. These functions assume homoscedasticity, that is, constancy of the variance of the target variable, which rarely corresponds to the real dynamics of financial time series. To adequately model such data, an approach is required that takes into account heteroscedasticity — the variable variance of price increments that depends on the input features.
The article presents a probabilistic approach to the regression problem using a multilayer perceptron (MLP) to predict the conditional Gaussian distribution of price increments. For this purpose, we implement a custom loss function based on the Gaussian negative log-likelihood (GaussianNLLLoss).
Author: Evgeniy Chernish