vectorbt
vectorbt copied to clipboard
How to reserve cash in portfolio mode?
Is it possible to keep cash level at least to 50% of the total portfolio including cash in portfolio mode?
Which method do you mean by portfolio mode? There are three: from_order_func, from_orders and from_signals. In the first two, you can specify both target value and percentage of the total portfolio value by using size_type='targetvalue' and size_type='targetpercent' respectively. So setting your target percentage to 50 will keep 50% in cash. This is not possible in from_signals though.
Thank you!