vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

How to reserve cash in portfolio mode?

Open gordonhui112 opened this issue 4 years ago • 2 comments

Is it possible to keep cash level at least to 50% of the total portfolio including cash in portfolio mode?

gordonhui112 avatar Jun 12 '21 11:06 gordonhui112

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.

polakowo avatar Jun 12 '21 11:06 polakowo

Thank you!

gordonhui112 avatar Jun 12 '21 11:06 gordonhui112