There is a whole host of actions that can affect a trader's reputation, from selling rare merchandise to destroying an infamous pirate. A good reputation is required to attain a higher social rank and create businesses outside your home town.
Local reputation will only affect a single town, while Hanse-wide bonuses will improve your reputation everywhere.
Organizing public convoys and outriggers, getting married and having children, donating gold into the Town Coffers and winning a siege while serving as Lord Mayor will also provide minor reputation bonuses.
To prosper, every town needs to stock enough goods of all types. Traders that reliably sell adequate quantities of scarce commodities will be highly respected. This kind of reputation requires a steady supply of goods over time.
The needed weekly amount of goods can be seen in the Market Hall (consumption tab). The town should always have enough stock of all goods to last 1-2 weeks. This is especially important for Beer, Grain, Fish and Timber (known as Big Four), which should be sold in adequate amounts regardless of price (if you want the town to grow and respect you, that is).
If a trader manages to supply a town that is under siege or suffering from a famine or plague, they will gain an additional reputation boost, representing the town's gratitude.
Donating gold (local)
Donating gold to a church to contribute towards extending or decorating it - as well as answering miscellaneous requests, such as donations for art galleries or shelters for poor people - will provide short and long-term reputation boosts in a town.
Hunting pirates (Hanse-wide)
Traders that destroy pirates and their hideouts are highly respected throughout the Hanse. The Side Room in the Tavern sometimes houses volunteer pirate hunters.
Fulfilling missions and contracts
Traders can accept some important tasks in the Town Hall and Tavern. If they prove they can be trusted with these tasks, they will gain local and Hanse-wide reputation bonuses. Some of the tasks have their own reputation requirements.
Constructing buildings (local)
Citizens will appreciate the hospitals, chapels, roads and wells that you build in their town (which provides a permanent reputation boost). Houses and businesses create job opportunities that people will be grateful for as long as you don't raze them.
Organizing a celebration (local, short-term)
Celebrations will provide a reputation boost that will fade after a while. The number of guests depends on your current reputation, it can range from around 60-70% of population in a city where people generally like you, to the entire town population if the city is convinced about you.
For a successful celebration, the amount of food per 1000 guests should be as follows:
You may want to add a few barrels on top of that just in case.
Expeditions (Hanse-wide, long-term)
Discoveries of new trading opportunities and successful expeditions will be remembered.
Reputation can also be damaged. Avoid any of the following, unless you know that you can get away with it:
Buying scarce goods
Impounding possessions of a trader who cannot repay a loan
High interest rates when granting loans (very small penalty, feel free to ignore this)
Cancelling a public convoy when some traders have already joined it
Failing to fulfill contracts
Piracy and talking to underworld characters in the tavern
Not using the Bath House regularly
Not praying in the church
Losing a siege or withdrawing gold from the Town Coffers (for a Lord Mayor)
Ignoring important events that damage Hanseatic interests (for an Alderman)
A few of these activities are illegal or frowned upon. They may result in fines and ruin your reliability.