Searching the best trading route - algorithm
This problem is NP-Complete by reduction from Directed Hamilton Path. I use the method of the linked mathoverflow answer. Let's say $b(v)$ and $s(v)$ is the good that villager $v$ buys and sells, respectively (each villager only buys/sells one good). Then you may ask, what dealers can I visit consequtively? This is the following graph:

$$G = \langle \text{Villagers}, \{ (\sigma, \beta) | s(\sigma)=b(\beta) \rangle $$

This directed graph has an edge from $\sigma$ to $\beta$ iff $\sigma$ sells something that $\beta$ buys (using the letters $\sigma$ and $\beta$ because they sound like 's' and 'b' for seller and buyer). In this graph, you are one node called $y$ and you have a good, $s(y)$, which you want to sell. You can verify that you are looking for a route through $G$. How much profit do you make? If $\$_b(v)$ and $\$_s(v)$ are the buying and selling price of villager $v$'s goods, and you travel some route $v_1\cdots v_k$ through the village, then your profit is: (w.l.o.g. assume that you start with $1$ unit of your good)

$$ \text{Profit}(v_1\cdots v_k) = \prod_{i=1}^{k}\frac{\$_s(v_i)}{\$_b(v_i)}$$

This suffices for a reduction from Directed Hamilton Path: Take a directed graph $H=\langle V, E \rangle$, and say you want to find out whether there is a Hamilton Path starting in vertex $x$. Suppose that the $n$ vertices are villagers. Each villager $v_i$ trades his own good for his own good at a $1/1$ ratio. Now populate the village further as follows. For each edge $(\sigma,\beta)\in E$ in the graph, add a "stockbroker" villager called $\tau_{\sigma,\beta}$ who buys $\sigma$'s goods and sells the goods that $\beta$ buys at a rate of two units of $\beta$ for each unit of $\sigma$. That is, $b(\tau_{\sigma,\beta})=s(\sigma)$ and $s(\tau_{\sigma,\beta})=b(\beta)$ at $\$_b(\tau_{\sigma,\beta})=1$ and $\$_s(\tau_{\sigma,\beta})=2$. In this scenario, you are villager $x$. 

If your profit problem were easy, then you could ask 'Is there a route from $x$ which makes  $2^{n-1}$ profit?' Iff there is such a route in the graph I constructed, then there is a Hamilton Path in the graph I constructed it from. $\square$

So this problem is NP-Complete and in fact it is hard even to approximate. Instances of the problem that are not contrived are probably more difficult. You can also make an elegant reduction from Traveling Salesman by assigning to each villager a profit $\varepsilon(v_i)=\log\left(\frac{\$_s(v_i)}{\$_b(v_i)}\right)$, I'll leave the details up to you. If you really mean to solve this problem practically, you can look for some advice in this question here (link) and in the extensive literature on TSP and related problems. Personally, I would use a greedy algorithm which looks ahead some fixed number of steps, say $3$ steps. Or you can use an evolutionary approach, which should work just fine, too.

Here's one heuristic: given a candidate solution $v_1\cdots v_k$ computed by an evolutionary algorithm, you can check the intermediate profits halfway along the route, and quickly find the point at which you should have stopped. Fix only the last part of the path $v_j\cdots v_k$.