Updating Data in 'Next' and passing dataframe out of 'next'
-
Hi,
How can I update backtester data during "Next"?
For example - if a price hasn't changed in over a month, I want to 'mark' this stock from that point on a "blacklist" column... so I can filter it our of the back test and stock buying/holding it. There are also other criteria I would like to use to "blacklist" a stock.Also - once the strategy is complete, I would like to save a pandas dataframe of this data. How can I pass a dataframe out of "Next" so I can save to_csv?
Thanks,
CWSE -
@cwse said in Updating Data in 'Next' and passing dataframe out of 'next':
How can I update backtester data during "Next"?
If you mean how you can remove a data feed from the list of data feeds: you cannot.
@cwse said in Updating Data in 'Next' and passing dataframe out of 'next':
For example - if a price hasn't changed in over a month, I want to 'mark' this stock from that point on a "blacklist" column... so I can filter it our of the back test and stock buying/holding it. There are also other criteria I would like to use to "blacklist" a stock.
Keep the index and ignore the corresponding data.
@cwse said in Updating Data in 'Next' and passing dataframe out of 'next':
Also - once the strategy is complete, I would like to save a pandas dataframe of this data. How can I pass a dataframe out of "Next" so I can save to_csv?
Access the data after the backtesting and get as much data as needed with
get
. Docs - Platform Concepts