Hot answers tagged

4

In the call to Bisection.solve, the question mark must be the Python function whose zero you want to find. In your case, it should be something reproducing the logic of IRRSolver::operator() in Mick Hittesdorf's code, i.e., something like this (which I haven't tested): cashflows = fixedRateBond.cashflows() npv = fixedRateBond.NPV() def ...


3

Remember that all back testing is full of lies assumptions. Latency (both line latency and latency internal to the exchanges), adverse selection, market impact (yes, even you have market impact), etc, are all based on assumptions. These assumptions are educated guesses at best, but more often terrible models are used (you always get filled at at mid!) and ...


2

backtrader (https://github.com/mementum/backtrader) can do 1 and 3 and is in the process of getting 2 ironed out. A live data feed from IB will make it into the next release (due in the next few days) and it will then be down to mapping of orders. On the project page you can see a list of other similar (some more, some less) python projects and may prove to ...


2

Because your python script ends and with it the socket that ibpy has opened to connect to TWS. The demo samples in the sources of ibpy use simple time.sleep(x) to make sure some information has been delivered (for example fancy_marketdata.py) before the script ends. Try to remove the time.sleep(x) lines and see how the script also ends instantly. Have a ...


1

Convex Optimisation - CVXOpt and CVXPy. Textbook by Boyd & Vandenberghe Aside from CVXOPT (known for its cone programming, see http://cvxopt.org/) with extensive documentation by the authors, Boyd and Vandenberghe http://stanford.edu/~boyd/cvxbook/, there is CVXPY which provides an easier front end. CVXPY was designed and implemented by Steven ...



Only top voted, non community-wiki answers of a minimum length are eligible