q1. what is the output of the following code? · a. small number of investors interacting in the...

73
Q1. What is the output of the following code? import numpy as np a = np.array([2]*4) b = np.array([1, 2, 3, 4, 5, 6, 7]) b[1:] * a[1] Select one answer: a) array([ 4, 6, 8, 10, 12, 14]) b) array([ 1, 2, 3, 4, 5, 6, 7]) c) array([ 2, 4, 6, 8, 10, 12, 14]) d) array([ 3, 9, 12, 15, 18]) Correct answer: a)

Upload: others

Post on 26-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q1. What is the output of the following code? import numpy as np a = np.array([2]*4) b = np.array([1, 2, 3, 4, 5, 6, 7]) b[1:] * a[-­1] Select one answer: a) array([ 4, 6, 8, 10, 12, 14]) b) array([ 1, 2, 3, 4, 5, 6, 7]) c) array([ 2, 4, 6, 8, 10, 12, 14]) d) array([ 3, 9, 12, 15, 18]) Correct answer: a)

Page 2: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q2. Question relates to Chapter 7 Which of the following is true for a beta-­balanced portfolio? a) The beta values of all stocks in the portfolio are equal. b) The beta values of all stocks in the portfolio sum to zero. c) All stocks in the portfolio have equal weight. d) The weighted beta values of all stocks in the portfolio sum to zero. Correct answer is d) as described in Chapter 7 of the text: "Most hedge funds seek beta-­balanced portfolios so that they are precisely protected against market-­wide moves. That means, essentially Sum(beta_i*w_i) = 0, and Sum(|w_i|)=1.0"

Page 3: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q3. "How should section A be filled in to cause the following output:" import numpy as np x = np.array([[1,2,3,4], [4,5,6,7], [8,9,0,1]]) print _A_ Output: [[1, 3], [4, 6], [8, 0]]) Select one answer: a) x[0,2] b) x[:,0,2] c) x[::2] d) x[:,[0,2]] Correct answer: d)

Page 4: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q4. Question relates to Chapter 7 You are the manager of an ETF that tracks the performance of the S&P 500 (i.e your ETF is just like SPY). What are the alpha and beta numbers for your ETF? A) alpha = 0, beta = 0 B) alpha = 0, beta = 1 C) alpha = 1, beta = 0 D) alpha = 1, beta = 1 Answer B.

Page 5: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q5. How should section A be filled in to complete code that will cause the following output: import pandas as pd df = pd.DataFrame('a':[3,3,3], 'b':[6,6,6], 'c':[3,3,3]) print df print _A_ Output: a b c 0 3 6 3 1 3 6 3 2 3 6 3 a b c 1 2 1 2 2 2 1 2 Select one answer: a) df[0,0]/df[:-­1] b) df.ix[0,0]/df[1:2] c) df.ix[0,1]/df[1:] d) df[1,0]/df[1:3] Correct answer: c)

Page 6: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q6. Chapter 8 What is not an information advantage when the weak form of EMH (Efficient Market Hypothesis) is correct? a) independent fundamental estimates of intrinsic value b) technical analysis c) lower latency d) arbitrage Correct answer is b)

Page 7: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q7. Given a dataframe df, where df = GOOG AAPL GLD XOM 2010-­01-­04 626.75 213.10 109.80 64.55 2010-­01-­05 623.99 213.46 109.70 64.80 2010-­01-­06 608.26 210.07 111.51 65.36 2010-­01-­07 594.10 209.68 110.82 65.15 2010-­01-­08 602.02 211.07 111.37 64.89 2010-­01-­11 601.11 209.21 112.85 65.62 2010-­01-­12 590.48 206.83 110.49 65.29 2010-­01-­13 587.09 209.75 111.54 65.03 What is the output of the following python code? print df.ix['2010-­01-­11':'2010-­01-­06', ['AAPL', 'XOM']] a) GOOG AAPL GLD XOM 2010-­01-­06 608.26 210.07 111.51 65.36 2010-­01-­07 594.10 209.68 110.82 65.15 2010-­01-­08 602.02 211.07 111.37 64.89 2010-­01-­11 601.11 209.21 112.85 65.62 b) AAPL XOM 2010-­01-­06 210.07 65.36 2010-­01-­07 209.68 65.15 2010-­01-­08 211.07 64.89 2010-­01-­11 209.21 65.62 c) Empty Dataframe Columns: [AAPL, XOM] Index: [] d) AAPL XOM 2010-­01-­11 209.21 65.62 2010-­01-­08 211.07 64.89 2010-­01-­07 209.68 65.15 2010-­01-­06 210.07 65.36 Correct answer: c)

