Starting portfolio for simulated strategy

Is there a way to initialize a simulated strategy backtest with a custom starting portfolio? So let’s say I have a 10-stock strategy, but instead of creating the first portfolio based on ranking and rules you give it an initial position list. Maybe 3 of the 10 stocks trigger the sell rules at that time so it keeps the other 7 and adds 3 new ones to start the test and runs normally from there.

Create a Buy rule with your tickers like this: Ticker("IBM NVDA XOM META AAPL") or PortBars>2
That means buy those tickers on day one. Then later the PortBars>2 part will pass.

Then any other Buy rules would need to be modified so they pass on day one so all ten of your tickers are bought even if they fail a buy rule. Example: mktcap < 500 or PortBars<2

Of course, all your tickers need to be in the universe selected for the simulation.

1 Like