Market (Age of Empires II)

"Used to buy and sell resources, trade with other players by land, and research trade improvements."

- Age of Empires II description

The Market is an economic building in Age of Empires II that becomes available once the Feudal Age is reached and a Mill is built. Markets enable trade with Trade Carts to generate gold, making them extremely important in later stages of team games. Also, resources can be sent and exchanged, and trade-related technologies can be researched here.

Tactics and Placement
Markets make an essential part on economy especially in team games as they provide an unlimited source of gold, through trading.

The equation for gold received while trading at other Markets is quadratic. The farther away the Market is, the more gold the Trade Carts return. The productivity increases with the distance, so it is always worth it to build Markets far away from other Markets even though the Trade Carts take longer to reach their destination.

When trading with allies, is important to know which Markets are better defended to prevent losing trade units. It is also recommended to protect trade routes with military units or defensive structures. If Trade Carts must travel through a wall, it is important to remember to keep the Gate open at all times to avoid losing Trade Carts, because when they reach a closed Gate, they will take another way to reach their destination even if the Gate is opened a short time after they reached it. Often, Trade Carts are lost because of that since the route they then choose is likely to be dangerous.

Markets are also important because a player can interchange their own resources. This can greatly help to jump through Ages or to overcome a temporary shortage of a particular resource.

The Market exchange rates are universal for every player. Every transaction changes the base exchange rate for the resource by +/-3 for buying and selling, respectively. Base prices are capped by min. 20 and max. 9999. The actual prices are also influenced by the 30% trading fee (15% with Guilds researched), which gets added/subtracted from the exchange rate.

The Saracens have a trading bonus that lowers their interchange tax to 5%. This also allows them to reach the Castle Age sooner than other civilizations an perform a Monk rush.

Trade Cart Gold
Trade routes should always be made as long as possible, as the increase in gold for markets placed further apart is greater than the increase in time taken for a trade cart to complete the journey. The exact equation for gold received from trading is:

$$ \text{Trade cart gold } = 0.46 \times d \times \left ( \frac{d}{\text{map size}} + 0.3 \right ) = \frac{0.46}{\text{map size}} d ^ 2 + 0.138 d $$

where $$ \text{map size} $$ is the number of tiles along any edge of the map, and $$ d $$ is roughly the Euclidean distance between the markets, or exactly:

$$ d = \max \left \{ 0.1, \sqrt{ \left ( \max \left \{ 0, \left \vert \Delta x \right \vert - 5 \right \} \right ) ^ 2 + \left ( \max \left \{ 0, \left \vert \Delta y \right \vert - 5 \right \} \right ) ^2 } \right \} $$

where $$ \Delta x $$ and $$ \Delta y $$ are the distances between the markets in either axis-aligned direction, measured from the center of each market.

Note that the 0.46 in front of the first expression for trade cart gold is actually calculated as $$ 2 \times 0.345 \div 1.5 $$ by the game, where 2 is a constant, and the other two terms depend on the trade cart speed and whether the player has a Spanish ally - but can in general also be treated as constants.

Civilization Bonuses

 * Burmese: Researching Faith is 50% cheaper.
 * Byzantines: Markets have +20%/+30%/+40% HP in the Feudal/Castle/Imperial Age. Town Watch is free.
 * Chinese: Technologies that benefit Markets are 10%/15%/20% cheaper in the Feudal/Castle/Imperial Age. Market technologies are 10%/15%/20% cheaper in the Feudal/Castle/Imperial Age.
 * Khmer: Markets don't require a Mill.
 * Malians: Markets are 15% cheaper.
 * Persians: Researching Town Watch and Town Patrol is 10%/15%/20% faster in the Feudal/Castle/Imperial Age.
 * Saracens: Market trade cost is only 5%. Markets are.
 * Spanish: Markets are built 30% faster.

Team Bonuses

 * A team containing Malians: Researching Masonry, Architecture, and Treadmill Crane is 80% faster.

The Age of Kings

 * Markets always have 2100 HP.

The Conquerors

 * Heresy introduced.
 * Caravan introduced.

The Forgotten

 * Market HP staggered: 1800/2100/2100 in the Feudal/Castle/Imperial Age.
 * Saracens: Markets now are 43% cheaper.

History
''As the Dark Ages gave way to better economic conditions, the exchange of produce and craft goods increased. Towns of all sizes set aside an area for a market where farmers and tradesmen could set up stalls for selling their merchandise. One or more days each week were designated market days and became the social highlight of the typical workweek. The market was also a place for the exchange of ideas, entertainment (bards, acrobats, musicians), and the spreading of news.''