代做Assignment 1 Programming work调试Python程序

- 首页 >> CS

Assignment 1

Due on Sep 18th 18:00.

Programming work. Please submit the SOLUTION in .pdf file and the CODE (together with the data) that can be implemented. Identical reports will be regarded as plagiarism and marked as 0.

Follow the steps and answer the 6 questions. Your solution should contain your answers to the 6 questions and the supportive figures (Figure 1-3). (You can choose matlab, python, R, excel or any programming language you are familiar with to complete.)

Step 1: Pick one stock. Download its historical closing price series over some periods more than one year (e.g., 2020.1.1-2023.12.31).

Step 2: Calculate the daily returns .

Step 3: Draw the histogram of the daily returns (Figure 1).

Question 1: What does this histogram look like? Is it symmetrical around the mean? Does it have heavier left tails or right tails?

Question 2: Calculate the sample mean, sample variance, sample skewness and sample kurtosis.

Step 4: Use the normal distribution to fit the daily returns. Plot the histogram and the fitted normal curve in one figure (Figure 2).

Question 3: What is the fitted expected return with normal distribution? What is the fitted standard deviation?

Question 4: Does the normal distribution fit the sample distribution well?

Step 5: Calculate the log returns .

Step 6: Use normal distribution to fit the log returns.

That is, we try to use log-normal distributions to fit the series . Plot the histogram of and the fitted log-normal distribution curve in one figure (Figure 3).

Question 5: What is the fitted expected log return?

What is the fitted standard deviation?

Question 6: Of the normal distribution and the lognormal distribution, which one fits the data better?

Why?



站长地图