Shares rise on factory data, dollar gains on election jitters