For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Optimization sometimes returns 0 when I have more than a small number of variations



  • Evening,

    I will post some more detailed code tomorrow after I have thought about it a bit more, but, at the moment when I run optimizations for more than say 18 variations, 95% of the return results just return a 0 PnL and 0 trades made despite me not being able to work out why. When I manually test the variations they work, trade and produce a PnL.

    Is it possible to run too many optimizations or are there common pitfalls to be aware of which causes this sort of things?



  • I have redone the strategy, made it basic, etc; it seems to be related to the maxcpu's value.

    When I set maxcpu=6, it produces 6 optimizations of trades. When I do not set it, it produces 8, when i set maxcpu to 2 it produces 2.

    Hmm, my computer has eight cores but I can't think why it is doing this.

    When I remove extactbars=-2, it has no effect.


    Here is a link to the project files:

    I am using pycharm with ib_insync to pull the data. The Instance file is titled "Astroworld1" and the Strategy file is titled "NextDayStrategyBins1"

    I am absolutely stumped as to why this has started happening.


    I have just discovered in my trade analyzer it is not showing anything under the won/lost keys of the analyzer's odict; but under the 'long' and 'short' odict it is showing values. Not sure how this might relate to the PnL = 0 problem


Log in to reply
 

});