Hi GAT, Is there a way to dig out the information on trades in pysystemtrade i.e. to evaluate the distribution of trades (not the daily distribution of returns)?
@AvantGarde perhaps the simplest way right now is to get_position and then process the dataframe to yield trades
Hi GAT, you wrote a blog post about using Native IB API. However I don't see the code in your github, what's available is some code that works with IBSwig framework. Do you plan to release this part on github? If you are, will it be a live trading framework or some tests and examples similar to the IBSwig?
If you actually read the series of blog posts they each reference several gists on git hub. A summary is here: https://qoppac.blogspot.co.uk/p/code.html This section: gists: python-IB-API GAT
On the topic of IB and python, i've found this library https://github.com/erdewit/ib_insync to be a very useful abstraction of the IB API. It is using the IB Python API under the hood.
from systems.provided.futures_chapter15.estimatedsystem import futures_system system = futures_system(log_level="on") print(system.accounts.portfolio().sharpe()) acc_curve=system.accounts.pandl_for_subsystem("AUD") The above code fails at W:\GDrive\19\Code\Python\pysystemtrade\syscore\optimisation.py in decompose_group_pandl(data, identifier, pool_costs, pool_gross, backfillavgcosts) 370 371 """ --> 372 assert identifier in data.keys() It seems that initially, the system has 38 instruments but when I try to focus on a single instrument, data.keys() contains only "CORN", "EDOLLAR", "EUROSTX", "MXP", "US10", "V2X" Is there any reason why this is happening?
Basically there is data for 38 instruments, but the default example only has the subset of instruments covered in my book. https://github.com/robcarver17/pysy...-a-backtest-on-a-different-set-of-instruments GAT