Please have the following installed as well as mySQL, see online documentation for how to install mySQL for your system.
pip install matplotlib
pip install polygon
pip install -U polygon-api-client
In mysql, you can use the terminal, run source start.sql;
To automatically run the pull-data.py file you will need to do some setup.
- Make an executable
chmos +x pull-data.py - Edit the crontab, command-line utility used to schedule tasks
crontab -e - Add a cron job so that we can run the script at a specific time
0 23 * * 1-5 /usr/bin/python3 /path/pull-data.pyHere we add a job 11:00 PM local time for Monday-Friday, verify the python3 location as well as where the script is stored. The two stars here indicate that it can run any day and any month.
- Open the Task Scheduler
- Go to "Create Basic Task"
- Select "Daily" then set the time to 11:00 PM
- Choose "Start a program"
- Under "Program/script" Put the path to your python executable. This is likely under "C:\Users\YourUser\AppData\Local\Programs\Python\Pythonyour version\python.exe"
- Under "Arguments" (optional) put the path to the pull_data.py
- Then just click finish setup
In your commandline, launch mysql with the following command to ensure you can load in data properly:
mysql --local-infile=1 -u your-user -p
Then type in source start.sql;
This will create the database, set it up and load in data.
To run the trader app, run python3 app-trader.py
This app is meant to mimic how a trader would interact with a trading database, they can see how a fund is perfomring, make or cancel trades, and view market data.
You will be prompted to either create a new username and password or you can login
To run the compliance app, run python3 app-compliance.py
This app is meant to mimic how someone in compliance would interact with a trading database, they can also see a fund's performace, but cannot edit the tables at all (aside from via the functions and procedures needed for logging in). They also have specialized options such as being able to see how much of an asset is held across the firm and how many trades go through a certain clearinhouse.
You will be prompted to either create a new username and password or you can login