Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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!
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 iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started