Ask Applied Statistics Expert

Question 1: Stationarity and normality test

XLF is an ETF constructed by SPDR using equities from Financial Select Sector. For this question, you are required to download following equities from Yahoo Finance.

  • XLF
  • BAC
  • C
  • JPM
  • WFC
  • GS

For all the equities above, you need to download 5 year length of daily data and do following tasks:

1. Calculate daily return (either type) and test its stationarity and normality. In the end, you should construct a table which contains three columns (Equity name (character), Stationary result (True or false), normality result (True or false)).

2. Calculate monthly return (either type) and repeat step 1. In the end, what's your observation when comparing the result for tests of daily return and tests of monthly return?

Question 2: Linear regression

For this question, you need to use the data from question 1 and construct a portfolio.

1. Build a linear model using XLF as respond variable and remaining equities as explanatory variables. Denote this model as Model 1.

2. Obtain the summary report from the linear model and explain all variables (α and β). Are they significant?

3. Calculate the correlation between XLF and remaining equities. Select three equities which has the highest correlation and construct another linear model. Denote this model as Model 2.

4. Compare Model 1 and Model 2, which model has better performance?

Question 3: Gradient descent

Use gradient Descent to find local minimum of the function:

f(x) = (x2 + 3x - 5) * cos(x) (1)

To solve question, you need to use following parameters

  • Set α = 0:001 as step size, you can decrease this number if necessary.
  • Define the ∈ value by yourself.

For this question, you need to finish following tasks:

1. Calculate the differential equation df of f(x).

2. Make a plot for the f(x) and set the value range of x as [0, 100]

3. Try at least 10 different starting points between [0, 100]. In the end, you should obtain 20 local minimum values.

4. Add these local minimum values to the plot from Step 2. Additionally, put proper X label, Y label, title and legend to your plot.

5. As you may notice, the alpha value (step size) is critical for gradient descent. When you decrease the alpha value, it may increase the calculation time. When you increase this number, it may shorten the calculation but fail to return you the right estimation. Try three different alpha values and compare the calculation time and accuracy. Which alpha value has the best performance? Write down your comments.

Bonus question: What is the right time interval?

As we mentioned during class. In most case, we assume the return of the equity is normal distributed. However, this case may not be true when using the real data. In this question, we going to investigate more on this using HFT data.

Using SPY.csv to calculate the log return for each minute and set the time window into 15 minutes (9:30 ∼ 9:45, 9:45 ∼ 10:00, ...). For each data sets, are they normal distributed?

Instead of using the fixed time interval, can you think another method to divide this time interval depends on the data? For example, when you using this data set, you may find the returns from 9:30 to 10:00 are apply to normal distribution. However, it may not when using data from 9:30 to 10:01. Therefore, the first time interval is from 9:30 to 10:00, the second time interval starts from 10:00 to another time.

Additional information: To do this task, you need to have a basic data set as bench mark. For example, you can set the initial 5 points as the initial data set.

Please only use R-Studio software and include the bonus question.

Attachment:- Assignment Files.rar

Applied Statistics, Statistics

  • Category:- Applied Statistics
  • Reference No.:- M92769643

Have any Question?


Related Questions in Applied Statistics

Question onea a factory manager claims that workers at

QUESTION ONE (a) A factory manager claims that workers at plant A are faster than those at plant B. To test the claim, a random sample of times (in minutes) taken to complete a given task was taken from each of the plant ...

You are expected to work in groups and write a research

You are expected to work in groups and write a research report. When you work on your report, you need to use the dataset, and other sources such as journal articles. If you use website material, please pay attention to ...

Assignment -for each of the prompts below report the

Assignment - For each of the prompts below, report the appropriate degrees of freedom, t statistic, p-value and plot using the statistical software platform of your choice (R/STATA) 1) A sample of 12 men and 14 women hav ...

Assignment - research topicpurpose the purpose of this task

Assignment - Research topic Purpose: The purpose of this task is to ensure you are progressing satisfactorily with your research project, and that you have clean, useable data to analyse for your final project report. Ta ...

Assessment task -you become interested in the non-skeletal

Assessment Task - You become interested in the non-skeletal effects of vitamin D and review the literature. On the basis of your reading you find that there is some evidence to suggest that vitamin D deficiency is linked ...

Part a -question 1 - an analyst considers to test the order

PART A - Question 1 - An analyst considers to test the order of integration of some time series data. She decides to use the DF test. She estimates a regression of the form Δy t = μ + ψy t-1 + u t and obtains the estimat ...

Medical and applied physiology experimental report

Medical and Applied Physiology Experimental Report Assignment - Title - Compare the working and spatial memory by EEG. 30 students were tested (2 memory games were played to test their memory - a card game and a number g ...

Business data analysis computer assignment -part 1

Business Data Analysis Computer Assignment - PART 1 - Economists believe that high rates of unemployment are linked to decreased life satisfaction ratings. To investigate this relationship, a researcher plans to survey a ...

Question - go to the website national quality forum nqf

Question - Go to the website, National Quality Forum (NQF), located in the Webliography, and download the article by WIRED FOR QUALITY: The Intersection of Health IT and Healthcare Quality, Number 8, MARCH 2008. You are ...

Go to the webliography source for the national cancer

Go to the Webliography source for the National Cancer Institute's Surveillance, Epidemiology, and End Results (SEER) Program. In the Fast Stats, create your own cancer statistical report, "Stratified by Data Type," and u ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As