Page 8: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q8. Chapter 8 Market efficiency tells how fast the relevant information travels throughout the market, and greatly affects the investment decisions. Which of the following is true? a) A hedge fund manager would prefer to work in a market with high efficiency, because he can make money more efficiently. b) A hedge fund manager would prefer to work in a market with high efficiency, because opportunities come and go fast, one can make profit from these opportunities. c) A hedge fund manager would prefer to work in a market with low efficiency, because he can develop relevant information such as independent fundamental estimate of intrinsic value, and have an information advantage. d) A hedge fund manager would prefer to work in a market with low efficiency, because he can trade on inside information to make large profit. Correct answer is c)

Page 9: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q9. Which is of the following is the expected output of this python code: import pandas as pd df = pd.DataFrame([(1, 2, 3, 4, 5), (6, 7, 8, 9, 10), (11, 12, 13, 14, 15)]) print df.ix[1:2,3:4] a) 9 10 14 15 b) 14 15 c) 3 4 1 9 10 2 14 15 d) 3 4 1 14 15 Correct answer: c

Page 10: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q10. Chapter 8 If in the current market you discover you can predict the future stock price and earn profits using inside or private information, which of the following statements about the efficient market hypothesis (EMH) is supported by your discovery for the current market? a) The weak form version of EMH is invalid. b) The strong-­form version of EMH is valid c) The semi-­strong form version of EMH is invalid d) The strong-­form version of EMH is invalid. Correct answer is d)

Page 11: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q11. What is the output of the following code? import numpy as np x = np.array([[1,2,3],[5,6,7]], dtype='int') y = np.array(x/2) x[1,0] = 0 print y.sum(axis=1)[-­1] Select one answer a) 2 b) 4 c) 8 d) 9 Correct answer: c)

Page 12: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q12. Chapter 8 Which option is a correct assumption of Efficient market hypothesis? A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly D. Previous prices reflect all available information Answer is C. Prices adjust quickly

Page 13: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q13. import Numpy as np x = np.array([2, 4, 6, 8, 10, 12]) x[1:5:2] print(x[1:5:2]) What is the output? a) [4 8] b) [4 6 8 10 12] c) [4,6] d) [2 6 10] Correct answer: a)

Page 14: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q14. Chapter 8 What is technical analysis when evaluating a company? a) Evaluating a company's stock price based on book value such as total asset, debt, cashflow, etc. b) Evaluating a company's stock price based on stock prices of other companies in the same industry. c) Evaluating a company's stock price based on historical price and volume. d) Evaluating a company's stock price based on business news and insider information. Correct answer is c)

Page 15: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q15. What is the output of this python code? Code: import numpy as np a = np.array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) i = np.array([[0,1], [1,2]]) j = np.array([[2,3], [1,0]]) print a[i,j] Select one answer: a) [[2 7] [5 8]] b) [2 2] c) [[1 6] [11 4]] d) [[0 0] [0 0] [2 3] [1 0]] Correct answer: a)

Page 16: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q16. Chapter 8 Given a market for which the semi-­strong version of the EMH is valid, which of the following types of information (if any) can be exploited by investors in order to outperform the market? 1) Technical 2) Fundamental 3) Insider a) 1, 2, 3 b) 2, 3 c) 3 d) None of These Correct answer: C

Page 17: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q17. How should section A be filled in to complete code that will cause the following output: Code: import numpy as np d = np.array([[1,3,5,7], [2,4,6,8], [2,3,5,7], [1,4,9,16]]) print _A_ Output: [[3 5 7] [4 6 8]] Select one answer: A. d[3:2,-­1:4] B. d[:2,:-­1] C. d[0:-­2,1:] D. d[1:3,2:4] Correct answer: c)

