Discussion in 'Programming' started by globalarbtrader, Dec 18, 2015.
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)?
Not in an easy way right now
@AvantGarde perhaps the simplest way right now is to get_position and then process the dataframe to yield trades
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:
This section: gists: python-IB-API
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")
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)
--> 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.
Very late in the day but this seems to be fixed.
Separate names with a comma.