How to Get Started with Algorithmic Trading in Python

Download Solution Order New Solution

Assignment Task

The main task is to write a program to assist a trader with entering and viewing their trades, and showing the current state of their portfolio.

You can complete this program using the tools [Pyton variables, python data types, python casting, python strings, Booleans, python operators, python list, python tuples, python sets, python dictionaries, python if, elif, else, python while/for loops, python function and python lamda]of the subject. You may import the following modules from the Python standard library (and no others):

  • Datetime for handling dates
  • Csv for reading and writing CSV files
  • Json for reading JSON files
  • Operator to help sort data

1. Load trading data

This option will load a CSV file containing data about the buying or selling of stocks. The program will ask for a filename from the user. Use the exact filename as stated, do not append .csv or otherwise modify the user’s input. The program should check if the filename is not blank, then try to open the file and read it as a CSV file. If the filename is invalid, or the file doesn’t exist, or the contents don’t match the expected format, the program should give an error message, and ask for the filename again. Use exception handling to enable this error-checking.

2. Load current stock prices 

This option will load a JSON file containing data about the current price of stocks. Separate from the list of trades is a list of the current prices of stocks. The program should load price data from a JSON file, where a stock ticker symbol maps to a price.

This IT Computer Science has been solved by our PhD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.