Question: PLEASE USE PYTHON AND CLEAR CODE TO FOLLOW THANK YOU! We have trained a simple machine learning model to predict whether we should go LONG

 PLEASE USE PYTHON AND CLEAR CODE TO FOLLOW THANK YOU! Wehave trained a simple machine learning model to predict whether we shouldgo LONG or SHORT a stock depending on 2 factors: - its

PLEASE USE PYTHON AND CLEAR CODE TO FOLLOW THANK YOU!

We have trained a simple machine learning model to predict whether we should go LONG or SHORT a stock depending on 2 factors: - its earnings per share (EPS); and - its returns on equity (ROE). The model comprises 3 lists of values: - eps: a list of 100 EPS values (normalized to between -1 and 1) - roe: a list of 100 ROE values (normalized to between 1 and 1 ) - signal: a list of 100 'LONG' or 'SHORT' signals corresponding by list index to the eps and roe values The values are generated using the following code snippet: import random random. seed (312) def f(r,c) : return [[ random. uniform(i-c, i)/c for i in range(c) ] for in range (r)] eps, roe, signal =f(3,100) signal =[ 'SHORT' if i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!