Python (Coding) Exercise for a Finance Class. Due tonight at 11:59 PM, will pay good money for it
MSF Bootcamp – Python FIN 635
Final Assignment This individual assignment is due on Thursday 8/6 at 11:59PM. Please submit your answers as a Jupyter Python Notebook. 1. Use SymPy to solve the following equations:
a. ln(𝑥 + 2) = 10 b. 𝑥 = 4 c. 𝑒 + 𝑒 = 10
2. Using SymPy, plot the following functions:
a. 𝑓(𝑥) = 1 − 𝑒 b. 𝑓(𝑦) = ln(100𝑦) c. 𝑓(𝑧) = 𝑧 + 4𝑧 − 2𝑧 + 10
3. Use SymPy to find the derivative of the following functions:
a. 𝑓(𝑥) = cos(𝑥 ) b. 𝑓(𝑦) = cos(𝑦 ) + sin(𝑦 ) c. 𝑓(𝑧) = 𝑒
4. Let 𝐴 = 7 4 1 8 5 1 3 10 8
, 𝐵 = 4 7 9
and 𝐶 = (4 4 1). Use SymPy to compute the following:
a. 𝐴 × 𝐵 b. 𝐶 × 𝐴 × 𝐵 c. 𝐶 × 𝐵 d. 𝐵 × 𝐶
5. Download the daily closing prices of Apple (Ticker: AAPL) from 1995-01-01 until the latest closing,
and plot: a. The daily returns of AAPL stock. b. The histogram of AAPL returns using 100 bins.
6. Download the daily closing prices of Apple (Ticker: AAPL) and the SPDR (ticker: SPY) from 1995-01-
01 until the latest closing. Using the library statsmodels, run a regression of daily returns of Apple stock on the SPDR and report:
a. The R-square of the regression. b. The beta of the regression. c. The standard deviation of daily returns of AAPL and SPY. d. The correlation between AAPL and SPY daily returns.
7. Download the interest rate data from Kenneth French’s website from 1950-01-01 until the latest
update and run the regression of the change in monthly interest rates on the one-month lagged monthly interest rate. Report the coefficients of the regression and comment on whether they are statistically significant at the 5% level.