Page 18: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q18. Chapter 12: Overcoming Data Quirks to Design Trading Strategies When a company pays a dividend to shareholders, what is the effect of the dividend on the assets of the company? a) The assets of the company are increased. b) The assets of the company are reduced. c) The assets of the company do not change. d) The change in the assets depends on whether the value of the company has increased or decreased during the period for which the dividends were paid. Correct answer is b)

Page 19: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q19. How should section <A> be filled in to complete code that will create a multi-­line plot? Code: import matplotlib.pyplot as plt import numpy as np import pandas as pd df = pd.DataFrame(np.random.randn(10, 4).cumsum(0), columns=['A', 'B', 'C', 'D'], index=np.arange(0, 100, 10)) <A> plt.show() Select one answer: a) plt.scatter(df['A'], df['B']) b) df.plot(kind="barh", stacked=True) c) df['A'].hist() d) df.plot() Correct Answer: d

Page 20: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q20. Chapter 12: Overcoming Data Quirks to Design Trading Strategies A stock price is set to $20 before a 1 for 2 _A_ and after this the stock price is $40. The stock price doubled due to 2 shares being reduced into 1. What is the term associated with _A_? a) Dividend b) Forward Fill c) Backward Fill d) Reverse Split Correct answer: d)

Page 21: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q21. What is the output of this python code assuming weekly returns and 52 weeks in a trading year? Code: import numpy as np def compute_sharpe(awr, stdr, rfr, sf): sr = np.sqrt(sf) * (awr -­ rfr) / stdr print(sr) if __name__ == "__main__": compute_sharpe(0.02, 0.05, 0.01, 52) Select the best answer: a) 0.2 b) 1.0 c) 1.4 d) 2.8 correct answer c

Page 22: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q22. Chapter 12: Overcoming Data Quirks to Design Trading Strategies How can shareholders earn income from stocks without selling them? A) Splits B) Reverse splits C) Dividends D) Fill Forward Correct answer is C)

Page 23: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q24. What is the output of the code below: import pandas as pd df = pd.DataFrame([[0,1],[2,3],[4,5],[6,7]]) print df.tail(2).values

Select one answer: a) [[2 3]] b) [[4 5]] c) [[0 1]

[2 3]] d) [[4 5]

[6 7]] answer: d

Page 24: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q25. Chapter 12: Overcoming Data Quirks to Design Trading Strategies A stock has a starting price of $100 per share. You buy 10 shares. The stock immediately goes through a 2 for 1 split, and you buy 10 more shares at the new price. How many shares do you own at this point, and how much is your position in this stock worth? a) 20 shares, $1000 b) 10 shares, $1200 c) 30 shares, $1500 d) 30 shares, $2000 Correct answer is c)

Page 25: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q26. What is the output of this python code: import numpy as np i = np.array([41, 51, 57, 50, 31]) j = np.array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]]) print j[i <= 50] Select one answer: a) [[ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19]] b) [[ 0 3 4] [ 5 8 9] [10 13 14] [15 18 19] [20 23 24]] c) [[ 0 1 2 3 4] [15 16 17 18 19] [20 21 22 23 24]] d) [[ 1 2 3] [ 6 7 8] [11 12 13] [16 17 18] [21 22 23]] Correct answer: c)

Page 26: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q27. * DUPLICATE * Chapter 12: Overcoming Data Quirks to Design Trading Strategies A stock price is set to $20 before a 1 for 2 _A_ and after this the stock price is $40. The stock price doubled due to 2 shares being reduced into 1. What is the term associated with _A_? a) Dividend b) Forward Fill c) Backward Fill d) Reverse Split Correct answer: d)

Page 27: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q28. What is the output of this python code? import numpy as np import pandas as pd ascending_sequence = pd.DataFrame(np.array([0,1,2,3,4,5])) rolling_mean = pd.rolling_mean(ascending_sequence, window =3) print(rolling_mean.values) Select one answer: a) [2.5] b) [3.] c) [[ 0.0] [ 0.5] [ 1.0] [ 2.0] [ 3.0] [ 4.0]] d) [[ nan] [ nan] [ 1.] [ 2.] [ 3.] [ 4.]] Correct answer: d)

Page 28: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q29. Chapter 12: Overcoming Data Quirks to Design Trading Strategies Below is a company's stock price over 5 days. The letters 'E' and 'F' represent missing values. Day Value 1 E 2 17 3 18 4 F 5 22 What values should 'E' and 'F' be filled-­in with? The first value is 'E', and the second 'F'. SELECT ONE ANSWER: a) 16, 18 b) 16, 20 c) 17, 18 d) 17, 20 CORRECT ANSWER: c

