0
$\begingroup$

I want to use a model to trade in finanical market.

which i have several features, like macd, rsi, or other common features.

and my target is to make a tradeable predict in every time point.

so my target can be:

  1. yield in a fixed time laster, like, 30 min. yt = close(t+ws) - close(t)
  2. futures price direction, which only can be 1(price up in the future) -1 (price down in the future)

these are difference between regression and classification.

which one you think is better, and, any suggestions about this problem?

Thanks

$\endgroup$

3 Answers 3

0
$\begingroup$

From my personal experience, I think what matters the most in terms of return is how good your risk management is. You can use both regression or classification, but all approaches have some errors associated with it, so in the long run, it comes down to how you can manage incorrect predictions. So you can start with any model, say you go for classification and you achieve 70% accuracy. then you use your model to predict on some historical data (that for sure you have not used during trading) and you build some trading strategy using your forecasts. Then, you can use something like Pythons Backtrader and check how are you doing in terms of return on historical data. Sometimes its not enough to correctly predict price movement in 9 out of 10 cases, because your one loss can be bigger than all the profitable bets and you also need to take into account fees that will burn your profit. Thats a lot of issues you need to think about before putting this model into production. And even using this approach you should be aware that historical success of your model+strategy does not guarantee that it will be the same in the future.

To sum it up: I think it comes down to the strategy and not the model itself.

$\endgroup$
0
$\begingroup$

In my opinion, classification is more appropriate for trading algos and here's why:

  • In ordinary regression, what you are predicting is the exact value of the target variable (price change) from an infinite set of possibilites.
  • In classification, however, you are predicting the class of the target variable from a finite list of possible classes. This can be simply predicting if the price is going up or down (two classes). Let's stick with two classes for the sake of simplicity in this post.

As you can see, predicting the exact value of a continuous variable with ordinary regression is much more challenging than predicting the correct class out of a limited number of classes. With two classes, you even have a 50% chance of being correct without even any modeling and just by pure chance. If you can improve the model to do slightly better than 50%, say, 55%, you can trade profitably over the long run.

From a practical perspective, what you most care about is getting the directional of price movement right (classification). You care less about if price is going up by 8% or 9% (regression)

The other advantage of classification is that you get a probability level associated with any prediction denoting confidence level in the prediction, which can be used for position sizing. So, for example, if I predict that tomorrow's price is going up/down with a probability of 70%, I may put, say, $100 in that trade, while if the probability were 94%, I may put $250 in the trade as I am more confident in my prediction.

Lastly, typically 50% of price changes are positive (up) and 50% negative (down). From the technical perspective, this works in favor of classification.

$\endgroup$
0
$\begingroup$

I see minimal value in just predicting the direction of price movement.

If you don't know the magnitude, you don't know if the profit resulting from making a trade would be wiped out by a trading fee or taxes.

If you don't consider the magnitude, you could do well nine times out of ten, only for an error on that tenth prediction to wipe out your profits.

I'm perfectly content to lose a little money nine times and then make a squillion dollars on my tenth attempt, but I am not willing to make money nine times only to lose it all because of one bad trade.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.