Extending transactions object from Analyzer
Pablo Reyes Almagro last edited by
I'm running my strategy and doing some analysis on it with Pyfolio. One of the things I would like to be able to know is what was the condition that triggered a buy/sell operation. I know I could probably show this in a log, but I'd prefer to store it somewhere in memory that's later available in an Analyzer.
At the moment I'm accessing the strategy transactions with:
returns, positions, transactions, gross_lev = pyfoliozer.get_pf_items()
What would be the best way to fill (I guess from the Strategy? extending the Analyzer?) more data into the transactions object? Like a new field called "Condition" or maybe some indicator value? I'm sure there may be a cleaner way to obtains this data, but I would prefer not to over-complicate it for now. In any case, I'm all ears.
run-out last edited by
Paul Langer last edited by
may I ask how you actually managed to run pyfolio? I was trying to run the sample code from the Documentation and got the error
TypeError: create_full_tear_sheet() got an unexpected keyword argument 'gross_lev'
which seems to be known. Did you downgrade you pyfolio version? Would be awesome I could get a version to run :)