Page 29: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q30. What code could you insert in place of _A_ to get the following output from this code? import numpy as np j = np.random.random([3,3]) print j print _A_ Output: [[ 0.99560912 0.2936611 0.66510217] [ 0.52336501 0.58238854 0.30215874] [ 0.63356296 0.76165895 0.8700516 ]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] Select one answer: a) j / j[:,:] b) j / j[:,0] c) j / j[1,1] d) j / j[:,1] Correct answer: a)

Page 30: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q31. Chapter 12: Overcoming Data Quirks to Design Trading Strategies A company announces an increase in its payout ratio. What do you expect to happen? a) The next dividend payment will be increased for subsidiaries. b) The portion of the company's annual earnings going to dividends will increase. c) The number of dividend payouts will increase per year. d) The number of dividend payouts will decrease per year. Correct answer is b)

Page 31: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q32. Chapter 5: Introduction to Company Valuation What is the book value for company XYZ given the following information? * Manufacturing equipment worth $10M * Liabilities of $1M * Real estate holdings worth $5M * Technology patents worth $1M * Cash in bank accounts of $2M a) $14M b) $15M c) $16M d) $19M Correct answer is c

Page 32: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q33. What is the output of the python code below? Code: import numpy as np a = np.array([10,30,50,70]) b = a / a[0] print b[-­1] Select one answer: a) IndexError b) 10 c) 5 d) 7 Correct answer: d)

Page 33: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q34. Chapter 5: Introduction to Company Valuation In the latest Berkshire Hathaway Shareholder's letter, Warren Buffett writes: "... we would be delighted to repurchase our shares should they sell as low as 120% of book value." This suggests that even at 120% of book value, Buffett believes his company is undervalued. What is one reason that book value can diverge from market value? a) Since accounting rules are conservative, appreciation in asset values are not included on balance sheets. b) Book values are post-­tax and market values are pre-­tax. c) When the value of any asset is discounted it becomes more than 120% its current value. d) Within a year dividend payments make up the difference between book and market value. Correct answer: a)

Page 34: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q35. Chapter 5: Introduction to Company Valuation Which of these companies would not give an immediate positive return if it were bought and its assets sold? a) Book Value: 50 million Share Price: $100 Available Shares: 0.4 million b) Book Value: 100 million Share Price: $3.75 Available Shares: 25 million c) Book Value: 70 million Share Price: $3.50 Available Shares: 25 million d) Book Value: 300 million Share Price: $100 Available Shares: 2.8 million Correct answer is c

Page 35: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q36. Given the following dataframe, df: df = SPY 2016-­01-­01 10 2016-­01-­02 11 2016-­01-­03 NaN 2016-­01-­04 NaN 2016-­01-­05 14 2016-­01-­06 15 Which line of code would produce the following output: df = SPY 2016-­01-­01 10 2016-­01-­02 11 2016-­01-­03 14 2016-­01-­04 14 2016-­01-­05 14 2016-­01-­06 15 Options: a) df = df.fillna(method='ffill') b) df = df.fillna(method='bfill') c) df = df.dropna() d) df = df.interpolate() Correct answer: b

Page 36: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q37. Chapter 5: Introduction to Company Valuation Your friend Alice has been running a micro-­brewery out of her garage for five years now. Her annual profits from the micro-­brewery are $10,000 per year. Alice has been approached by a large beer company that wants to purchase her company. Alice knows that you have been taking Machine Learning for Trading, so she asks your opinion on what her little micro-­brewery is worth. What is her company's intrinsic value based on the $10,000/year profits? Assume a discount rate of 5%. a) $10,000 b) $50,000 c) $200,000 d) $2,000,000 Correct answer is c)

Page 37: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q38. Chapter 5: Introduction to Company Valuation Alice has an impatient friend, Jan, who wants to buy a new sail boat today for $200,000, but the banks won't lend her any money. She is currently receiving an annual check for $50,000 as part of a settlement she won three years ago. She has 5 more annual payments that she is guaranteed to receive and offers to sell them to Alice today, for a lump sum of $200,000. Assuming a 10% discount rate, is buying Jan's remaining annual payments for a lump sum of $200,000 a good investment? a) Yes, the present value is $250,000.00 b) Yes, the present value is $500,000.00 c) No, the present value is only between $180,000 and $190,000 d) No, the present value is less than $180,000 Correct answer: c

