[HN Gopher] Adventures in algorithmic trading on the Runescape G...
___________________________________________________________________
Adventures in algorithmic trading on the Runescape Grand Exchange
Author : partypete
Score : 161 points
Date : 2024-10-26 02:23 UTC (20 hours ago)
(HTM) web link (tristanrhodes.com)
(TXT) w3m dump (tristanrhodes.com)
| kayson wrote:
| This reminds me of when World of Warcraft had a mobile app that
| allowed you to both browse the auction house and list or buy
| items. The API was pretty trivial to reverse engineer, making it
| easy to write an auction house bot. I never got as sophisticated
| as any ML algorithm, just snagged grossly mispriced items and
| bought/sold based on the last week's price range; it was mostly
| about volume. Made a tidy profit, bought my 1mil gold mount then
| gave up. The app was taken down soon after, no doubt in part
| because I'm sure I was not the only person doing this.
| bongodongobob wrote:
| WoW never cared about playing the market, it was probably taken
| down due to the way it was implemented. To be an external app,
| it probably had accounts idling and refreshing the AH and
| pushing that out to the app. I used the Auctioneer in game
| addon for a decade.
| nojs wrote:
| Haha, in the heyday of Runescape it used to be possible to simply
| have buy and sell orders sitting in the GE for the same rare
| items simultaneously, and over time they'd both get filled for a
| profit. I guess you would call it "market making".
| bboygravity wrote:
| This is actually kind of how the US market works with
| essentially 1 market maker who is by far the largest and who
| also happens to be the largest political donor (100 million a
| year to gop alone). Oh, and like Bernie Madoff, the owner of
| that market maker also owns a hedge fund (which like Bernie's
| makes completely impossible profits year after year). The hedge
| fund is of course a totally seperately run business from the
| market maker /s /s /s
|
| So that actually sounds quite realistic to me from the market
| maker point of view of how things actually work in the US.
| postexitus wrote:
| This is _actually_ how markets are made - do you think a
| second hand book shop operates any differently?
| bboygravity wrote:
| Second hand book stores take people's money and then give
| them nothing in return? I'm referring to naked shorting and
| failing to deliver perpetually.
|
| Sorry, I fail to see the analogy.
| next_xibalba wrote:
| You appear to be referencing Jeff Yass and Susquehanna
| International Group. Why are you being cagey about saying so?
| Their hedge fund has had losing years, whereas, as far as I
| recall, Madoff never reported a loss. On what information are
| you basing your claims?
| mmiyer wrote:
| They're referring to Ken Griffin / Citadel (Securities).
| Not that it makes their claims any less silly in terms of
| fundamentally misunderstanding how markets work.
| bboygravity wrote:
| What claim about how the market works is silly exactly
| and why?
|
| My claim was that 1 person owns the 1 major US market
| making business AND a hedge fund. Facts: they can control
| the price (naked shorting + strategic FTDs) and trade on
| it. Even if they can't/don't control the price, they can
| still front run the entire market. And even if they don't
| do that bEcaUsE iT's iLliGaL they legally (not ethically)
| do it through PFOF from Robin Hood among others.
|
| They do all of that and way more. Just look up the
| continuous massive FINRA and SEC violations and the
| (tiny) fines they pay for it.
|
| But I'm sure all is fine and dandy. I find it mind
| blowing why anybody would defend the biggest crook since
| Madoff.
| mmiyer wrote:
| You should be happy that market makers like Citadel
| Securities exist. Payment for order flow is why
| commission free trading can exist. Citadel Securities,
| Virtu, Hudson River Trading, Jump Trading etc compete in
| a negative sum game which reduces the bid ask spread on
| various assets (i.e. make them cheaper to trade for
| everyone).
|
| Also lol that a hedge fund with about 1% of total hedge
| fund assets controls prices. What do you think the other
| hedge funds and trading firms are doing?
| immibis wrote:
| Presumably (s/he thinks) the other hedge funds are not
| also market makers.
| next_xibalba wrote:
| > they can control the price (naked shorting + strategic
| FTDs) and trade on it
|
| This is the bit that seems poorly substantiated and
| unlikely. Please elaborate. Anything evidence you can
| cite would be helpful.
|
| Also, Citadel's HF has definitely had down years.
| sharperguy wrote:
| I used to wake up before school, dump my entire stack of gold
| on the GE for bones (just the regular ones) at a few gp below
| average price. By the end of the day the order would usually be
| fulfilled. Then I'd dump them back on the market at a few gp
| above average price and it would be fulfilled by the morning.
|
| Most days it would net me a small profit, ocasionally prices
| would fall slightly throughout the day and I'd lose a little,
| but equally some days it would rise and I'd make extra.
| andrepd wrote:
| You needed an FPGA to pull your orders on underlying price
| moves /s
| Spivak wrote:
| How could you lose money on a standing sell order for a
| higher price than what you bought it for?
| sidewndr46 wrote:
| lots of video games charge a fee of in game currency for a
| transaction through an auction house or other system. It
| acts like a sink against inflation in the video game
| economy
| immibis wrote:
| RuneScape did not, and did have massive inflation, to the
| point that some players would have trouble keeping their
| wealth in gold coins due to hitting the signed integer
| limit.
| sdwr wrote:
| If the market moves down after you bought, you are stuck
| holding the bag. You can either a) sell for a loss, or b)
| keep your item, and be unable to make further trades until
| the price (maybe?) recovers. Remember that OP put his
| entire stack into this, so he can't run the spread while
| his item isn't selling.
| ironSkillet wrote:
| You can have unrealized losses since it's possible that the
| value of your items is less than the value of the goods you
| paid to receive them. To repeat this strategy the next day,
| you need to convert your items back into gold and realize
| the loss (or just introduce more gold via other means).
| mhh__ wrote:
| This is indeed how market making works.
| beoberha wrote:
| Sorry if I'm just bad at reading comprehension, but what exactly
| is being modeled here? It sounds like the author is just getting
| price data not unlike a candlestick chart. What I don't
| understand is if the trading is happening within the 5 minute
| windows he mentions or if model is finding patterns across
| timeframes?
| Frummy wrote:
| So I don't know this stuff so I'll stochastically parrot a
| reply here of my understanding of what I just read.
|
| The ML model is trained on the price spread and volume data
| collected with the cronjob every 5 minutes and stored in a
| database, and the trades with their respective data, but on
| previously collected data from 63 days up to 14 days earlier
| and then validated on the remaining later 14 days of data,
| apparently to not have temporal leakage which I googled and
| means unintentional backflow of training data which screws up
| the prediction. So to answer your question the model finds
| patterns over multiple weeks of data, to rank the best trading
| choices in the present moment. Then the java component executes
| the trade in-game with the player character.
|
| What I personally don't understand is if this data collection
| and training is rolling continually, or if he let it be trained
| one shot and then it's smart enough to remain profitable. Don't
| entirely understand the 49 day training, 14 day validation
| thing either.
| partypete wrote:
| That's right - I retrained the model every 7 days. These
| experiment results are from the most recent one-week period.
| partypete wrote:
| The training data is composed of the bot's previously executed
| trades from the last 63 days joined on the price/volume data.
| So the model discovers patterns in the price/volume data that
| have historically lead to well-performing trades. The dependent
| variable is gold/second generated from a historical trade.
| alex1138 wrote:
| I'm not sure you can say enough good things about RS in general,
| aside from the very legitimate complaints the community has about
| the ownership, but basically it's a 20+ year game that's still
| getting updates, still getting new weapons and quests and level
| caps
| soared wrote:
| I did this same thing but via a google sheet, really fun either
| how excellent the wiki's API is. The profit per hour shown here
| is abysmal - you'd make more money doing pretty much anything.
|
| I'd like to see market-level and category-level analysis on price
| trends (ie all magic-combat gear is trending up, or this specific
| item has a lagging relationship with another).
|
| If anyone is curious, prices may be out of date but here is my
| profitability spreadsheet, time inputs, etc for various things
| using the api. This is better than the wiki since it can take
| into account trade limits, compare unlisted methods, hourly
| upkeep costs, etc.
| https://docs.google.com/spreadsheets/u/0/d/1iekEqInA2PwEuj1W...
|
| You can tell likely from the methods I'm botting - turns out
| writing bots is even more fun than actually playing. Too bad
| private servers are being taken down through legal means, as I
| can bot there without ethical concerns.
| noitpmeder wrote:
| Has anyone done similar experiments with EVE's marketplace?
| naming_the_user wrote:
| I made approx 1K GBP as a young teenager trading in RuneScape
| prior to the introduction of the GE.
|
| Haggle people down to say 6 mil for a party hat I'd sell for 6.5,
| repeat, when I quit the game I sold it all on eBay, my mum was
| rather surprised when the money came in.
|
| Hourly rate? Awful.
|
| I very much doubt that I'd be where I am today without that
| experience though.
| dleink wrote:
| What line of work are you in now?
| naming_the_user wrote:
| Entrepreneur, multiple income streams, software is one of
| them.
| knuckleheads wrote:
| I did something like this on Hypixel for a month or two. Watched
| the prices for inputs to various crafting recipes as well as the
| craft recipes output prices themselves on a loop, and whenever it
| hit a certain profit level, play a chime and I would go run some
| crafts. Easy enough to pull the info off of
| https://wiki.hypixel.net , and
| https://wiki.hypixel.net/Travel_Scrolls were the ones that most
| often had good returns. You needed a certain skill/level to make
| them, so the prices didn't even out too fast. Got tired of it
| eventually as the game wasn't so deep, but it's fun to mess
| around with for sure.
| mhh__ wrote:
| Arbitrage much more fun when r=0
___________________________________________________________________
(page generated 2024-10-26 23:03 UTC)