Can you give me a hint how to get the dataframe from the executed strategy? May be obvious to a python expert but is not obvious to me. A simple example is usually good enough.
Posts made by mapesd
RE: Possible to pass and return a dataframe to a strategy?
Possible to pass and return a dataframe to a strategy?
Is it possible to pass and return a dataframe to a strategy?
Got started with this post.
Here is a code snippet of the strategy parameters.
class TestStrategy(bt.Strategy): params = ( ('results', None), # This is the dataframe ('fastmaperiod', 10), ('midmaperiod', 20), ('slowmaperiod', 50), ('atrperiod', 15), # ATR Period (standard) ('atrdist', 3.0), # ATR distance for the strike price
cerebro.addstrategy(TestStrategy, results = results_df)
I want to return the results dataframe after the strategy has completed.