Choosing a legal framework for Spanish stock markets, 1800-1936