TradingView
jdehorty
Feb 12, 2023 9:52 PM

SOL Bearish Outlook According to Deep Learning Short

SOL / TetherUSBinance

Description

This post is a continuation of my ongoing efforts to fine-tune a predictive algorithm based on deep learning methods, and I am recording results in the form of ideas as future reference.

This algorithm is based on a custom CNN-LSTM implementation I have developed for multivariate financial time series forecasting using the Pytorch framework in python. If you are familiar with some of my indicators, the features I'm using are similar to the ones I use in the Lorentzian Distance Classifier script that I published recently, except they are normalized and filtered in a slightly different way. The most critical I’ve found are WT3D, CCI, ADX, and RSI.

Previous posts in this series:



As always, it is important to keep in perspective that while these predictions have the potential to be helpful, they are not guaranteed, and the cryptocurrency market, in particular, can be highly volatile. This post is not financial advice, and as with any investment decision, conducting thorough research and analysis is essential before entering a position. As in the case of any ML-based technique, it is most useful when used as a source of confluence for traditional TA.

Trade closed manually

Total drop: 22.2 - 19.7

Closed manually due to additional volatility from CPI release on 2/14. Will be factoring in CPI and PPI dates into the next model release.

Comment

Preview of Next Leg:

Comments
zyberal
how many epochs did you train the model? i see this as prone to overfitting. also have you tried using LSTMs?
InvestingScope
Very timely idea. Great entry point for such a strategy.
jack_forsterton10
Not a bad CNN-LSTM model. But I'm more of a FOX guy myself.
behdark
It was an instructive analysis.Thank you
sieusaoduongdua
i am using cnn-Bi(GRU) model. are u use custom loss?
jdehorty
@sieusaoduongdua Great question. I actually just finished answering a similar one in my last post, and it's cool to see all of the interest in the implementation. I’m not sure of the exact nature of your specific Bi-GRU implementation, but for LSTM-based approaches, it is typically important to differentiate between using LSTM for regression and classification. In regression, I have found that either RMSE or MAE usually works well enough. However, for classification tasks, a more flexible loss function, such as Binary Cross Entropy, is often a better choice. Personally, for classification-oriented LSTMs involving financial time series, I use a custom loss function that blends BCE and RMSE with adjustable parameters that allow for more fine-tuned control over the loss. For regression-based loss optimization, I’ve found that Adaptive Moment Estimation (ADAM) tends to converge faster than traditional gradient descent methods and is more memory efficient because it avoids the accumulation of intermediate weights.
sieusaoduongdua
@jdehorty, BCE is binary cross entropy? how can u use BCE for predict many time step ahead, i thought it only be used when predict value is just two
jdehorty
@sieusaoduongdua Yes, that is correct, which is why I specifically mentioned BCE in the context of "classification-oriented LSTMs". For regression, I use RMSE, as I also stated in my reply above.
sieusaoduongdua
@jdehorty, so in your model used in public idea, you only use rsme or mse for predict time series or it used a custom loss in your model? i have found out that Bidirectional Gated recurrent unit has a slightly bester loss in mse
jdehorty
@sieusaoduongdua, I am using RMSE, as I have found that to be marginally better. Very interesting, though, that you prefer MSE for Bi-GRU. Will keep that in mind.
More