[SOLVED] FINML Homework 1

30.00 $

Category: Tags: ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon hw1-y0a4y1.zip (1831.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
đź”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Home Work

  1. Insert a column in the data set where the entries are 1 if the stock outperforms SPY in the earnings period and -1 if it underperforms or has the same return
  2. Insert a column in the data set with entries: 2 if the stock return is more then 5% higher than the SPY return, 1 if it is more than 1% but less than 5% higher, 0 if it is between -1% and 1%, -2 if the stock underperforms the SPY by more than -5% and -1 if the performance is between -1% and -5%

3. A regression tree is used when the labels are real numbers instead of categories. Think of a linear regression situation when we have

data points {xi} and response variables {yi} that are real numbers.
A regression tree uses the variance of the response variables instead of the Gini index. If nj is a node with data {xij} and {yij} the variance of the response variables is

where is the average of the

Tosplitthenodeintonj1 andnj2welookforthesplitthatminimizes

In the notebook “Visualizing Trees” use a DecisionTreeRegressor instead of the DecisionTreeClassifier, directly on the data1 and the target (so do not transform the target into labels).

Instead of taking max in each rectangle take the average and generate the image.

Experiment with different color schemes (cm.?)

  • hw1-y0a4y1.zip