Page 38: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q39. What is the output of the following code? import numpy as np a = np.array([[ 1, 2, 3, 4], [ 5, 6, 7, 8], [ 9, 10, 11, 12], [13, 14, 15, 16]]) print a[2,:] Select one answer: a) [ 2 6 10 14] b) [ 5 6 7 8 ] c) [ 9 10 11 12 ] d) [ 12 11 10 9 ] Correct answer: c)

Page 39: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q40. Chapter 5: Introduction to Company Valuation If you were to pay $500,000,000 for a company, which of the following companies is certain to maximize your profit if you purchase it? a)One that pays $31,000,000 per year in dividends at a discount rate of 5%. b)One that has 10,000,000 outstanding shares at $61 stock price. c)One that owns 64 factories at $10,000,000 each, but also has $20,000,000 in liabilities. d)One that employs world-­class talent in the field of business development. The correct answer is c)

Page 40: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q41. Chapter 5: Introduction to Company Valuation Company A has a book value of $100M. After a detailed fundamental analysis, you figure this company has an intrinsic value of $400M. You also find that this company has never failed dividend payout in the last 10 years. As an "Intelligent investor" who believes in value investing you want to look for the market capitalization before going long on this stock. Assuming 1 million outstanding shares, which of the following market prices will pique your interest in going long with this stock? a) $500/share b) $200/share c) $400/share d) $650/share correct answer: b

Page 41: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q42. How should section A be filled in to complete code that will cause the following output: Code: import numpy as np a = np.arange(16).reshape(4,4) print a print _A_ Output: [[ 0 1 2 3] [ 4 5 6 7] [ 8 9 10 11] [12 13 14 15]] [24 28 32 36] Select one answer: a) a.sum(axis=0) b) a[3,:] c) a.sum(axis=1) d) a[:,3] Correct answer: a)

Page 42: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q43. Chapter 5: Introduction to Company Valuation Which of the following answer choices are true: a) a company that pays a dividend of 1$/year and a discount rate of 3% has an intrinsic value of $33.3333 b) a company that has tangible assets valued at $100 million, intellectual property assets valued at $10 million and liabilities that are equal to $50 million has a book value of $60 million dollars c) a company with 100,000 shares where each share has a price of $90 has a market capitalization of $900,000 d) choices a) and b) are both correct Correct answer is a)

Page 43: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q44. Question relates to chapter 10 Which of the following are TRUE regarding points on the Efficient Frontier? I. They represent a portfolio's change in Sharpe Ratio over time. II. They represent the lowest risk portfolio for each level of target return. III. They represent lower risk portfolios than individual assets with the same or similar returns. a) I and II b) I and III c) II and III d) I, II and III Answer: c)

Page 44: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q45. What is the output of this python code? import numpy as np # SPY IBM AAPL HNZ XOM GLD prices = np.array([[ 86.8 , 81.64, 90.36, 33.95, 74.48, 86.23], [ 86.7 , 81.13, 94.18, 33.82, 74.47, 84.48], [ 87.28, 83.38, 92.62, 33.38, 73.26, 85.13], [ 84.67, 82.03, 90.62, 32.59, 71.39, 82.75], [ 85.01, 81.46, 92.3 , 31.99, 72.15, 84.46], [ 83.19, 79.15, 90.19, 31.69, 70.77, 83.92], [ 81.19, 80.09, 88.28, 31.49, 69.83, 80.76], [ 81.34, 79.74, 87.34, 31.75, 71.09, 80.88], [ 78.78, 77.74, 84.97, 30.65, 68.51, 79.79], [ 78.81, 78.6 , 83.02, 30.67, 69.94, 80.39]]) print prices[:,-­1] ### what is the output of this??? Select one answer: a) A list of closing prices of all six securities on the 10th day b) 80.39 (The closing price of GLD on the 10th day) c) A list of the closing price of GLD for all ten days d) It does not actually output any prices;; it actually generates an IndexError exception Correct answer: c)

