HusseinJammal / Liquid-Neural-Networks-in-Stock-Market-Prediction

This repository hosts a stock market prediction model for Tesla and Apple using Liquid Neural Networks. It showcases data-driven forecasting techniques, feature engineering, and machine learning to enhance the accuracy of financial predictions.
Apache License 2.0
34 stars 8 forks source link

Finetuning and traning #1

Open traderpedroso opened 4 months ago

traderpedroso commented 4 months ago

Thank you for making this fascinating project available in a way that is applicable to LNN in the stock market. Is there any chance you could share the training code for testing with different assets?

lorenzmeis commented 2 months ago

please find here a notebook I used to train another ticker (SPY). Tested OK with app.py. It is using the same model config as the AAPL and TSLA models. Based on it you should be able to train new ticker until Hussein releases his code. I don`t fully understand the reasoning of the regularizer settings of the first Dense layer and how they were calculated. Hoping that @HusseinJammal can give us some enlightenment here ;-)

model.add(Dense( units=64, activation='linear', kernel_initializer=GlorotUniform(), bias_initializer=Zeros(), kernel_regularizer=L1L2(l1=9.999999747378752e-06, l2=9.999999747378752e-05), bias_regularizer=L1L2(l2=9.999999747378752e-06), activity_regularizer=L1L2(l1=9.999999747378752e-05), name='dense' ))

traderpedroso commented 2 months ago

please find here a notebook I used to train another ticker (SPY). Tested OK with app.py. It is using the same model config as the AAPL and TSLA models. Based on it you should be able to train new ticker until Hussein releases his code. I don`t fully understand the reasoning of the regularizer settings of the first Dense layer and how they were calculated. Hoping that @HusseinJammal can give us some enlightenment here ;-)

model.add(Dense( units=64, activation='linear', kernel_initializer=GlorotUniform(), bias_initializer=Zeros(), kernel_regularizer=L1L2(l1=9.999999747378752e-06, l2=9.999999747378752e-05), bias_regularizer=L1L2(l2=9.999999747378752e-06), activity_regularizer=L1L2(l1=9.999999747378752e-05), name='dense' ))

Thanks, buddy! I'm going to start implementing this right now. The cross-validation logs are giving me a good idea. I'll train it and integrate it into backtesting to see how it performs in a more realistic environment. I'll let you know if there are any updates and share the code.

HusseinJammal commented 2 months ago

Hello guys! @lorenzmeis @traderpedroso First of all, thank you for your feedback and thanks @lorenzmeis for your contribution as well. I really appreciate it! Regarding the training code, I'm sorry that I couldn't provide for two reasons:

  1. The institution I work with had some regulations regarding sharing the code and I didn't have permission to do so.
  2. The project is going under some advancements in the model (as a second phase) I hope you guys understand this case.

If you need more help or have any concerns, please do not hesitate to contact me. I'd be happy to assist!

traderpedroso commented 1 month ago

Thank you for the feedback, and no problem! I've made some progress on the code thanks to @lorenzmeis and of course, you @HusseinJammal. I'd like to share my progress in improvements. I did the following: