Page 1 of 1

You need to design and use Python 3 output and present the results in a good format. The aim of this problem is to test

Posted: Sat May 14, 2022 3:59 pm
by answerhappygod
You need to design and use Python 3 output and present the
results in a good format. The aim of this problem is to test a data
source which claims to be predictive of future returns of the SP500
index. The “signal” in the table is received at the end of the day
(that is to say, contemporaneous with the SPY price shown in the
table). We do not have a prior conviction about the forecast
horizon over which the signal is effective.
1. The first step in this endeavor is data cleaning. Identify any
errors in the data, flag them with a note, and suggest a corrected
value or if advisable, you may choose to ignore them for purposes
of your analysis.
2. Plot the signal and price on the same picture, where x axis is
time. State what you observe.
3. Calculate the correlation between price return and signal return
with lag k, where k = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. State what you
observe, which lag is significant largest than other.
4. Group the signal return 4 categories, smaller than -0.01, -0.01
to 0, 0 to 0.01, and greater than 0.01, and calculate the average
return for each category, and plot it with bar plot. you will
expect to see a bar plot like this:
You Need To Design And Use Python 3 Output And Present The Results In A Good Format The Aim Of This Problem Is To Test 1
You Need To Design And Use Python 3 Output And Present The Results In A Good Format The Aim Of This Problem Is To Test 1 (14.33 KiB) Viewed 99 times
5. design and implement a simple trading strategy based on this
signal, output your buy signal and total return, Sharpe ratio.
Data Set:
0.006 0.004 0002 average return 0.000 -0.002 -0.004 -0.006 signal ret< 0.01 signal ret>0.01 [-0.01.01 [0,0.01) group by return of signal