Page 45: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q46. Question relates to chapter 10 You are deciding how to allocate your portfolio between three assets. Asset A has 10% return and 5% risk. Asset B has 10% return and 5% risk. Asset C has 10% return and 5% risk. When you look more closely at the individual price movements of each asset, you find that the price of A and B are positively covariant, and the price of A and C, as well as B and C, are negatively covariant. How should you allocate your portfolio to meet a target return of 10% with minimum risk? A) 50% A, 50% B B) 25% A, 25% B, 50% C C) 33% A, 33% B, 33% C D) It doesn’t matter because all 3 stocks have the same risk. Answer: B

Page 46: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q47. Question relates to chapter 10 Two portfolios A and B both are a combination of US stocks. On risk return scatter plot, we observe that the slope of a ray from the origin outward that passes through portfolio A's and B's location is 1 and 1.2 respectively. Which portfolio has higher Sharpe ratio? a) A has the highest Sharpe Ratio b) B has the highest Sharpe Ratio c) The Sharpe Ratios are the same d) Not enough data is given to calculate Sharpe ratio Correct answer is a)

Page 47: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q48. What is the output of this python code? import numpy as np x = np.array([[1,2,3],[3,4,5],[5,6,7]]) print x[1]+x[-­1] Select one answer: a) [4 8 12] b) [5 9 13] c) [8 10 12] d) [6 8 10] Correct answer: c)

Page 48: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q49. Question relates to chapter 10 What is tail risk and why is it dangerous? a) The risk that two assets are closely correlated;; this will cause their value to move up or down together. b) The risk that an extreme negative event will occur that is too rare for your data series to detect and account for. c) The risk that the performance of an asset will trail behind other assets in your portfolio, underperforming expectations. d) The unaccounted for risk that an asset's performance will move sideways, neither up nor down, underperforming expectations. The correct answer is b)

Page 49: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q50. Question relates to chapter 10 Both stock A and stock B have a risk of 10%. And the covariance between the daily returns of stock A and stock B is -­0.9. For a portfolio with 50% stock A and 50% stock B, what the risk of this portfolio would be? a) cannot be determined b) higher than 10% c) equal to 10% d) lower than 10% Correct answer is d)

Page 50: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q51. We desire to achieve Naive Scalar multiplication by two (two times the input object vector range) Input range: v = [1, 2, 3, 4, 5] Desired Output (twice the input): [2, 4, 6, 8, 10] Which program provides the correct answer: Program 1: v = range(1, 6) print 2 * v Program 2: import numpy as np v = np.arange(1, 6) print 2 * v Answers:

a) Program 1 b) Program 2 c) Both Program 1 and Program 2 d) Neither Program 1 or Program 2

correct answer: B

Page 51: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q52. Question relates to chapter 10 Which of the following statement is FALSE? a) A good strategy while building a portfolio is to look for anticorrelation in long term and positive correlation in short term between the individual stocks in the portfolio. b) A global event can affect two apparently uncorrelated assets and they can suddenly become highly correlated. c) It is possible to provide lower risk portfolios than individual assets with similar returns. d) With the efficient frontier, we cannot get a higher return in a portfolio than the individual stock with the highest return in the portfolio. Correct answer is a)

Page 52: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q53. Question relates to chapter 10 Why is low correlation between assets in a portfolio valued so highly? a) It reduces diversification b) If one asset does poorly, it is given that the other asset will help overcome losses since they are uncorrelated c) It dampens the oscillations that occur in return, thereby reducing volatility d) It's difficult to find highly correlated values in the first place Answer: c)

Page 53: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q54. What is the output of the following code? import scipy.optimize as spo def f(x): y = (x-­7)**2 + 13 return y x_guess = 2.0 min_result = spo.minimize(f, x_guess, method = 'SLSQP') print "Minimum found at: X = , Y = ".format(min_result.x, min_result.fun) Select one answer: a) Minimum found at: X = [ -­7.], Y = [ 13.] b) Minimum found at: X = [ -­7.], Y = [-­13.] c) Minimum found at: X = [ 2.], Y = [ 38.] d) Minimum found at: X = [ 7.], Y = [ 13.] Correct answer: d)

