Discussion of article "Time Series Forecasting Using Exponential Smoothing" - page 2

 
victorg:

If it is not too much trouble, please, explain why if the distribution of the original sequence (or smoothed original sequence) is not normal, the forecast cannot be trusted? Or have I misunderstood you?


The point isn't really that. The point is that you cannot say anything definite having one of the parameters as a proof. You have to orientate on the totality of factors with the conclusion "most likely this is ...". Two pictures are the main ones for my conclusion: confidence ellipses and prediction error graph. While the first problem is solved simply by removing one of the terms in the equation, the second is a more complex problem: the instability of the error, which means that the prediction error is not a constant, but a rather intricate curve. What will happen in the future with the forecast cannot be predicted because of this graph of forecast error.

There is an article on this site right after yours that goes into more detail about exponential smoothing analysis along with the straight line and the Hodrick-Prescott filter. If you find time, take a look and we'll continue.

 
faa1947:

That's not quite the case. The point is that you can't say anything definite with one of the parameters as evidence. You have to focus on the totality of factors with the conclusion "this is most likely ...". Two pictures are the main ones for my conclusion: confidence ellipses and prediction error graph. While the first problem is solved simply by removing one of the terms in the equation, the second is a more complex problem: the instability of the error, which means that the prediction error is not a constant, but a rather intricate curve. What will happen in the future with the forecast cannot be predicted because of this graph of forecast error.

There is an article on this site right after yours that goes into more detail about exponential smoothing analysis along with the straight line and the Hodrick-Prescott filter. If you find time, take a look and we will continue.

I don't want to cause misunderstanding, so I apologise in advance for being boring, but I will have to explain my view of the subject in a bit more detail.

I think that it is impossible to discuss simultaneously the whole complex of issues related to data processing. It seems to me that it is better to do everything sequentially. That is why I will talk only about forecasting, we will leave smoothing issues aside.

If we consider currency quotes, we can easily show that they are stationary or non-stationary. Take a long sequence and, by any available method, verify that it is non-stationary. Then, shorten the length of the test sequence and do the same calculations until your chosen method determines it to be stationary. Moreover, no quote has an infinite length, so outside the range of its existence the conditions of its stationarity will certainly be violated. Therefore, further on I will avoid any reasoning about stationarity. In this case, I am closer to the approach of descriptive statistics, when the main goal is to analyse the characteristics of an existing sequence of finite length without attempting to extend the results of the analysis to any non-existing sequence.

Let us return to prediction. Whatever model we use, the accuracy of forecasting and confidence intervals should be determined on the basis of forecasting errors, not on the basis of any secondary features (this is important!).

The indicator given in the article optimises the parameters of the model at each new bar for a given number of bars and calculates the mean square of the forecast error one step ahead based on the found values. Further on the basis of the c.c.o. found in this way, after building the forecast, its confidence interval is determined. The confidence interval is constructed using analytical expressions, which can be found at the links mentioned in the article.

The figure shows that the variance of forecasting errors is measured on the same interval on which the model was trained. If the errors are measured on the same interval on which the optimisation was performed, it raises some doubts that these estimates will not turn out to be underestimates. This widespread method was not invented by me, I just used it, although I believe it is not the best method of measuring forecast accuracy, no matter what model we use.

A modification of this method can be found in the literature, where the sequence available for processing is divided into two halves. Training is performed on the first half, followed by error measurement on the second half. Then the first part of the sequence is expanded by one bar and optimisation and error measurement are repeated for the remaining part. There are some other approaches to measuring forecast accuracy and error variance, we should try to deal with this issue, I am not ready to give any recommendations yet.

Besides, there is a large class of nonlinear models for which analytical expressions for determining the forecast confidence interval for two, three, etc. steps ahead simply cannot be derived. Most likely, when forecasting, it is necessary to switch to non-parametric methods of measuring these intervals. We have to look into it. In any case, forecast errors for all horizons and their confidence intervals should be measured, not calculated from secondary signs.

Regarding exponential smoothing models. When using them, there are no restrictions on the normality of the distribution of initial data and there are no strict restrictions on the normality of the distribution of prediction errors (I think so). Perhaps that is why they sometimes have some advantage over the corresponding ARIMA models.

Why did I write all this?

