Equity markets (which stock exchanges are a part of) have existed... since before recorded history. We have reference to equity transactions in the Code of Ur-Nammu. It's likely we've had equity markets for as long as we have had property. 'Something akin to a stock market' has existed in almost every civilization at almost every time. Could you be a bit more specific, either in the time and place or in the specific features you're interested in?