Page 54: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q55. Complete the code below to select first three rows of the dataframe df and divide by the minimum of each column, then print the result. import pandas as pd arr=[[12,4],[6,20],[18,40],[3,16]] df=pd.DataFrame(arr,columns=['A','B']) print ________ Select one answer: a)df[:3,]/df.min(axis=0) b)df[0:2,]/df.min(axis=1) c)df.iloc[:-­1,]/df.min(axis=0) d)df.iloc[0:3,]/df.min(axis=1) Correct answer: c)

Page 55: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q56. Question relates to Chapter 2 Using the Rule of 72, approximately how long would it take a portfolio growing at 3 percent to double? a) 100 years b) 24 years c) 33.3 years d) 72 years Answer: b

Page 56: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q57. Question relates to Chapter 4 Given the below order book for stock XYZ, what is the market spread? Bid Size| Price| Ask Size | $20.05| 100 | $19.95| 100 | $19.90| 200 400| $19.80| 100| $19.70| 100| $19.50| a) $.55 b) $.10 c) $.30 d) $.15 Answer: b)

Page 57: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q58. Question relates to Chapter 4 Given the below order book for stock XYZ, at what average price would the following MARKET order be executed at? BUY, XYZ, 200 Bid Size| Price| Ask Size | $20.05| 100 | $20.00| 100 | $19.90| 100 400| $19.80| 100| $19.70| 100| $19.50| a) $20.00 b) $19.80 c) $19.95 d) $19.90 Answer: c)

Page 58: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q59. Question relates to Chapter 4 Given the below order book for stock XYZ, in which direction do you expect the price of the stock to move? Bid Size| Price| Ask Size | $20.05| 100 | $19.95| 100 | $19.90| 200 500| $19.80| 400| $19.70| 200| $19.50| a) Up b) Down c) Not enough information d) Sideways Answer: a)

Page 59: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q60. Which method for filling in missing historical data (NaNs) that allows complex calculations to be carried out while minimizing “peeking” into the future?

a) Fill back, then fill forward b) Interpolate between the non-­NaN values c) Fill forward, then fill back d) Replace NaN values with the mean of the non-­NaN values

correct answer: c)

Page 60: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q61. Question relates to Chapter 4 Joe purchased 1000 shares of a XYZ stock at a price of $15 per share. Joe set a trailing stop of 5%. If XYZ stock went up to $20 per share, then dropped to $10 per share. Which of the following statements are true?

a) Joe lost $750 b) Joe profited $750 c) Joe profited $4000 d) Joe lost $5000

Answer: C

Page 61: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q62. Question relates to Chapter 4 How does the liquidity of a market affect volumes and market spreads? a) Highly liquid markets tend to have low volume and high market spreads b) Low liquidity markets tend of have high volume and low market spreads c) Highly liquid markets tend to have high volume and low market spreads d) Liquidity does not affect volumes or market spreads Correct answer is c)

Page 62: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q63. How should section A be filled in to complete code that will cause the following output: import numpy as np import pandas as pd j = pd.DataFrame(np.random.randn(3, 3),columns=['a', 'b', 'c']) j.ix[1,:] = np.nan print "BEFORE:" print j j.fillna(method='__A__', inplace="TRUE") print "\n\nAFTER:" print j Output: BEFORE: a b c 0 1.413829 1.752905 -­0.597698 1 NaN NaN NaN 2 -­0.396044 1.682260 2.131227 AFTER: a b c 0 1.413829 1.752905 -­0.597698 1 -­0.396044 1.682260 2.131227 2 -­0.396044 1.682260 2.131227 a)forward b)ffill c)backward d)bfill Correct answer: d)

Page 63: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q64. Question relates to Chapter 7 Given the following Symbols and their associated Betas what would be a beta balanced portolio? Symbol Beta ABC 0.75 DEF 0.25 GHI 1.00 a) [ABC: -­.5, DEF: -­.1, GHI: .4] b) [ABC: .5, DEF: .1, GHI: .4] c) [ABC: .5, DEF: .25, GHI: .25] d) [ABC: -­.5, DEF: .25, GHI: .25] Correct Answer: a

Page 64: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q65. Question relates to Chapter 7 In the Capital Asset Pricing Model, what is the expected value of alpha and why? a) 0.0 because it is a coefficient that ranges from -­1 to +1, and 0 is the median b) 0.0 because it is the difference in performance of a stock from the market, and taken collectively all stocks perform about the same as the market c) 1.0 because it represents the weightings of assets in a portfolio, which must sum to 1 d) 1.0 because it is a stock's price volatility relative to the overall market, which by definition is 1 Correct answer is b.

