People often assume that capitalism began in the Renaissance and early modern (post medieval) period. Marx famously assumed an "age of feudalism" was replaced by an "age of capitalism," something he dated around the time of the French Revolution (1789). But in fact capitalism was alive and well in the Middle Ages.
The basic capitalistic ideas of investing money in something now in the hopes of getting a nice return somewhat later, and of buying low and selling high, were certainly present in the Middle Ages. (And medieval scholars have found it much easier to understand the Middle Ages if one leaves out the confusing and contradictory label "feudalism," as I have discussed before.) Here are some examples.
A landlord in a good wine-growing region (like Burgundy) would make a capital investment to get a new vineyard started. He would buy rootstock of wine grapes and all the tools, trellises, and the like that growing grapes required. But since he had no interest in working the vines himself, he would go shares with a peasant who understood wine grapes. The peasant contributed his labor to go with the landlord's capital investment. In this system, called complant, the two would share the vineyard's profits once it was producing, in three to five years. (See more here on medieval wine.)
Similarly, an Italian merchant undertaking a trading expedition to Constantinople might not have enough money to outfit his ship. He would also need cash to cover expenses on the route, much less to buy the luxury goods to bring back. So he would encourage fellow citizens to invest in his ship and its future contents. If he did well, bringing back lots of goods on which he made a tidy profit, they would see a nice return. If the ship sank or was lost, they got nothing. Just like the modern stock market.
So why do people now assume there was no capitalism in the Middle Ages? As far as I can tell, it's because they assume that people centuries ago must have been crude and stupid and not have money, none of which of course is true. Humans seem inclined to buy and sell even in the most difficult situations. As Primo Levi recalled in his memoir of the concentration camps, Survival in Auschwitz, there was a strong black market in the camp, even if the only currency available was bread.