Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

BEEM062 Main Assignment Part B Brief

2022

1    Live Information from API Calls (25 marks)

1.1    Web Page with Live Quotes (10 marks)

Create a combination of .html .css and .js files that when placed in the same folder allow a browser to render a web page that displays live information. This live information needs to include 3 or more observations recorded over time of 1 financial data source from an API like Quandl, Whatsonchain, or Cryptocompare.  See appendix for examples of code you can combine to achieve this.

1.2    Time Series in Python (15 marks)

From a Jupyter notebook in Python, extract one single time series of your choice from:

❼ the Quandl API, call it zt

❼ the CryptoCompare API, call it yt

Depending on availability, choose your own frequency and time period, making sure that you can analyse both time series by treating them each as a one dimensional array of the same length.  Use the numpy library to find OLS estimates of a and 8 in the following specification, where et  is an assumed white noise error:

yt  = a + 8zt + et

❼ Analytically from standard OLS formulae

❼ By trial and error Machine Learning with a Gradient Descent (GD)

Algorithm

 

2    Bitcoin Wallet (25 marks)

Building further on the Bitcoin wallet constructed for beem061 (construct a webpage that generates a private key, shows an associated address and QR

code, but in addition add the following (again, use Satolearn.com resources as a reference).

 Balance associated with the address

❼ Hierarchical Deterministic Key system

❼ Mnemonics

 

3    AI and the Blockchain (25 marks)

In about half a page each, explain each of the following (be sure to reference where appropriate):

 The difference between AI and General AI

❼ Turing Completeness

❼ Discuss whether Bitcoin is Turing Complete

❼ Discuss what role blockchain might play working with AI in the future

 

4    Time Series Forecasting (25 marks)

In this section you are set an open ended mission of using everything you have learned to create a Python notebook that produces a time series forecast of a financial time series of your choice. Pick one single financial time series that you are interested in (eg the Bitcoin SV price in Sterling), and conduct your analysis in stages: In the first stage, you must describe why you have chosen the series, and what factors you think affect it.  Where relevant, describe any general trends, specific events, and what variables you think may drive it.  Distinguish between variables that you should be able to obtain, versus those you cannot.  In the second stage, conduct your analysis.  There are many potential difficulties to overcome,  including extracting the relevant time series (you could use the quandl or cryptocompare API calls already used, or any other).

Your analysis should include one of the following:

❼ Reduce a larger model with many variables (more than 10) down to a

smaller model by applying a Machine Learning Technique like L1/L2 Regularisation.

OR

❼ Using K-means clustering, assign many variables (more than 10) into

clusters.

 

5    Appendix Section 1 Code Examples

Example  of  an API  call  (Whatonchain BSV price)

const woc_api_url =  ’https://api.whatsonchain.com/v1/bsv/main/exchangerate ’ async function getwoc()  {

const response =  await fetch(woc_api_url);

const data =  await response.json();

const  {currency, rate} = data;

}

getwoc();

Example  of plotting  a time  chart  (from the Plotly  library)

<head>

<script  src=’https://cdn.plot.ly/plotly-2.9.0.min.js ’></script> </head>

<body>

<div  id=’myDiv’></div>

<script>

var data =  [

{

x:  [’2013-10-04 22:23:00’,  ’2013-11-04 22:23:00’,  ’2013-12-04 22:23:00’], y:  [1, 3, 6],

type:  ’scatter’

}

];

Plotly.newPlot(’myDiv’, data);

</script>

</body>