In the code belowfrom sklearn.model_selection import train_t…
In the code belowfrom sklearn.model_selection import train_test_split X_train, X_test, Y_train, Y_test = train_test_split(x_no_outliers, y_no_outliers, test_size=0.2, random_state=0, shuffle=True)What does the command test_size=0.2 do?
Read DetailsSuppose I want to simulate a Brownian motion path with the c…
Suppose I want to simulate a Brownian motion path with the code deltat = 1 t = np.arange(0.0, 4 + deltat, deltat) Wt = np.random.normal(0, 1, len(t) – 1).cumsum()Wt = TO BE FILLED Wt = np.append(0.0, Wt) plt.plot(t, Wt) plt.scatter(t, Wt, color=’r’) plt.xlabel(‘t’, fontsize=13) plt.ylabel(‘$W_t$’, fontsize=13) plt.title(‘Brownian Motion Path’, fontsize=13);What should I include in TO BE FILLED so that this code plots a Brownian motion path?
Read DetailsAssume we live in a world where the CAPM holds and it is giv…
Assume we live in a world where the CAPM holds and it is given by ER = lambda beta: beta * 0.05 + 0.02If you know this linear relationship between beta and ER, you can compute the ER for a given beta.What is the ER on a stock with beta = 1.5?
Read Details