Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Computational Tools EM - January 30 2017

Sumbit answers at http://url


Surname
Name 101
Student ID

Write the solutions using two decimal digits.

(1) Consider the numbers 3.493427e+19 and 2.392993e+23. Then say whether both numbers are
small and the first is larger then the second.
(2) Draw the line and the parabola y = −x + 1, y = x2 + x + 2 over the interval [−2, 3] and find
the ordinate of the lowest point belonging to the graphs.
(3) Consider the expression abs(-1:2)+log(1:2). Which of the following stataments holds?
(a) The first recycled number was 2
(b) The first recycled number was 0
(c) There was no need to recycle any argument.
(d) The first recycled number was 1
(4) Which of the following statements is correct?
(a) Simulation is based on several optimization runs to gain insight.
(b) The terms ’distribution’ and ’simulation’ are equivalent.
(c) A distribution is a function taking values in [0, 1] to be maximized by simulation.
(d) Simulation can answer the question ’What’s the average outcome of my experiment?’.
(5) Type set.seed(107) and press enter. Then immediately store in a vector 100 normal
pseudo-random numbers with mean 5 and standard deviation 2. Compute the sum of 8 com-
ponents of the vector, starting from position 51.
(6) Minimize, if possible, the following function: f (x) = x4 − x3 − 3x2 − 4x + 4. Write the objec-
tive function at the optimum or -999 if there is no solution.
(7) In the smartphone market, the number of customers (in billions) of Samsung and Apple can
be modelled by the functions f (x) = x/100 + 0.2e0.09x , and g(x) = 0.33 + 0.025x, where x > 0
denotes year 2000+x. When is Samsung reaching one billion customers for the first time?
(8) How many solutions do you have in the system of non-linear equations: x2 + 2xy + y2 − x =
0, (x − 1)2 + (y + 1)2 = 1?
(9) Assume that t = 0 corresponds to May 1st 2019. Consider the BTP denominated, according
to the standard conventions, BTP3.5% 01Oct2020. Compute the gross return of the BTP if
the cost is 101.21. Use 3 decimal digits for this exercise !!!
(10) Enter the following commands: set.seed(102);x <- 1:10;y <- rnorm(10) and plot
the points whose coordinates are x and y. How many points are inside the triangle formed by
the three lines y = −0.5x + 2.5, y = x − 7 and y = 2.
a) There is no point inside the triangle. b) One point is inside the triangle.
c) Two points are inside the triangle. d) Three or more points are inside the triangle.
(11) Let f be the function
x2 + xy + y2 − y 2 2
+ e−x + e−y −y .
9
Plot the levels of f and find its global minimum.
(12) The production of a firm is
0.25l 0.7 k0.3 ,
1
2

where l is labour and k is capital. The unit costs of labour and capital are 0.5 and 1.1, respec-
tively. Which is the maximum production if the cost of the factors cannot exceed 2?
(13) Profits depend on price p and can be described as f (p) = 3e1.5p − 0.3e4p . The actual price is
0.58. Which of the following is true?
(a) The profit-maximizing price is about 0.53.
(b) The optimal profit is about 5.016.
(c) Profit would be maximized decreasing the price by about 7.1%.
(d) Increasing the price can result in profit’s increase.
(14) Consider the assets (118, 99, 109)0 , (96, 101, 92)0 and (84.6, 80, 81.4)0 whose prices are 100.16,
87.17, 74.546, respectively. Is the third asset replicable? Do you have an arbitrage opportunity
on the third asset?
(a) No, it’s not replicable. Hence, there is an arbitrage opportunity.
(b) No, it’s not replicable and there is NO arbitrage opportunity.
(c) Yes, it’s replicable and there is an arbitrage opportunity.
(d) Yes, it’s replicable but there is NO arbitrage opportunity.
(15) Solve the system     
1 −2 −5 x 5
2 −2 −6 y = 12 .
1 0 −1 z 7
Write the sum of the components of the solution or -999, if the system has no solution.
(16) The quality of a new item is assessed using 2 numeric measures. Assume they are uniform
random numbers. Estimate how likely it is that the maximum of the measures exceeds 0.5.
a) About 0.22; b) About 0.75; c) About 0.9; d) About 0.39.
(17) Given a market Y, an asset b is replicable if:
(a) the price of b is a linear combination of the assets in the market.
(b) there is a portfolio x such that the rank of Y is equal to the rank of Y|x.
(c) there is a portfolio x such that Yb = x.
(d) b is a row by column product of Y times some specific x.
3

Computational Tools EM - January 30 2017


Sumbit answers at http://url
Surname
Name 102
Student ID

Write the solutions using two decimal digits.

