The historical context of The Merchant of Venice turns, for the most part, on one question: the status of Jews in Shakespeare's England. Jews had lived in England throughout the Middle Ages; they were treated then as property of the King, and were permitted to stay in England, over the protests of the Church, only by his "good graces." In fact, English kings allowed the Jews to remain in England largely for financial reasons: practicing trades, particularly money-lending, that were highly profitable but forbidden to Christians for religious reasons. Jews earned large sums of money, profits that were then, under the burden of equally large taxes, usurped by the King. Eventually, taxation impoverished most English Jews to an extent that they were no longer a source of revenue for the King; at that point, the King, Edward I, expelled the Jews from England in 1290. A few Jews converted to remain in England, but most were banished. Thus, there were essentially no Jews living in Shakespeare's England, making it unlikely that Shakespeare ever even met one.
The Merchant of Venice was probably first performed in 1596 or 1597. At that point, two treatments of Jews, one legal and one dramatic, were in recent memory. In 1594, Roderigo Lopez, one of the few Jews in England, and the Court Physician to Queen Elizabeth, was put on trial for treason. At a time of feverish anti-Spanish sentiment, Lopez, of Spanish descent, was the victim of a court intrigue (involving an aspirant to the Spanish throne named, like the "merchant" of this play, Antonio), and was accused of conspiring to assassinate the Queen. On no evidence, Lopez was convicted of treason and hung for his supposed crime. The result of the trial was an upsurge of anti-Semitism in England, a sentiment to which this play can arguably attribute some of its initial popularity.
The primary dramatic influence on Shakespeare's play is undoubtedly a play, likely of 1589, by the other major playwright in