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

Strategy optimization with same set of indicator/signals



  • Hi,

    I am optimizing a strategy where the optimization is focused on identifying the correct exit strategy, and the entry is the same for every optimization run with the same set of indicators/signals. In other words, the difference in one run from the other is the exit strategy but the indicators/signals are unchanged and so are the entries. My questions - is there any way to run the indicators only once and reuse them for every optimization runs, rather than doing it separately for every run.

    Thanks,

    AP



  • if you don't want to recalculate indicators, than pre-calculate them, extend your data feed with their values, and pass them altogether to cerebro engine at initialization.



  • @ab_trader
    Excellent idea! Any idea on how to extend the datafeed with the indicators, which are line objects. Basically, how to convert the line objects back to datafeed (csv or DataFrane), aligned by date?

    Thanks!



  • There are different ways to make it:

    • develop your own writer which will write down everything into csv files
    • print everything from the next() calls and than convert to text file in the shell
    • write the analyzer which will export everything using bt slicing methods into pandas dataframe

    search indicators and dataframe on this forum,it was discussed couple times



  • @ab_trader
    Thanks a lot!!


Log in to reply
 

});