Equal allocation and max active trades #208
Replies: 2 comments 1 reply
-
It’s all in the docs: either use ‘amount’ or ‘value’ for constant position size (https://vectorbt.dev/docs/portfolio/enums.html#vectorbt.portfolio.enums.SizeType) and set initial cash to ‘auto’ (https://vectorbt.dev/docs/portfolio/enums.html#vectorbt.portfolio.enums.InitCashMode). You can then query for the max spent cash using Portfolio.init_cash. |
Beta Was this translation helpful? Give feedback.
-
pf = vbt.Portfolio.from_signals(price_info, entries=spikes_df_entry, freq="D",size=10000,size_type="Amount",init_cash='autoalign', fees=0.0025,sl_stop=0.1,adjust_sl_func_nb=adjust_sl_func_nb) sum(pf.trades.records.pnl) =2118359422.75 The difference between is not aligned with pnL How can we log the entry actual index into the trade log (dates) and the symbols now passes as columns. Moreover the trade holidays are not accounted as it is already removed from the index i think is the index it is used it would be much understandable |
Beta Was this translation helpful? Give feedback.
-
I was trying to allocate equal amount to each trade and find max fund required or max active trades no limit on max possible portfolio value. If possible how can we equal amount for every trade. can you advice on how to implement that
Beta Was this translation helpful? Give feedback.
All reactions