Skip to content

Improvements. #32

@IlshatGaripov

Description

@IlshatGaripov

Hello @jameschch thanks for a great platform you have created. As I wrote you I have taken your existing project as a base, and elaborated it little further. And here are the thigns I think could be imrpoved ( I am giving just a brief overview sorry if do not make every point as clear as it could be):

  1. One of the most important things is walking forward optimiation. That has to be intuitively clear and easy to set up. There are not too much information on a subject on the internet but these two fine articles I have found that I would like to share with you:
    https://profsoftware.com/bt/wfo.htm
    http://www.codefortraders.com/Walk-Forward_Analysis/BTWFMgr.htm
    these are the documentation for two ready WFO implementations
    I tried to implement it similiar to what they have got:
    https://github.com/IlshatGaripov/OptimizationLeanJames/blob/master/Optimization/OptimizerManager/WalkForwardOptimizationManager.cs

  2. Cloud computing. To solve complex optimization problem I could see no better solution that to enable some sort of cloud computing. Depending of conditions of WFO there is a need sometimes to do thousands of backtests per an experiement. So it lead to implementation of :
    https://github.com/IlshatGaripov/OptimizationLeanJames/blob/master/Optimization/Common/AzureBatchManager.cs
    The module does enable to expand computing power in a cloud - create compute nodes - download all the historical data to the storages and then to every node - do the backtest save the result to storage than translate it to the local PC and so on. This works in union with : https://github.com/IlshatGaripov/OptimizationLeanJames/blob/master/Optimization/GeneticSharpExtensions/TaskExecutorAzure.cs
    The drawback it takes a time to create the nodes - aroudn 20 min - and to uplaod the data to every node. Probably more convenient to have a multiprocessor architecture at home - 100 or more PCs ;)

  3. Genetic optimization algorithm itself and oprationts that it performs were overwritten at many parts and results ot this work were even highlighted in a separate folder
    https://github.com/IlshatGaripov/OptimizationLeanJames/tree/master/Optimization/GeneticSharpExtensions
    which makes me think that genetic optimizatino SDK could be in whole overwridden for the purposes of optimizing trading strategies. Because most of mutation selection operation etc that GeneticSharp has available are not evry applicable for the trading task and are more suitable for many classic academic optimization problems - like shift mutation or some binary mutation and so on are not applicable here at all.. on the other hand, other sort of mutations must be implemented and present.. by the way it feels like GA is a powerful solution for trading params search optimization problems - it requires more thoughtful study - so it ended up I used only the few files frmo GeneticSharp - rewrote all the rest.

  4. All
    https://github.com/jameschch/LeanOptimization/tree/master/Optimization/Fitness
    classes I have joinged in a single functionality inside:
    https://github.com/IlshatGaripov/OptimizationLeanJames/blob/master/Optimization/Common/StatisticsAdapter.cs
    The static method CalculateFitness does all the job depending on fitnessFunction variable set by config file. But this is a minor thing..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions