I am currently working on replicating financial deep learning papers to see if they actually would work in real markets.
I have this question that bothers me. Is it okay to use regular loss functions such as MSE, RMSE, MAE, MAPE,..., or other absolute difference loss functions in Finance? It seems odd.
For example, let's compare two scenarios.
A: a financial deep learning model that only predicts long position predicted +5% and the market actually moved up +10%
B: the same model predicted +5%, but this time the market moved +4.5% resulting in a loss.
However the model would learn and would give more scores to scenario B since the absolute difference is less.
So I want to customize loss function or explore the properties of different loss functions.
I was thinking something like...but not exactly like below since it would still prefer 6%(actual) - 5%(predicted) over 10%(actual) - 5%(predicted) Custom Function in TensorFlow
class Error(Loss):
def call(self, y_true, y_pred):
y_pred = tf.convert_to_tensor_v2(y_pred)
y_true = tf.cast(y_true, y_pred.dtype)
return tf.reduce_mean(y_true - y_pred), axis=-1)
the same model predicted +5%, but this time the market moved +4.5% resulting in a lossA financial loss? As far as I can tell, this is a 4.5% gain, which might be lower than predicted but is still a gain. – Dave Jan 17 '24 at 16:26