Extracting strategy signals
What's the best way to extract trading signals from a given strategy?
At the end of the day, I am looking for a
pd.DataFramecomprising all securities in the attached datafeed in columns and daily observations in rows. If there is a buy signal for any security for any day, I need a +1 in that cell, if it is a sell, I need a -1. Otherwise, I am expecting 0.
I don't care about any position size, just the pure signal.
run-out last edited by
The best way to extract data from your backtest is Analyzers.
You can use built in analyzers or as in your case, build a custom analyzer to track the data during each iteration of the back tests.
At the end, you will usually end up with a dictionary (if you build it that way) out of which you can build your dataframe.