(1) Consider the numbers 3.873998e-21 and 1.776357e-15. Say whether both numbers are small
and 3.873998e-21 is smaller than 1.776357e-15.
(2) Draw the line and the parabola y = −x + 2, y = x2 − x − 5 over the interval [−2, 1] and find
the ordinate of the lowest point belonging to the graphs.
(3) Consider the expression exp(1:2)+log(1:4). Which of the following stataments holds?
(a) There was no need to recycle any argument.
(b) The last recycled number was 1.099
(c) The last recycled number was 1.386
(d) The last recycled number was 7.389
(4) Which of the following statements is correct?
(a) Simulation can answer the question ’What’s the correct outcome of my experiment?’.
(b) Simulation can be used to estimate how probable is an event.
(c) Simulation can answer the question ’What’s the most appropriate outcome for an exper-
iment?’.
(d) Simulation can answer the question ’How likely is that my outcome is maximized?’.
(5) Type set.seed(129) and press enter. Then immediately store in a vector 100 normal
pseudo-random numbers with mean 4 and standard deviation 1. Compute the sum of 14
components of the vector, starting from position 21.
(6) Maximize, if possible, the following function over the interval [−3, 0]: f (x) = −x4 − x3 +
4x2 − x − 1. Write the objective function at the optimum or -999 if there is no solution.
(7) Find the righmost root of the equation
x3 + 4x2 + 4x + 1 = 0.
(8) Solve the non-linear system of equations 2x + 5y = exp(−x2 ) + 7, 4x − 3y = exp(−y2 ) + 7,
and write the x coordinate of the solution.
(9) Assume that t = 0 corresponds to May 1st 2019. Consider the BTP denominated, according
to the standard conventions, BTP5% 01Aug2020. Compute the gross return of the BTP if the
cost is 101.58. Use 3 decimal digits for this exercise !!!
(10) Enter the following commands: set.seed(174);x <- 1:10;y <- rnorm(10) and plot
the points whose coordinates are x and y. How many points are inside the triangle formed by
the three lines y = −x + 7, y = 0.5x − 2.5 and y = 1.
a) There is no point inside the triangle. b) One point is inside the triangle.
c) Two points are inside the triangle. d) Three or more points are inside the triangle.
(11) Let f be the function
x2 + xy + y2 − y 2 2
+ e−x −x + e−y +2y .
2
Plot the levels of f and find its global minimum.
4

(12) The production of a firm is


0.75l 0.2 k0.8 ,
where l is labour and k is capital. The unit costs of labour and capital are 0.5 and 1.1, respec-
tively. Which is the maximum production if the cost of the factors cannot exceed 4?
(13) Profits depend on price p and can be described as f (p) = 3.5e2.5p − 0.6e4p . The actual price
is 0.97. Which of the following is true?
(a) The profit at price 0.97 is 11.55.
(b) The profit-maximizing price is about 0.95.
(c) Profit would be maximized decreasing the price by about 8.9%.
(d) Profit would be maximized decreasing the price by about 11.1%.
(14) Consider the assets (118, 106, 103)0 , (98, 99, 114)0 and (98.2, 92.6, 97.1)0 whose prices are
95.70, 93.50, 85.250, respectively. Is the third asset replicable? Do you have an arbitrage
opportunity on the third asset?
(a) No, it’s not replicable. Hence, there is an arbitrage opportunity.
(b) No, it’s not replicable and there is NO arbitrage opportunity.
(c) Yes, it’s replicable and there is an arbitrage opportunity.
(d) Yes, it’s replicable but there is NO arbitrage opportunity.
(15) Solve the system     
1 −1 0 x 4
−1 3 1 y = −2 .
1 1 1 z 6
Write the sum of the components of the solution or -999, if the system has no solution.
(16) The quality of a new item is assessed using 3 numeric measures. Assume they are normal
random numbers. Estimate how likely it is that the minimum of the measures exceeds 0.5.
a) About 0.54; b) About 0.03; c) About 0.48; d) About 0.34.
(17) At a cost of 100 you can get one of the random future payoffs 200, 90, 4, respectively. Assume
payoffs are drawn with probability proportional to 4, 5, 1. What’s the net expected gain of the
investment?
a) About 14.6; b) About 38.1; c) About 25; d) About 12.
5

Computational Tools EM - January 30 2017


Sumbit answers at http://url
Surname
Name 103
Student ID

Write the solutions using two decimal digits.

