I have been running a relatively large backtest (>5 years and >5000 stocks), using pre-adjusted price data to try to deal with corporate actions. However, I still have a couple of problems: the first being that I am not sure if I need to do any more adjusting to deal with such actions, and the second being that I receive bonus shares in the backtesting period on occasion from a couple of the companies I am buying and due to the fact my transaction records do not account for this extra quantity they end up being held for years longer than they should be (i.e, up until the present moment as they are never sold).
How should I deal with these bonus shares? Do I need to use portfolio weightings instead of stock quantities? And is there a way to deal with them even if I can only specify stock quantities?