Can bt be used to buy certain dollar amounts of stock (vs rebalancing to weights)?
brettelliot opened this issue · 4 comments
brettelliot commented
Hi,
Let's say i want to build a trend strategy with a universe of 10 stocks. Id like the strategy to invest up to 10% of the total portfolio value when any stock is trending up. Say stock A goes up, and i end up buying 100 shares. When stock B goes up, I want to invest up to 10% of the current portfolio value (which is hopefully higher since we invested in stock A because it was going up). But I don't want to change anything about stock A's position. We should keep the 100 shares of stock A no matter what percentage of the portfolio they amount to until the strategy decides to sell stock A.
Can bt backtest a strategy like this?