Quiz 1 of Python and Statistics For Financial Analysis
Quiz 1 of Python and Statistics For Financial Analysis
1.
Question 1
Which of the following library has DataFrame object?
1 point
Matplotlib
Numpy
Statsmodels
Pandas
————————————————————————————————–
2.
Question 2
Which of the following is the correct way to import a library, eg Pandas?
1 point
1 pandas import
1 pandas
1 import pandas as pd
1 #include <pandas>
————————————————————————————————–
https://jamdbokhtier.com/quiz-1-of-python-and-statistics-for-financial-analysis/ 1/5
29/12/22, 22:54 Quiz 1 of Python and Statistics for Financial Analysis
3.
Question 3
What is the method of DataFrame object to import a csv file?
1 point
csv()
read_csv()
import_csv()
from_csv()
————————————————————————————————–
4.
Question 4
Which of the following attributes of a DataFrame return a list of column names of this
DataFrame?
1 point
columns
shape
dtype
column
————————————————————————————————–
5.
Question 5
Which of the following can slice ‘Close’ from ‘2015-01-01’ to ‘2016-12-31’ from data,
which is a DataFrame object?
1 point
1 data.loc[‘2015-01-01’:’2016-12-31’, ‘Close’]
1 data.iloc[‘2015-01-01’:’2016-12-31’, ‘Close’]
————————————————————————————————–
6.
Question 6
What is the method of DataFrame to plot a line chart?
https://jamdbokhtier.com/quiz-1-of-python-and-statistics-for-financial-analysis/ 2/5
29/12/22, 22:54 Quiz 1 of Python and Statistics for Financial Analysis
1 point
axhline()
scatter()
plot()
plot_graph()
————————————————————————————————–
7.
Question 7
Suppose you have a DataFrame – data, which contains columns ‘Open’, ‘High’,
‘Low’, ‘Close’, ‘Adj Close’ and ‘Volume’.
Which of the following syntax calculates the Price difference, (ie ‘Close’ of tomorrow –
‘Close’ of today)?
1 point
1 ms[‘Close’].shift(-1) – ms[‘Close’]
1 ms[‘Close’].shift(1) – ms[‘Close’].shift(1)
1 ms[‘Close’].shift(1) – ms[‘Close’]
https://jamdbokhtier.com/quiz-1-of-python-and-statistics-for-financial-analysis/ 3/5
29/12/22, 22:54 Quiz 1 of Python and Statistics for Financial Analysis
1 ms[‘Close’].shift(-1) – ms[‘Close’].shift(-1)
————————————————————————————————–
9.
Question 9
Suppose you have a DataFrame – ms , which contains the daily data of ‘Open’,
‘High’, ‘Low’, ‘Close’, ‘Adj Close’ and ‘Volumn’ of Microsoft’s stock.
1 point
Use longer moving average as slow signal and shorter moving average as fast
signal
We short one share of stocks if fast signal is larger than slow signal
If fast signal is larger than slow signal, this indicates an upward trend at the
current moment
PREVIOUS NEXT
To be eligible for discount customers must Quiz 2 of Python and Statistics for Financial
have paid before the Discount Due Date Analysis
and must have paid at least the full balance
owing less the discount amount, i.e.
https://jamdbokhtier.com/quiz-1-of-python-and-statistics-for-financial-analysis/ 4/5
29/12/22, 22:54 Quiz 1 of Python and Statistics for Financial Analysis
Similar Posts
https://jamdbokhtier.com/quiz-1-of-python-and-statistics-for-financial-analysis/ 5/5