If I understood correctly, in your article you use regression to fit (in the best sense of the word) a smoothed sequence to the same but unsmoothed sequence. And on the basis of the results of this fitting conclusions are made about the possibility or impossibility of prediction. This is incomprehensible to me. Again, but it seems to me that whatever model we use, prediction accuracy and confidence intervals should be determined on the basis of prediction errors, not on the basis of any secondary attributes, such as smoothing results (this is important!). Also, if you optimise the smoothing coefficients of MA or XP , how are you going to make the fit, over the same training interval?

As for your published article, I didn't understand a lot of things before its publication, and now I have doubts about it. That is why I cannot evaluate your article, here it is necessary to address to the expert. I am ashamed to admit that I have no idea how EViews calculates confidence ellipses.

I apologise for my rambling, imprecise wording, etc.

 
victorg:

I believe that it is impossible to discuss the whole complex of issues related to data processing at the same time

Traders' goal of analyses is forecast, but it is impossible to single out the forecast separately, as there is always a question of trust to this forecast, and this trust cannot be based only on the forecast error, as the error, as I have shown, turned out to be a variable, not a constant.

If we consider currency quotes, it can be shown with equal ease that they are stationary or non-stationary

Over long enough time intervals, such as over a year, and small time frames, such as a minute, we are likely to get a normal distribution with mo and variance equal to a constant. But the variance value will be huge, which can be seen visually by the quotes movement. It will be impossible to use the forecast, as it is clear that EURUSD quotes are in the range of 1.2 - 1.5, i.e. about 3000 pips. That is why the number of observations has to be taken from 50 to 100, for a year it is weeks.

By stationarity EViers understands approximate constancy of mo and standard deviation. Only stationary series can be forecasted, because in non-stationary series C.O. is not a constant and your forecast may turn out to be a fiction literally at the next bar due to changes in C.O.

.... accuracy of forecasting and confidence intervals should be determined on the basis of forecasting errors, not by any secondary features (it is important!).

The whole technical analysis is based on this postulate. You should not refer to secondary signs as values that not only cast doubt on the forecast, but also justify the impossibility of using it at all. You are standing on the position of TA, not econometrics, which, unlike TA, is a science, not a collection of some observations and beliefs.

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов - Документация по MQL5
 
faa1947:

"By stationarity, EViers mean approximate constancy of mo and standard deviation."

I am expressing my subjective opinion and my view, in this case on time series forecasting. I don't know what Eviews thinks about it, I'm not interested in him, I'll explain why.

  1. Suppose a person gets a job and is tasked with calculating confidence ellipses ten times a day on a changing sequence using EViews . This employee doesn't care how it's counted or what it's for, let's assume he's just doing his job honestly. In this case, Eviews is good! and the employee is good too.
  2. Another option. A person got a job and was assigned to quickly develop an uncomplicated prediction system for a given class of sequences, which should be implemented as a state space, a Bayesian approach can also be implemented. The system should include 10-12 models. After collecting statistics on the frequency of the system selecting a particular model, exclude the least used models. Once this is completed, in order to improve the accuracy of the prediction, try to use adaptation of the coefficients of the used models. In this case both Eview and the first employee are completely unsuitable. You need MathCad, or R, or VisualStudio.

For me, the first option is not suitable at all. That's why I don't want to deal with Eview . I must admit that the second option is not for me either. That's why I don't use MathCad or R.

"Only stationary series can be forecasted, because in non-stationary series C.O. is not a constant and your whole forecast may turn out to be a fiction literally on the next bar because of C.O. changes."

Look at models like GARCH or ARCH, I can't say for sure. Or exponential smoothing models with multiplicative trend and seasonality, I can't remember exactly right now on takeoff. Or use a slightly more complex model, when changes in the statistical characteristics of the sequence over time are analysed and a forecast is made for them. And the forecast itself is made by taking into account the extrapolation of these changing characteristics. I think the statement that only stationary series can be forecasted is too bold. Firstly, because stationary series do not exist in nature, it is an abstraction, and secondly, a lot depends on what you understand by the word "stationary". Similarly, a lot depends on what you understand by the word "forecast". You can forecast anything, but you will get different forecast errors and confidence intervals.

"You stand on the position of TA, not econometrics, which unlike TA is a science, not a collection of some observations and beliefs."

