Closed vsaveris closed 3 years ago
Description of the new argument:
max_investment(float, default=None): Maximum investment for all the opened positions (short
and long
). If the sum of all the opened positions reached the maximum investment, then it is not allowed to open a new position. A new position can be opened when some balance becomes available from a position close. If None, then there is no upper limit for the opened positions.
Development is done, ready for test cases development.
Currently, in the runSimulation method of the tti.package, all the
buy
trading signals are processed, without any limitation on the investment.This can bring some unrealistic scenarios, in case of a high number of consecutive
buy
signals. In that case the investment can become very high.For this reason a new input argument should be introduced (max_investment). In case where max_investment already reached, new
buy
signals are being ignored, till some balance becomes available with asell
trading signal.Simulation code, and returned simulation data should be updated accordingly.
ignored_buy_signals
entry should be included in the returned statistics.Target release 0.1.b3
Tasks: