jameschch / LeanParameterOptimization

Parameter Optimization for Lean Algorithms
https://optimizers.ml
Apache License 2.0
57 stars 21 forks source link

Thanks #18

Open lefig opened 2 years ago

lefig commented 2 years ago

I have been following the project for some time now and all your work is appreciated.

jameschch commented 2 years ago

Glad you found a use for it. I am using different ML libraries and so it makes sense for me not to use the parameter optimizer that comes with LEAN.

I still host and often use this: https://optimizers.ml/Chart for viewing optimizer.txt output. Generally, I am tuning parameters for q learning models but in the past have used the optimizer for tuning TA signal parameters.

I'd really like to know what are you using the optimizer for in general?

lefig commented 2 years ago

Thanks again

At the moment its giving us ideas about how best to run Lean as a batch process rather than using parallel methods.

Core though has downgraded app domains and plugins seem to be the way to go.

jameschch commented 2 years ago

I get quite satisfactory performance with the useSharedAppDomain flag which will mean some initialization is not repeated for each run. This still needs some attention but basically works.

My main focus is to share a single set of Q values and have rewards updated across multiple simultaneous iterations. Same principle for learning NN weights. This all avoids the effort of setting up "gym" simulations of returns, signals, and fees etc.

The limitation of a plugin architecture as I would use the term is that you are talking about things that you could do but not things that are already happening. Without appdomains I would think about singleton "pipes" via DI. Maybe that's what you were getting at.

aipowertrader commented 2 years ago

@jameschch thanks very much for sharing this project. I've recently got interested in using genetic algorithms \ ML for strategy development and your project seems to fit the bill rather than rolling my own. I also want to play around with simple parameter optimisation but not certain if I'm better off using Lean directly for that. I want to run against the latest version of Lean so I'm attempting to update your project locally to .NET 5.0 - is this crazy? Obviously AppDomains have had to go.

jameschch commented 2 years ago

I can take a hint. The port to .net5 is now done.

https://github.com/jameschch/LeanParameterOptimization

I introduced less bugs than I expected. But, you now have to run the Optimizer with my Fork of Lean.

https://github.com/jameschch/Lean

Small changes were required to assembly loading: https://github.com/jameschch/Lean/commit/2478ec3b2500276e3f7343692a806a41478f35f8

jameschch commented 2 years ago

Thanks again

At the moment its giving us ideas about how best to run Lean as a batch process rather than using parallel methods.

Core though has downgraded app domains and plugins seem to be the way to go.

The new ApplicationLoadContexts do not compare favourably to the lost AppDomains.

aipowertrader commented 2 years ago

Thanks @jameschch, you are a star, I'll give the new port a run as soon as I get a chance.