Page 65: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q66. Which equation correctly states the CAPM prediction for the expected return on an individual stock?

a) R_stock = Beta_market * R_market + alpha_stock b) R_stock = Beta_market * R_market -­ alpha_stock c) R_stock = Beta_stock * R_stock -­ alpha_stock d) d) R_stock = Beta_stock * R_market + alpha_stock

correct answer: d)

Page 66: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q67. Suppose you have two stocks with the following Beta and alpha values. Which of the following statements are true according to the CAPM? symbol Beta alpha XYZ 1.0 0.2 ABC 2.0 0.1

a) XYZ is more volatile than ABC b) On average, ABC returns more than XYZ c) XYZ and ABC are equally volatile d) None of the above are true

correct answer: d

Page 67: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q67. Question relates to Chapter 7 The stocks of company A and B have a correlation coefficient of -­0.7. Which of the following is most likely? A) A is a cell phone manufacturing company and B is a medicine manufacturing company B) Both A and B are luxury goods manufacturers C) A manufactures gas guzzling pickup trucks and B is a petroleum company D) A is an airline company and B is a confectionary company (which makes candies) Answer: c)

Page 68: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q68. Question relates to Chapter 7 Suppose we have high confidence that we are in a bear market, and will remain so for some time. According to the CAPM model, which combination of variables will give us the best portfolio performance? a) high beta, high alpha b) high beta, low alpha c) negative beta, high alpha d) negative beta, low alpha Answer: c)

Page 69: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q69. Question relates to Chapter 9 Fund A has outperformed SPY by 2% over the last year. The standard deviation of the difference between Fund A and SPY has been 8%. Consider these two questions:

1) What is the information ratio (IR) of the fund? 2) Assuming the fund can maintain it’s IR over more stocks or

trades what change to its trading could enable the fund to triple its information ratio?

a) IR = 4;; Fund A needs to double trades to triple IR b) IR = .25;; Fund A cannot triple its information ratio c) IR = .25;; Fund A needs to utilize 9x as many trading opportunities d) IR = .5;; Fund needs to diversify into 3x as many stocks Correct answer is c)

Page 70: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q70. Question relates to Chapter 9 Boring Wuffett's portfolio has returned 20% over the past year, while making 10 trades. Rebirth Technology's portfolio has returned 20% over the past year, while making 10,000 trades. Assume both portfolios carry the same levels of risk. According to the fundamental law of active portfolio management, which manager has the most skill as measured by information coefficient? a) Boring Wuffett. b) Rebirth Technology. c) The two have equal skill, because their total returns are the same. d) It depends on the return of the SP500. Answer: a)

Page 71: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q71. What is the airspeed velocity of an unladen swallow?

a) 24 mph b) 30 mph c) What do you mean? African or European? d) Swallows are non-­migratory

correct answer: c)

Page 72: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q72. Question relates to Chapter 9 Modern portfolio theory distinguishes between two broad categories of risk. Which type of risk is reduced by diversifying your portfolio, and why? a) Systematic Risk is reduced because diversification reduces volatility of a portfolio. b) Specific Risk is reduced because diversification increases your information coefficient. c) Specific Risk is reduced because diversification reduces volatility of a portfolio. d) Systematic Risk is reduced because diversification increases your information coefficient. Correct answer is c)

Page 73: Q1. What is the output of the following code? · A. Small number of investors interacting in the market for profit B. New information arrives consistently C. Prices adjust quickly

Q73. Question relates to Chapter 9 You have the following situation: You have a biased coin (51% heads, 49% tails), and can make bets that pay off depending on the outcome of the coin toss. Which statements below are true? -­ In alternative 1 you can make 1000 bets for $1 each (if you toss heads you gain $1, if you toss tails, you lose $1) -­ In alternative 2 you can make one bet for $1000 (if you toss heads you gain $1000, if you toss tails, you lose $1000) a) Both alternatives provide the same expected return of $510 b) Both alternatives provide the same risk c) Alternative 1 is better because risk is lower d) Both a) and c) are true. Correct answer is d)