First off I wasn't sure which exchange to ask this on. Eventually this will be turned into code using real data, but for now I just need some advice on how to start so I thought this might be the right place.
Say you have a market where items are traded and there is no currency. It would be useful to calculate an approximate "value" of each item based on how it has been traded in the past.
So you'll have a list of transactions like:
itemA + itemB = itemC + itemC
Where one person traded items A and B to another person for 2 of item C. This list will be of every trade that happened in the market. So once you have a lot of the these transactions there should be some algorithm that calculates a value for each item relative to the others which will get closer to the "true value" of the items every time you add a transaction.