Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction In this assignment you are to create a program called advisorbot. Advisorbot is a command line program that can carry out various tasks to

image text in transcribedimage text in transcribedimage text in transcribed

Introduction In this assignment you are to create a program called advisorbot. Advisorbot is a command line program that can carry out various tasks to help a cryptocurrency investor analyse the data available on an exchange. Example interaction with advisorbot Advisorbot responds to commands typed in by the user. Here is an example interaction: advisorbot> Please enter a command, or help for a list of commands user> avg ETH/BTC ask 10 advisorbot> The average ETH/BTC ask price over the last 10 timesteps was 1.0 user> predict max ETH/BTC ask advisorbot> The max ask for ETH/BTC might be 0.9 From the example, you can see that the commands take several parameters. Your job is to implement a whole set of commands in a robust way with proper error checking and implementation. The required commands are listed in the next section. It is fine to base your code off the code provided in the course. For example, you will certainly find the CSV parsing code and the tokeniser function useful. Make it clear in your source code and report which bits you wrote and which bits came from the example code or other places. Task 1: implement commands You advisorbot responds to a set of commands. You will need to write some sort of command parsing system which takes the command string as input and extracts the elements of the command. The extracted command elements should be checked for validity and converted into the appropriate data types. For example, the number of time frames in the avg commands should be an integer, the product name should be a string. Here are the commands you need to implement in your code. C1: help Command: help Purpose: list all available commands Example: user> help advisorbot> The available commands are help, help , avg, time, (etc. list all commands C2: help cmd Command: help cmd Purpose: output help for the specified command Example: user> help avg avg ETH/BTC bid 10 -> average ETH/BTC bid over last 10 time steps C3: prod Command: prod Purpose: list available products Example: user> prod advisorbot> ETH/BTC, DOGE/BTC C4: min Command: min product bid/ask Purpose: find minimum bid or ask for product in current time step Example: user> min ETH/BTC ask advisorbot> The min ask for ETH/BTC is 1.0 C5: max Command: max product bid/ask Purpose: find maximum bid or ask for product in current time step Example: user> max ETH/BTC ask advisorbot> The max ask for ETH/BTC is 1.0 C6: avg Command: avg product ask/bid timesteps Purpose: compute average ask or bid for the sent product over the sent number of time steps. Example: user> avg ETH/BTC ask 10 advisorbot> The average ETH/BTC ask price over the last 10 timesteps was 1.0 C7: predict Command: predict max/min product ask/bid Purpose: predict max or min ask or bid for the sent product for the next time step Example: user> predict max ETH/BTC bid advisorbot> The average ETH/BTC ask price over the last 10 timesteps was 1.0 Note that it is up to you to select an appropriate algorithm to carry out the prediction. Most people use a moving average but there are more interesting algorithms. C8 time Command: time Purpose: state current time in dataset, i.e. which timeframe are we looking at Example: user> time advisorbot> 2020/03/17 17:01:24 C9 step Command: step Purpose: move to next time step Example: user> step advisorbot> now at 2020/03/17 17:01:30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions