Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Machine learning questions. 4 questions. look at attached 1. Please construct a new dataset by either adding two independent variables or removing two independent variables from finalsample.dta datas

Machine learning questions. 4 questions. look at attached 

1. Please construct a new dataset by either adding two independent variables or removing two independent variables from finalsample.dta dataset. If you choose to add two independent variables, you could add any two independent variables that you think help explain stock returns. If you choose to remove two independent variables, you could remove any two independent variables that already exist in the finalsample.dtadataset.

2. Split your new dataset into training and testing samples. Testing sample should include data with year>=2016. 

3. Build a wide and deep neural network model. Set the wide model to have 2 hidden layers and the deep model to have 10 hidden layers. Set kernel_initializer=uniform and activation=relu.

Set the training data from the year 2010 to the year 2015 as the validation dataset and the data in years <2010 as the new training set for tuning hyperparameters. 

Use Optuna to tune and search the number of neurons in the wide network model, the number of neurons in the deep network model, the value for epochs and the value for batch size. Feel free to choose the number of trials for the search. And report the best hyperparameter values found by the search. 

Apply those best hyperparameter values found by the Optunasearch to the wide and deep neural network model. Train this wide and deep neural network and use the trained model to predict returns based on your testing sample. Report the average return of the portfolio that consists of the 100 stocks with the highest predicted returns in each year-month. Also, report the Sharpe ratio of the portfolio. 

4. Build a convolutional neural network with one convolutional layer. Use one hidden layer before the convolutional layer and another hidden layer after the convolutional layer. Set kernel_initializer=uniform and activation=relu. 

Set the training data from the year 2010 to the year 2015 as the validation dataset and the data in years <2010 as the new training set for tuning hyperparameters. 

Use Optuna to tune and search the values for kernel_size and filters for the convolutional layer. Also, search for the number of neurons in the two hidden layers, the value for epochs, and the value for batch size. Feel free to choose the number of trials for the search. And report the best hyperparameter values found by the search. 

Apply those best hyperparameter values found by the Optunasearch to the convolutional neural network model. Train this convolutional neural network and use the trained model to predict returns based on your testing sample. Report the average return of the portfolio that consists of the 100 stocks with the highest predicted returns in each year-month. Also, report the Sharpe ratio of the portfolio.

look at attached file. 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question