(1) Consider the numbers 1.015465e-21 and 3.873998e-21. Then say whether both numbers are
small and the first is larger then the second.
(2) Draw the line and the parabola y = x + 1, y = x2 − 2x + 1 over the interval [−2, 3] and find
the ordinate of the lowest point belonging to the graphs.
(3) Consider the expression exp(0:2)+log(1:4). Which of the following stataments holds?
(a) There was no need to recycle any argument.
(b) The last recycled number was 1.099
(c) The last recycled number was 1
(d) The last recycled number was 7.389
(4) Which of the following statements is correct?
(a) Simulation can answer the question ’What’s the correct outcome of my experiment?’.
(b) The terms ’distribution’ and ’simulation’ are equivalent.
(c) Simulation can answer the question ’How likely is that a random outcome is acceptable?’.
(d) Simulation can answer the question ’What’s the most appropriate outcome for an exper-
iment?’.
(5) Type set.seed(155) and press enter. Then immediately store in a vector 100 normal
pseudo-random numbers with mean -2 and standard deviation 2. Compute the sum of 11
components of the vector, starting from position 21.
(6) Maximize, if possible, the following function: f (x) = x4 − 2x3 − x2 − 3x − 4. Write the objec-
tive function at the optimum or -999 if there is no solution.
(7) In the smartphone market, the number of customers (in billions) of Samsung and Apple can be
modelled by the functions f (x) = x/100 + 0.18e0.087x , and g(x) = 0.3 + 0.029x, where x > 0
denotes year 2000+x. When is Samsung reaching one billion customers for the first time?
(8) How many solutions do you have in the system of non-linear equations: x2 − 2xy + y2 + 3x =
0, (x − 1)2 + (y − 1)2 = 1?
(9) Assume that t = 0 corresponds to May 1st 2019. Consider the BTP denominated, according
to the standard conventions, BTP5% 01Aug2020. Compute the gross return of the BTP if the
cost is 101.1. Use 3 decimal digits for this exercise !!!
(10) Enter the following commands: set.seed(189);x <- 1:10;y <- rnorm(10) and plot
the points whose coordinates are x and y. How many points are inside the triangle formed by
the three lines y = −0.5x + 1.5, y = x − 7 and y = 1.
a) There is no point inside the triangle. b) One point is inside the triangle.
c) Two points are inside the triangle. d) Three or more points are inside the triangle.
(11) Let f be the function
x2 + xy + y2 − y 2 2
+ e−x −2x + e−y −2y .
2
Plot the levels of f and find its global minimum.
6

(12) The production of a firm is


0.25l 0.3 k0.7 ,
where l is labour and k is capital. The unit costs of labour and capital are 0.5 and 1.1, respec-
tively. Which is the maximum production if the cost of the factors cannot exceed 3?
(13) Profits depend on price p and can be described as f (p) = 3e2p − 0.5e4p . The actual price is
0.64. Which of the following is true?
(a) The profit-maximizing price is about 0.6.
(b) The profit-maximizing price is about 0.55.
(c) The optimal profit is about 5.445.
(d) The profit at price 0.64 is 3.89.
(14) Consider the assets (115, 109, 105)0 , (105, 107, 103)0 and (110, 108, 104)0 whose prices are
99.36, 93.96, 97.660, respectively. Is the third asset replicable? Do you have an arbitrage
opportunity on the third asset?
(a) No, it’s not replicable. Hence, there is an arbitrage opportunity.
(b) No, it’s not replicable and there is NO arbitrage opportunity.
(c) Yes, it’s replicable and there is an arbitrage opportunity.
(d) Yes, it’s replicable but there is NO arbitrage opportunity.
(15) Solve the system     
1 −2 −3.5 x 3
1 0 −0.5 y = 5 .
1 0 −0.5 z 5
Write the sum of the components of the solution or -999, if the system has no solution.
(16) Run a simulation to estimate the probability that a standard random uniform is bigger than
another uniform random number in [0.3, 1.1].
a) About 0.405; b) About 0.356; c) About 0.306; d) About 0.257.
(17) Given a market Y, an asset b is replicable if:
(a) the rank of Y is the same as the rank of b.
(b) b is a weighted sum of the rows of Y.
(c) b is a weighted sum of the assets in the market.
(d) there is a portfolio x such that the rank of Y is equal to the rank of Y|x.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
101 0.00 -2.00 2.00 4.00 34.27 -8.29 15.95 4.00 0.03 4.00 0.20 0.43 1.00 2.00 8.00 2.00 4.00
102 1.00 -5.25 4.00 2.00 52.87 9.17 -0.38 2.31 0.05 1.00 1.00 1.94 4.00 4.00 6.00 2.00 3.00
103 0.00 -1.00 3.00 3.00 -28.49 -999.00 17.50 0.00 0.05 4.00 0.63 0.47 2.00 3.00 6.00 3.00 3.00
7

You might also like