I just realized that I have never seen in an RPG anything pertaining to the boring state of affairs called trading. Has anyone done anything interesting in that regard or is this a thing that should be devolved into a skill check?
well, the best example i have seen thus far is Mongoose Traveller, especially with the Merchant Prince book.
for other examples, the WEG d6 Star Wars game had rules for trade in GG6: Tramp Freighter. it also has a Minos campaign that focuses on trade.
if you want a lot of detail, GURPS traveller look at these things as well, but their system for trade is far less robust. it is a good research for RP and setting detail however.
those are the best i have seen, the real issue with it is that most such games dont really model the macro-scale of trade at all, and only provide a micro-scale for a single player ship to haul goods. the GM will likely have to plan their own macro-scale events on their own.
WFRP 2e has it in one of the sourcebooks. Old World Companion, I think, but I'm not completely sure. Like Xenon mentioned, it just covers small-scale trade in which the PCs are playing merchant, nothing broader than that. Not to my knowledge, anyway.
And I'm suddenly remembering that one of the Mystara books for B/X D&D had a similar system, though I couldn't tell you which one. Darokin maybe?
I'm not sure I remember which one but one of the fate games has trading rules Bulldogs! or Diaspora IIR.
If you really want to make detailed trading rules then the old Microgame Trailblazer would be a good place to start. It has a very detailed set of trading rules. It's the main focus of the game.
Personally, I like more generic rules for this. I like the KEF rules. (Keep 'er Floating, Keep 'er Flying) You can see them here for Tramp freighters but it should not be too hard to convert this to space trading rules.
Traveller comes to mind first. There's also a couple of Traveller hacks for fantasy and/or historical worlds.
Of note, World's Apart seems quite well done. It supports trading and exploration in a fantasy world where landmasses are seperated by a deadly ocean only special ships can navigate. It's very much Traveller reskinned into Fantasy, but looks really interesting. There's a free (no art) version as well.
I put together a little fan-made supplement for Bulldogs! (Fare-based SF) a while ago, intended to support a bit more detail in trading and ship maintenance. Link is in my sig, but the trading mechanics are fairly light.
Its basically a programming question with variables no one cares about.
Three points of interest are the starting location, Adventure! and finishing location.
At the starting location you'd define the trade good (materials, luxuries, medicine, passengers) and your expected profit margin (positive because no one's going to do a negative trade run because that's bad. You'd also define how perishable the trade good is.
You go on Adventure! which in a real sense is your travel from the starting point to the finish. This travel either increases your profit margin (whatever you have got more needed on your trip got more expensive) or lower your profit margin (you took too long and things are spoiling, or orks ate your passengers)
At the end, you make money, barring being screwed over by the locals at the venue or you make more money by screwing over the locals.