FIN 359 Cal State University Northridge FIN 359 Questions
FIN359 Homework 3 This is a group homework exercise Homework Learning Objective: 1. Being able to use pandas_datareader to pull web data (Remote data Access) https://pandas-datareader.readthedocs.io/en/latest/ 2. Familiar with some basic features of python 3. Data Description 4. Being able to generate some basic plots to visualize the data 5. Pandas DataFrame Detailed Instructions: You are going to work on the data from Federal Reserve Economic Data | FRED | St. Louis Fed. https://fred.stlouisfed.org/ You are going to investigate the real estate market housing price trend over the time span of (1990/01/01, 2023/07/01) Pull the data of Los Angeles housing price index (proxied by S&P/Case-Shiller CA-Los Angeles Home Price Index (LXXRSA)) and national housing price (proxied by S&P/CaseShiller U.S. National Home Price Index (CSUSHPISA) ) Use datareader to import the housing price data Show the values of the first five observations of LXXRSA and CSUSHPISA Generate a time-series plot of LXXRSA over (1990/01/01, 2023/07/01) (Please clearly label the Y- X- axis) Generate a time-series plot of CSUSHPISA over (1990/01/01, 2023/07/01) (Please clearly label the Y- X- axis) Create a dataframe (pandas) – containing two housing price series (LXXRSA and CSUSHPISA) https://pandas.pydata.org/pandasdocs/stable/reference/api/pandas.DataFrame.merge.html (in addition, please go to CANVAS and read the Module ‘Join Tables’) What is the dimension (shape) of this dataframe? What is the correlation between LXXRSA and CSUSHPISA over (1990/01/01, 2023/07/01) – use .corr Generate a time-series plot of CSUSHPISA and LXXRSA over (1990/01/01, 2023/07/01). Note that you need to plot two lines in the same graph. (Please clearly label the Y- X- axis) Generate a Histogram of CSUSHPISA and LXXRSA What is mean, standard deviation, and max value of LXXRSA? **Note: When you write your code, make nessary comment (you can either use Markdown or # ) – This is very important! [Bonus question: + 15 points] – This part of exercise requires your additional effort Regress Los Angeles Housing Price index onto National Housing Price Index: LXXRSAt = α + β × CSUSHP ISAt + µ. (In python, there are multiple ways (packages) to run OLS regressions. A common package can be found here: https://www.statsmodels.org/devel/example_formulas.html) What is the estimated coefficient β^? Is it statistically significant? How to interpret this coefficient? Now, you are wondering whether the LA housing price is affected by the unemployment rate. You want to explore the association between the LA housing price and unemployment rate. How would you run the regression? What is coefficient estimate? Is it statistically significant? unemployment rate data: https://fred.stlouisfed.org/series/UNRATE Economic theory tells us interest rate (opportunity cost) is also a deterministic factor of the housing price. Now, re-implement your OLS estimation and get the coefficient. Explain the coefficient Interest rate data: https://fred.stlouisfed.org/series/INTDSRUSM193N [discussion question] Following previous questions, suppose you want get the OLS estimates of National GDP on the housing price index, you realize the fact that you can only get quarterly frequency GDP data but the Housing price index data is at monthly level. Discuss how to address this issue to ensure a proper data merging. Attention: When you turn in the homework file, please strictly follow the file naming convention: member1’s first name+and+member2’s first name + homework number. For example, if the team members are Peter and John, the file should be named as ‘peter_and_john_hw2.ipynb’. Make sure no space on the file name and use the underscore between words. ONLY ‘.IPYNB’ format file will be accepted In [ ]: # import libiaries %matplotlib inline import warnings import numpy as np import pandas as pd import pandas_datareader.data as web import datetime as dt from numpy import random from scipy import stats import matplotlib.pyplot as plt # import seaborn as sns # import quandl # from IPython.display import Image import statsmodels as sm import statsmodels.formula.api as smf import statsmodels.api as sma # import patsy # from statsmodels.graphics.api import abline_plot # import numpy.linalg as linalg # import pymc3 as pm # from mpl_toolkits.mplot3d import Axes3D # warnings.simplefilter(‘ignore’) # sns.set(context=’notebook’, style=’whitegrid’, palette=’deep’, font=’sans-serif’, font_scale=1, rc=None) If you have not install the pandas_datareader before, please use the code below to install the package. Uncomment the code , drop In [ ]: # !pip install pandas_datareader In [ ]: import os print(os.getcwd()) os.chdir(‘.’) print(os.listdir(“.”)) # help(os) Define the time span In [ ]: Pull data from FRED In [ ]: In [ ]: In [ ]: Describe the data In [ ]: In [ ]: In [ ]: # Note: You can present your discussion using a markdown cell In [ ]:
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.