This comment of yours is not entirely fair. I'm not a Forex fanatic, I don't stand for TA, statistics, economics, econometrics and so on. I would probably recognise for myself the closest position accepted in "digital signal processing" ( DSP or DSP).

"Your forecast may turn out to be fiction literally on the next bar because of a change in C.O."

If we talk about time series forecasting, I dare to say that it is not only you and me who are dealing with this issue. There is a huge number of publications on this topic, where authors share their results, methods and forecasting techniques. It makes no sense to start doing something in this field from scratch, so I borrowed other people's theoretical findings and tried to implement them in MQL5. Why MQL5? Very simply, because the MQL5.COM website is to some extent dedicated to this programming language, rather than, for example, EViews, Gretl , and so on. And the indicator IndicatorES.mq5 cited in the article cannot be a fiction, as you write, because it honestly draws the confidence intervals of the forecast. If you have metatrader5 installed, then install this indicator and see for yourself.

If we are talking about the same thing, we mean time series forecasting. It should be taken into account that this direction is in no way connected with forex, indicators, quotes, buy/sell transactions, etc. If you are really interested in forecasting, and not something else, then refer to the world experience accumulated in this area for many years.

In conclusion, I would like to note that we should not forget that this correspondence with you is in the thread dedicated to the discussion of the published article. But we do not discuss the article itself. Therefore, if you or anyone else has comments directly on the published article, I will try to answer them (of course, to the extent possible). I will not discuss regression analysis, mathematical and statistical software packages any more, at least not in this thread.

 
victorg:. I will not discuss regression analysis, mathematical and statistical software packages anymore, at least not in this thread.

Your point of view is now completely understandable to me, but absolutely not acceptable. Thank you for your answers.
 

I have only finished reading the chapter on additive models. So it is, to put it mildly, too early to summarise. However, some comments arose as I was reading:

  1. It is worth mentioning that the total error strongly depends on the type of the initial CEVR, i.e. on the symbol forming it.
  2. The mentioned predictability criteria (variations of Mean Error) are, to put it mildly, far from trading practice. Something else should be used. I'll think about it.
  3. Here in this place:
    For the coefficients a1 and a2 thus found, the forecast at time t for m steps ahead will be equal to<br/ translate="no">
    You are equating the forecast to the linear trend(T(t)) rather than the sum of the linear trend(T(t)) and the varying process level(L(t)) for some reason. L(t) in this case should be a simple EMA applied to a detrended series(X(t) - T(t)).
  4. It would be good to provide graphs with the characteristics of the "zero mean" random variable, r(t), as the difference of the original series and its forecast.

Continue reading....

 

Finished reading it. Great article, thanks! More comments:

  1. How the formula was derived after this phrase - I did not get over it:
    Then to determine the amount of variance for forecasting 2 or more steps ahead for the models under consideration, the expression will be valid
  2. On the point of mentioning information criteria (AIC, BIC). On this topic in general, it would be good to have a separate toolkit comparing different TCs.
  3. Clarify how the model forecast is constructed. Are the forecast values previously modelled at the previous step substituted for real values in the future?
  4. Implementation of Powell's optimisation method (unconditional search for the minimum of a function) and the method of penalty functions (for setting constraints) is a great topic. It allows you to create relatively fast adaptive indicators.
  5. It would be great if you could share software implementations of various numerical methods of optimisation.
  6. When optimising in func, multiplication by nCalc, as well as taking the logarithm, is unnecessary. I don't understand what the maximum likelihood method has to do with it.
  7. The table "RelMAE prediction errors" is disappointing. It shows that the naive method is < 5% worse than the used model. Here I would like to recall the mentioned AIC....
 

Becoming a Fearless Forex Trader

  • Must You Know What Will Happen Next?
  • Is There a Better Way?
  • Strategies When You Know That You Don’t Know
“Good investing is a peculiar balance between the conviction to follow your ideas and the flexibility to recognize when you have made a mistake.”
-Michael Steinhardt


"95% of the trading errors you are likely to make will stem from your attitudes about being wrong, losing money, missing out, and leaving money on the table – the four trading fears"
-Mark Douglas, Trading In the Zone


Many traders become enamored with the idea of forecasting. The need for forecasting seems to be inherent to successful trading. After all, you reason, I must know what will happen next in order to make money, right? Thankfully, that’s not right and this article will break down how you can trade well without knowing what will happen next.



