#magic ##High Frequency Trading for Magic: The Gathering cards.
We noticed that some of the prices for Magic: The Gathering card prices tend to react to "market news" at a relatively slow rate. A professional player would play the card, the card would increase in popularity in a short amount of time, but prices of the card would take a week to increase due to slow market response.
We wanted to take advantage of this opportunity to be market makers and buy up the cards before they increase in price, so that we can potentially make a tidy profit.
What it does
This program seives through the over 28,000 Magic: The Gathering cards to determine candidates that will probably increase in price significantly in the near future.
It does this by getting rid of every potential card that may decrease in price by using several metrics (e.g. the card going out of rotation for the Standard format or the card is currently banned), and then out of the remaining cards, will pick the ones that have seen a very recent spike in interest by the public using Google Trends.
How we built it
(each file in this section outputs a .txt file with the corresponding name)
listOfCardsSets.py - gets list of all cards*
listFutureOOR.py - rids list of cards that will not be in play for the next block of rotations
ListOneWord.py - rids the list of cards with one word names
listBanned.py - rids the list of currently banned cards
listFinal.txt - would contain final list of cards to potentially purchase
###GOOGLE TRENDS: googleTrends.py - download the csv files for each card in listFinal.txt
trendsAnalyzer.py - analyze the trends, outputs viable cards
main.py - this file combines all the above files into one easy to run program
Challenges we ran into
Getting the list of every card (over 28,000!!!) was very difficult.
Google Trends "API" was difficult to work with.
Accomplishments that we're proud of
We are most proud of how we integrating many different APIs (Google Trends), libraries (beautiful soup), and programs (the Magic master card list getter) together to form one coherent whole.
What's next for magic
Backtesting the program, using better analysis, and perhaps eventually starting a small fund!
*listOfCardsSets.py takes in data in the form of a csv file generated by Gatherer Extractor v3.22 to parse through the file and extract card and set names