added test for portfolio auto update stock member
refactored