Must You Know What Will Happen Next?

While knowing what would happen next would be helpful, no one can know for sure. The reason that insider trading is a crime that is often tested in equity markets can help you see that some traders are so desperate to know the future that their willing to cheat and pay a stiff fine when caught. In short, it’s dangerous to think in terms of a certain future when your money is on the line and best to think of edges over certainties when taking a trade.



The problem with thinking that you must know what the future holds for your trade, is that when something adverse happens to your trade from your expectations, fear sets in. Fear in and of itself isn’t bad. However, most traders with their money on the line, will often freeze and fail to close out the trade.

If you don’t need to know what will happen next, what do you need? The list is surprisingly short and simple but what’s more important is that you don’t think you know what will happen because if you do, you’ll likely overleverage and downplay the risks which are ever-present in the world of trading.
  • A Clean Edge That You’re Comfortable Entering A Trade On
  • A Well Defined Invalidation Point Where Your Trade Set-Up No Longer
  • A Potential Reversal Entry Point
  • An Appropriate Trade Size / Money Management
Is There a Better Way?

Yesterday, the European Central Bank decided to cut their refi rate and deposit rate. Many traders went into this meeting short, yet EURUSD covered ~250% of its daily ATR range and closed near the highs, indicating EURUSD strength. Simply put, the outcome was outside of most trader’s realm of possibility and if you went short and were struck by fear, you likely did not close out that short and were another “victim of the market”, which is another way of saying a victim of your own fears of losing.



So what is the better way? Believe it or not, it’s to approach the market, understanding how emotional markets can be and that it is best not to get tied up in the direction the market “has to go”. Many traders will hold on to a losing trade, not to the benefit of their account, but rather to protect their ego. Of course, the better path to trading is to focus on protecting your account equity and leaving your ego at the door of your trading room so that it does not affect your trading negatively.

Strategies When You Know That You Don’t Know

There is one commonality with traders who can trade without fear. They build losing trades into their approach. It’s similar to a gambit in chess and it takes away the edge and strong-hold that fear has on many traders. For those non-chess players, a gambit is a play in which you sacrifice a low-value piece, like a pawn, for the sake of gaining an advantage. In trading, the gambit could be your first trade that allows you to get a better taste of the edge you’re sensing at the moment the trade is entered.


James Stanley’s USD Hedge is a great example of a strategy that works under the assumption that one trade will be a loser. What’s the significance of this? It pre-assumes the loss and will allow you to trade without the fear that plagues so many traders. Another tool that you can use to help you define if the trend is staying in your favor or going against you is a fractal.

If you look outside of the world of trading and chess, there are other businesses that presume a loss and therefore are able to act with a clear head when a loss comes. Those businesses are casinos and insurance companies. Both of these businesses presume a loss and work only in line with a calculated risk, they operate free of fear and you can as well if you presume small losses as part of your strategy.

Another great Mark Douglas quote:
“The less I cared about whether or not I was wrong, the clearer things became, making it much easier to move in and out of positions, cutting my losses short to make myself mentally available to take the next opportunity.” -Mark Douglas

Happy Trading!

The source

 
Sergey Golubev:

Becoming a Fearless Forex Trader

  • Must You Know What Will Happen Next?
  • Is There a Better Way?
  • Strategies When You Know That You Don’t Know
“Good investing is a peculiar balance between the conviction to follow your ideas and the flexibility to recognize when you have made a mistake.”
-Michael Steinhardt


"95% of the trading errors you are likely to make will stem from your attitudes about being wrong, losing money, missing out, and leaving money on the table – the four trading fears"
-Mark Douglas, Trading In the Zone


Many traders become enamored with the idea of forecasting. The need for forecasting seems to be inherent to successful trading. After all, you reason, I must know what will happen next in order to make money, right? Thankfully, that’s not right and this article will break down how you can trade well without knowing what will happen next.



Must You Know What Will Happen Next?

While knowing what would happen next would be helpful, no one can know for sure. The reason that insider trading is a crime that is often tested in equity markets can help you see that some traders are so desperate to know the future that their willing to cheat and pay a stiff fine when caught. In short, it’s dangerous to think in terms of a certain future when your money is on the line and best to think of edges over certainties when taking a trade.



