I have an IPython Notebook that is using Pandas to back-test a rule-based trading system.
I have a function that accepts various scalars and functions as parameters and outputs a stats pack as some tables and a couple of plots.
For automation, I want to be able to format this nicely into a "page" and then call the function in a loop while varying the inputs and have it output a number of pages for comparison, all from a single notebook cell.
The approach I am taking is to create IpyTables and then call _repr_html_()
, building up the HTML output along the way so that I can eventually return it from the function that runs the loop.
How can I capture the output of the plots this way - matplotlib subplot objects don't seem to implement _repr_html_()
?
Feel free to suggest another approach entirely that you think might equally solve the problem.
TIA