Brooklyn College Ogbonnaya Akpara CISC 7510X HW#8 Professor Alex S. Q: Build a portfolio of 20 symbols, each of which has daily average volume over $10m (avg taken over last year), has paid dividends every year (no skipping) for the last 10 years, has returned at least a cumulative 2% a year for the last 15 years (including dividends/splits and stock price), and each of which have the lowest correlation with the rest of the symbols in your portfolio. A: E(Ri) = Rf + Beta i (E(Rm)-Rf) with DAILY_PRCNT as ( select a.* ((row_number () over (order by true)) -1) * 0.1 as n from DAILY_PRCNT limit 20 ) select distinct a.n as x, 1- a.n as y from DAILY_PRCNT a Q: Calculate the return on those 20 symbols for 2013. Is that better or worse than S&P500 for same period? (You can use "SPY" symbol as stand in for S&P500) How about last 10 years? Last 20? A: select exp (sum (log (1+interest/100))) from DAILY_PRCNT where tdate = '2013-01-01'; It is better than S&P 500(SPX) for 2013. It is better than S&P 500(SPX) for 2003. It is better than S&P 500(SPX) for 1993. Q: Submit 20 symbols, along with their aggregate 2013 return, compared to S&P500 return for the same time period and the SQL code. A: select exp (sum (log (1+interest/100))) from DAILY_PRCNT where tdate = '2013-01-01';

Comments

Popular posts from this blog