The problem with thinking that you must know what the future holds for your trade, is that when something adverse happens to your trade from your expectations, fear sets in. Fear in and of itself isn’t bad. However, most traders with their money on the line, will often freeze and fail to close out the trade.

If you don’t need to know what will happen next, what do you need? The list is surprisingly short and simple but what’s more important is that you don’t think you know what will happen because if you do, you’ll likely overleverage and downplay the risks which are ever-present in the world of trading.
  • A Clean Edge That You’re Comfortable Entering A Trade On
  • A Well Defined Invalidation Point Where Your Trade Set-Up No Longer
  • A Potential Reversal Entry Point
  • An Appropriate Trade Size / Money Management
Is There a Better Way?

Yesterday, the European Central Bank decided to cut their refi rate and deposit rate. Many traders went into this meeting short, yet EURUSD covered ~250% of its daily ATR range and closed near the highs, indicating EURUSD strength. Simply put, the outcome was outside of most trader’s realm of possibility and if you went short and were struck by fear, you likely did not close out that short and were another “victim of the market”, which is another way of saying a victim of your own fears of losing.



So what is the better way? Believe it or not, it’s to approach the market, understanding how emotional markets can be and that it is best not to get tied up in the direction the market “has to go”. Many traders will hold on to a losing trade, not to the benefit of their account, but rather to protect their ego. Of course, the better path to trading is to focus on protecting your account equity and leaving your ego at the door of your trading room so that it does not affect your trading negatively.

Strategies When You Know That You Don’t Know

There is one commonality with traders who can trade without fear. They build losing trades into their approach. It’s similar to a gambit in chess and it takes away the edge and strong-hold that fear has on many traders. For those non-chess players, a gambit is a play in which you sacrifice a low-value piece, like a pawn, for the sake of gaining an advantage. In trading, the gambit could be your first trade that allows you to get a better taste of the edge you’re sensing at the moment the trade is entered.


James Stanley’s USD Hedge is a great example of a strategy that works under the assumption that one trade will be a loser. What’s the significance of this? It pre-assumes the loss and will allow you to trade without the fear that plagues so many traders. Another tool that you can use to help you define if the trend is staying in your favor or going against you is a fractal.

If you look outside of the world of trading and chess, there are other businesses that presume a loss and therefore are able to act with a clear head when a loss comes. Those businesses are casinos and insurance companies. Both of these businesses presume a loss and work only in line with a calculated risk, they operate free of fear and you can as well if you presume small losses as part of your strategy.

Another great Mark Douglas quote:
“The less I cared about whether or not I was wrong, the clearer things became, making it much easier to move in and out of positions, cutting my losses short to make myself mentally available to take the next opportunity.” -Mark Douglas

Happy Trading!

The source

I agree that one does not need to know what will happen next in order to profit, but the question seems to be in defining an edge.  Casinos define their edge using predefined probabilities, e.g., there's a 1/52 chance of drawing an Ace of Spades from a complete standard deck of cards, or a 1/6 chance of rolling a 5 using a fair dice.  Insurance companies use aggregate histories to compile actuarial tables from which to make assumptions regarding populations, but cannot (much like traders) make assumptions regarding any particular individual without knowing some facts regarding behavioral habits of the individual to compare to the attributes of the population.  20 year old males tend to be aggressive, somewhat reckless drivers; John is a 20 year old male, he "may" be an aggressive, somewhat reckless driver, but there is also a chance that he may not be.  The insurance company will then look at John's driving record for any history of risky behavior, very much like a trader looks at price history to determine exploitable "behaviors."

So as a trader, much more like insurance companies than casinos, we gather information regarding the past to attempt to make assumptions about the future when defining our edge.  Combining the entry/exit conditions with risk management to make assertions regarding unknowable probabilities (because one cannot assert that there is a 1/6 chance that the EURUSD will increase by 20 pips with 100% confidence) is the essence of trading.  So it all boils down to making the most of the time available to an individual trader, finding the most advantageous setups/exits using assumptions regarding price histories and profit/loss expectancies should the future be similar to the past, which is uncertain at best.  

Using an exponentially smoothed time series forecast as a setup/exit together with risk management is no different really than using a consolidation/breakout strategy in that one creates rules for the trade based on how the strategy worked in the past, and then follows the rules with as few assumptions regarding the future as possible.  

Will price go up, or will it go down?  I don't know, but this is what I'll do in either case.